Last active
March 6, 2019 14:15
-
-
Save New0/ead135a857b6cfb2949de99a321d5bf9 to your computer and use it in GitHub Desktop.
Add metadata parameter to Direct Stripe charge
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
<?php | |
/* | |
* Add metadata parameter to the Direct Stripe button | |
*/ | |
add_action( 'direct_stripe_charge_data', function($data, $user, $token, $button_id) { | |
$data[] = array( | |
"metadata" => array( | |
"key" => "value" | |
) | |
); | |
return $data; | |
}, 10, 4 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment