Created
April 26, 2022 18:47
-
-
Save DumahX/f3e443b78fbd01694f3e29d9c3a9adf2 to your computer and use it in GitHub Desktop.
This file contains 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 | |
// Paste this into functions.php or a plugin like Code Snippets | |
function add_stripe_payment_args($args, $txn = false, $sub = false) { | |
if($txn) { | |
$user = $txn->user(); | |
$args['metadata']['mepr_fatturazione_elettronica'] = get_user_meta($user->ID, 'mepr_fatturazione_elettronica', true); | |
} | |
return $args; | |
} | |
add_filter('mepr_stripe_payment_args', 'add_stripe_payment_args', 11, 2); | |
add_filter('mepr_stripe_payment_intent_args', 'add_stripe_payment_args', 11, 2); | |
add_filter('mepr_stripe_setup_intent_args', 'add_stripe_payment_args', 11, 2); | |
add_filter('mepr_stripe_subscription_args', 'add_stripe_payment_args', 11, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment