• Resolved philiprabbett

    (@philiprabbett)


    https://github.com/woocommerce/woocommerce-gateway-paypal-express-checkout/issues/581

    I’ve done some debugging and it appears the registering of the script happens AFTER the script is attempted to be enqueued.

    The following action fires first
    add_action( 'woocommerce_proceed_to_checkout', array( $this, 'display_paypal_button' ), 20 );

    This action fires AFTER the above however the above attempts to enqueue wp_enqueue_script( 'wc-gateway-ppec-smart-payment-buttons' ); while the below registers
    add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support laceyrod

    (@laceyrod)

    Automattic Happiness Engineer

    Hi there,

    Thanks for providing this information in our public repo. I’d love to see what insight our developers have for this. I am curious, however, are you not able to see your PayPal Smart buttons on the cart page at all? On a default install, with just Storefront and WooCommerce, I am not only successfully seeing them, but I’m also able to run through the entire checkout process.

    Thanks!

    Thread Starter philiprabbett

    (@philiprabbett)

    The only part of this plugin that appears in the cart page is the ‘- or -‘ text, the original HTML markup is viewable but the script is missing, by changing the wp_enqueue_script to contain the details of the wp_register_script I’m able to get this working and presently using a fork of the plugin.

    My theme is a custom built theme using Timber but the hooking methods are all the same. I’ll have a dig about using storefront theme, I assume that would WooCommerce’s Twenty Nineteen equivalent?

    Plugin Support laceyrod

    (@laceyrod)

    Automattic Happiness Engineer

    Hi @philiprabbett

    Storefront is also an official WooCommerce theme, which you can use to test just as you would Twenty Nineteen. You can find the download here: https://woocommerce.com/storefront/

    Hope this helps!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Smart Payment Buttons not working on Cart page’ is closed to new replies.