Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Add-on for Direct Stripe in order to declare the Cross Border Classification as metadata in payments and subscriptions
* Plugin Name: DS Cross Border Classification
* Author: Nicolas Figueira
* Author URI:
* Description: Declare Cross Border Classification during Direct Stripe transactions
* Plugin URI:
* Version: 1.0.0
function ds_cbc($data, $user, $token, $button_id) {
$data[] = array(
"metadata" => array(
"cross_border_classification" => "export"
return $data;
add_action( 'direct_stripe_charge_data', 'ds_cbc', 10, 4 );
add_action( 'direct_stripe_subscription_data', 'ds_cbc', 10, 4 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.