Last active
August 12, 2017 20:40
-
-
Save New0/62af7b5c5f1a0017ffc71d6dc22a8d97 to your computer and use it in GitHub Desktop.
WAIT FOR UPDATE TO 2.1.0 DIrect Stripe Update Customer's Card Number in Stripe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'ds_charge_action_payment', function( $action ) { | |
$action = '\Stripe\Customer::retrieve'; | |
return $action; | |
}, 10); | |
add_filter( 'ds_charge_content_payment', function( $content, $token, $stripe_id ) { | |
$content = $stripe_id; | |
return $content; | |
}, 10, 3); | |
add_action( 'ds_after_charge_payment_process', function( $customer, $token ) { | |
$customer->source = $token; | |
$customer->save(); | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment