ThemeShaper Forums » Thematic


PayPal Express Checkout broken with Child Theme

(5 posts)
  • Started 10 years ago by joshuaiz
  • Latest reply from Chris
  • This topic is resolved
  1. joshuaiz


    This is a bit of a weird one: I'm using a custom child theme and I have WP E-Commerce set up on my site to sell my music (I have a record label) and I'm getting an error with PayPal but only when I'm using my child theme.

    When I'm using my child theme, when someone goes to checkout they are then routed to PayPal Express Checkout to complete their transaction. Upon clicking the 'Make Purchase' button, I get an error which states that the version of PayPal Express Checkout is incorrect.

    I called PayPal merchant services and what's weird is that the PayPal gateway version number the shopping cart is sending is (!!!???) I thought, wait, this number looks familiar and it is the version number of Thematic. What's even weirder is that if i use another theme, the transaction goes through without the error. It even works when I'm using just Thematic!

    I'm kind of at a loss here as to why the Thematic version number is being sent with the API call to PayPal. Maybe if someone knows where this number is stored and then I can try to troubleshoot from there.

    Any ideas???

    Posted 10 years ago #
  2. joshuaiz

    Ok, I went ahead and changed the theme version number in thematic/style.css to '56' which is the version number of the PayPal build in the WP E-Commerce plugin and it works but this is really strange...

    Posted 10 years ago #
  3. Hi joshuaiz,

    Sorry for the headache. It's always a pain when global variables collide. This is a good example of why we need to be specific with our globals. I'll mention this to Chris and see if we can get something changed in the svn to accommodate for this issue.

    Normally I never suggest that people edit core file *but* you could edit the thematic functions.php changing $version to something like $thm_version.

    To the best of my knowledge the functions.php is the only Thematic file that references that global variable and only on lines 7,8,9, and 20


    Posted 10 years ago #
  4. joshuaiz

    Thanks Gene! Everything is sorted.

    This totally makes sense now...

    Posted 10 years ago #
  5. Hi,

    problem is fixed with SVN revision 645.


    Posted 10 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.