• Resolved yoonlaserwp23

    (@yoonlaserwp23)


    Hello,

    I integrated Klaviyo plugin to send emails for abandoned cart events. Somehow the abandoned cart emails go out when users just loaded/visited some product pages.
    We’ve contacted the Klaviyo support team first and found out that immediately after the ‘https://avlgear.com/?wc-ajax=ppc-simulate-cart‘ network request was executed, the added to cart events are showing on the Klaviyo activity log. When they disable that network call using the Chrome Dev tool and reload the product page, no Added to Cart event is tracked upon page load:
    We’ve tested the woocommerce_add_to_cart hook, but it wasn’t fired at the product page load, so it was not the source of the issue.
    They said the network request is coming from the Paypal module file :

    https://avlgear.com/wp-content/cache/min/1/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/assets/js/button.js?ver=1704291876

    Is there any way that I can disable/edit this conflicting file? If so, how can I do that on my end? Can you explain the procedure in detail?
    Also, I wonder if there will be any disadvantage, or if the Paypal will malfunction on my store if I disable/edit the network request.

    Thank you!

    F.Y.I.
    We’re not showing Paypal or Pay Later button on the product page.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Krystian from Syde

    (@inpsydekrystian)

    Hello @yoonlaserwp23

    Firstly, it’s important to note that the /?wc-ajax=ppc-simulate-cart? endpoint is essential for the PayPal payment process. Disabling or modifying this could disrupt the functionality of PayPal payments on your site.

    The issue you described seems to be related to the ‘Cart Simulation’ feature we introduced in version 2.2.0 of the WooCommerce PayPal Payments plugin. This feature was designed to enhance compatibility on single product pages, e.g. when using plugins like WC Bookings or WC Product Add-ons.

    To resolve this, you can disable the cart simulation feature using the filters. For more detailed information on modifying cart simulation behavior, please refer to our documentation here: Modify Cart Simulation Behavior.

    Please be assured that disabling the cart simulation feature should not adversely affect the core functionality of PayPal payments on your store.

    If you have any further questions or need additional assistance, please don’t hesitate to contact us.

    Kind regards,
    Krystian

    Thread Starter yoonlaserwp23

    (@yoonlaserwp23)

    So do I need to use all these 3 filters to disable cart simulation?

    //disable simulate cart add_filter( ‘woocommerce_paypal_payments_simulate_cart_enabled’, ‘__return_false’ );

    //reduce simulate cart frequency function my_custom_simulate_cart_throttling( $throttling ) { return 10000; // Return 10000 regardless of the initial $throttling value } add_filter( ‘woocommerce_paypal_payments_simulate_cart_throttling’, ‘my_custom_simulate_cart_throttling’ );

    //prevent shutdown suppression if there are any problems with the cart behavior add_filter( ‘woocommerce_paypal_payments_simulate_cart_prevent_updates’, ‘__return_false’ );

    What does the last filter do? Can you explain this a little bit more?

    Thank you!

    Plugin Support Krystian from Syde

    (@inpsydekrystian)

    Hello @yoonlaserwp23

    Let me clarify the purpose of each filter for your better understanding:

    Disable Simulate Cart: The first filter you mentioned add_filter( ‘woocommerce_paypal_payments_simulate_cart_enabled’, ‘__return_false’ ) is indeed the key to disabling the cart simulation feature. By applying this filter, you instruct the system not to simulate the cart, effectively turning off this functionality.

    Simulate Cart Frequency: The second filter add_filter( ‘woocommerce_paypal_payments_simulate_cart_throttling’, ‘my_custom_simulate_cart_throttling’ ) is used to adjust the frequency of cart simulation. However, this becomes irrelevant once you disable the cart simulation using the first filter. Since the cart simulation is turned off, the frequency of a non-active process is not a concern.

    Prevent Shutdown Suppression: The third filter add_filter( ‘woocommerce_paypal_payments_simulate_cart_prevent_updates’, ‘__return_false’ ) is designed to assist with compatibility issues and prevent potential race conditions during cart simulation. However, similar to the second filter, its functionality is not needed when the cart simulation is already disabled with the first filter. It’s more relevant when you’re running the cart simulation and want to ensure smooth operation without interference.

    In summary, for your specific requirement of disabling the cart simulation, the first filter is sufficient and the others are not necessary.

    I hope this clarifies your doubts.

    Kind Regards,

    Krystian

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How can I disable ‘ppc-simulate-cart’ request?’ is closed to new replies.