We have a theme that we use for our client websites, few month ago we made a woo-commerce website with it, everything was okay until client decided to use “PayPal-powered by Braintree”.

Problem is that we get the error when placing order about missing nonce. We have verified that Braintree and PayPal account is correctly set-up, also checked with twentyeleven.. theme that bug is not inside account or plugins.

I have trace-back, where the token is added to the $model variable so be able to see where is the problem.

if ( WC_PayPal_Braintree_Loader::getInstance()->does_session_have_postback_data() ) {
    $postback_data = WC()->session->get( 'paypal_braintree_postback' );
    $model['paypalbraintree_nonce'] = $postback_data['paypalbraintree_nonce'];

The “does_session_have_postback_data()” is false when using our theme, but when using twenty… then there is postback data.

So my question is, since or theme is forked and modified roots.io starter theme, I have no clue what the hell can modify/wipe/remove/… the postback data.

I have also tried to remove woocommerce templates from theme to load unmodified templates from the woocommerce plugin, but the issue persists.

Thank you for any suggestions

Read more here: Missing post back data in custom theme – PayPal powered by Braintree [on hold]


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: