Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter jwagstaff

    (@jwagstaff)

    Thanks for responding – I’ve figured out a solution. Just for anyone else who is trying to pass in specific prices, you can create a copy of the plugins/stripe-payments/public/assets/js/stripe-handler-ng.js and put it in your theme file and load it after the one loaded by the plugin, like this:

    wp_enqueue_script(‘stripe-handler-js’, get_stylesheet_directory_uri() . ‘/js/stripe-handler-ng.js’ . $nocache, array(‘stripe-handler-ng’));

    This will override the plugin file and means you can modify the way the popup is initialised without breaking the plugin. Inside that file is a variable called pass_amount that passes the amount to be charged into the popup – you can use that to set custom amounts.

    Hope that helps someone.

    Thread Starter jwagstaff

    (@jwagstaff)

    Aha – does that mean I can’t track add_to_cart events properly in GA4? We aren’t using UA any longer as it is being deprecated.

    Thread Starter jwagstaff

    (@jwagstaff)

    Thanks Pepe,

    – Enable Universal Analytics: OFF
    – Add to Cart Events: ON
    – Enable Enhanced eCommerce: ON

    I don’t seem to be able to enable UA unless I disable Global Site Tag, and that will apparently disconnect GA4 – is that right?

Viewing 3 replies - 1 through 3 (of 3 total)