Duplicate orders in woocommerce with Braintree
-
I want to allow duplicate cards however I’m not sure i’m using the filter correctly.
I’m using the following code in a snippet:
add_filter( 'wc_braintree_api_request_data', 'allow_duplicate_card' ); function allow_duplicate_card( $request_data ) { if ( isset( $request_data['options'], $request_data['options']['failOnDuplicatePaymentMethod'] ) ) { $request_data['options']['failOnDuplicatePaymentMethod'] = false; } return $request_data; }
But the hook only seems to fire before I process the payment and when I try to var_dump($request_data) I only get, what looks like, a hashed number so can’t inspect what’s inside that variable.
Any ideas on how to debug this further?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Duplicate orders in woocommerce with Braintree’ is closed to new replies.