• Resolved smarti9

    (@smarti9)


    Hi,

    I have input from a field I want to send to Stripe as metadata

    [billing_vat_number]

    How would I go about doing this with your plugin.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support WebToffee Support

    (@webtoffeesupport)

    Hi @smarti9,

    Greeting From Webtoffee!

    We understand that you are looking to pass values from your custom VAT field to Stripe.

    We’ve got you covered! We can share a custom code snippet that will bridge the gap and get those VAT values flowing smoothly to Stripe.

    Plugin Support WebToffee Support

    (@webtoffeesupport)

    Hi @smarti9,

    You can add the following code snippet to your site’s active child theme’s functions.php file for the required purpose.

    add_filter('eh_stripe_payment_intent_args', 'wt_stripe_payment_intent_args_alt');
    
    function wt_stripe_payment_intent_args_alt($charge){
    	if(isset($_REQUEST['billing_vat_number'])){
    		$charge['metadata']['VAT number'] = $_REQUEST['billing_vat_number'];
    	}
    	
    	return $charge;
    }
    Thread Starter smarti9

    (@smarti9)

    Thats great much appreciated

    Worked first time thanks so much now I might be able to sync meatdata vat number to accountancy app from Stripe – save me inputting manually for each order.

    • This reply was modified 9 months, 2 weeks ago by smarti9.
    • This reply was modified 9 months, 2 weeks ago by smarti9.

    I need pass the data to stripe payment link from my website
    Order For: Adult Head
    Size:S
    if (isset($_POST[‘variation-OrderFor’])) { 10 $order_for = $_POST[‘variation-OrderFor’]; 11 } 12 if (isset($_POST[‘variation-HeadSize’])) { 13 $head_size = $_POST[‘variation-HeadSize’]; 14 }

    How to achieve this ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.