Skip to content

Instantly share code, notes, and snippets.

Embed
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
<?php
/*
* Plugin Name: DS Cross Border Classification
* Author: Nicolas Figueira
* Author URI: https://newo.me
* Description: Declare Cross Border Classification during Direct Stripe transactions
* Plugin URI: https://gist.github.com/New0/69100a1d6ba749c0e15d03cef9a4481b/edit
* 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.