creating a snippit, when does it run?

[ad_1]

hello – i was able to get all this working awhile ago, but naturally i forgot how it all works. 😟
here is my filter, but I cannot figure out exactly WHEN (or IF) the snippit executes.

add_filter('wc_stripe_payment_intent_args', function($args, $order){
$orderNbr = WC()->session->get('order_awaiting_payment');
$order = new WC_Order($orderNbr);
//die('this is a test to die'); // this line does not do anything ???
$args['metadata']['clients_email'] = $order->get_meta('_billing_clients_email') ;
$args['metadata']['clients_first_name'] = $order->get_meta('_billing_first_name') ;
$args['metadata']['clients_last_name'] = $order->get_meta('_billing_last_name') ;
return $args;
}, 10, 2);

i was trying to “capture” the _billing_first_name, _billing_last_name as well, but this snippet never even seems to run AT ALL. YES its enabled to run. the _billing_clients_email is successfully being captured.

Its as if there is some old version still in place and the new version has to be somehow “compiled in or something like that.

any suggestions? and i should think a line like

die('this is a test to die');

would halt execution…?

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer