Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@New0
Last active March 6, 2019 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save New0/ead135a857b6cfb2949de99a321d5bf9 to your computer and use it in GitHub Desktop.
Save New0/ead135a857b6cfb2949de99a321d5bf9 to your computer and use it in GitHub Desktop.
Add metadata parameter to Direct Stripe charge
<?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