• On multisite, if this extension is disabled for a shop, nothing should append but you get:

    Uncaught ReferenceError: script_vars is not defined
    /wp-content/plugins/fintecture-payment-gateway/assets/js/old-checkout.js?ver=6.8.3:42 (old-checkout.js:42:9)

    Uncaught ReferenceError: script_vars is not defined
    /wp-content/plugins/fintecture-payment-gateway/assets/js/old-checkout.js?ver=6.8.3:8
    EventListener.handleEvent* /wp-content/plugins/fintecture-payment-gateway/assets/js/old-checkout.js?ver=6.8.3:2 (old-checkout.js:8:24)

    • This topic was modified 6 months, 1 week ago by Klemart3D.
Viewing 1 replies (of 1 total)
  • Thread Starter Klemart3D

    (@klemart3d)

    // Fix to insert after wp_register_script(…) into constructor of class-wc-fintecture-payment-gateway.php:

    \wp_register_script(‘wc_gateway_fintecture_old-checkout_js’, \plugins_url(‘assets/js/old-checkout.js’, __DIR__), [‘jquery’], \false, \true);
    \wp_localize_script(
    ‘wc_gateway_fintecture_old-checkout_js’,
    ‘script_vars’,
    [
    ‘cartData’ => [],
    ‘cartId’ => 0,
    ‘checkoutEventUrl’ => \site_url(‘/wc-api/fintecture_checkout_event’),
    ‘dropdownEventUrl’ => \site_url(‘/wc-api/fintecture_dropdown_event’),
    ‘forcePosition’ => \false,
    ‘recommendItPaymentMethod’ => \false,
    ‘recommendText’ => \__(‘Recommended’, ‘fintecture-payment-gateway’),
    ]
    );
    \wp_enqueue_script(‘wc_gateway_fintecture_old-checkout_js’);

Viewing 1 replies (of 1 total)

The topic ‘script_vars is not defined’ is closed to new replies.