Describe the Bug
When the "Pay Later" banner is enabled on the Product Page location, the plugin automatically fires a ppc-simulate-cart AJAX request on every variable product page load — before any user interaction. This causes conflicting messages to appear simultaneously and prevents customers from adding variable products to the cart correctly.
To Reproduce
- Install WooCommerce PayPal Payments 4.0.3
- Go to WooCommerce → Settings → Payments → PayPal → Styles
- Select "Product Page" as the button position and enable "Pay Later" banner
- Open any variable product page (with multiple color/size variations)
- Open Chrome DevTools → Network tab → filter by "ppc"
- Reload the page — observe
ppc-simulate-cart firing automatically on page load
- See conflicting yellow and green messages appear without any user interaction
Screenshots
The following behavior is observed on page load without any user interaction:
- Yellow message: "Please select product options visiting [Product Name]"
- Green message: "[Product Name] has been added to your cart"
- Mini-cart shows incorrect amounts from ghost products
ppc-simulate-cart visible in Network tab fired automatically
Expected Behavior
The ppc-simulate-cart request should not interfere with WooCommerce's variation_form AJAX system. It should not trigger any add-to-cart events or UI changes on variable product pages.
Actual Behavior
The ppc-simulate-cart request fires automatically on variable product page load to calculate the Pay Later banner amount. This interferes with WooCommerce's variation form, causing:
- Automatic yellow warning: "Please select product options"
- Automatic green success: "Product added to cart"
- Ghost products appearing in mini-cart
- Customers unable to add variable products correctly
- Out-of-stock variation errors appearing when switching between variations
Environment
- WordPress Version: Latest
- WooCommerce Version: 10.7.0
- Plugin Version: WooCommerce PayPal Payments 4.0.3
- Browser: Chrome (latest)
- Theme: Woodmart + Woodmart Core 1.1.6
- Other relevant plugins: Variation Swatches for WooCommerce
- Store URL: https://algoasi.es
Additional Details
Workaround found: Disabling the Pay Later banner specifically on the Product Page location resolves the issue completely. The conflict does NOT occur when the banner is only enabled on Cart, Checkout, Home or Shop locations.
This confirms the root cause is the ppc-simulate-cart request being triggered on product page load specifically when Pay Later banner is active on that location.
Describe the Bug
When the "Pay Later" banner is enabled on the Product Page location, the plugin automatically fires a
ppc-simulate-cartAJAX request on every variable product page load — before any user interaction. This causes conflicting messages to appear simultaneously and prevents customers from adding variable products to the cart correctly.To Reproduce
ppc-simulate-cartfiring automatically on page loadScreenshots
The following behavior is observed on page load without any user interaction:
ppc-simulate-cartvisible in Network tab fired automaticallyExpected Behavior
The
ppc-simulate-cartrequest should not interfere with WooCommerce'svariation_formAJAX system. It should not trigger any add-to-cart events or UI changes on variable product pages.Actual Behavior
The
ppc-simulate-cartrequest fires automatically on variable product page load to calculate the Pay Later banner amount. This interferes with WooCommerce's variation form, causing:Environment
Additional Details
Workaround found: Disabling the Pay Later banner specifically on the Product Page location resolves the issue completely. The conflict does NOT occur when the banner is only enabled on Cart, Checkout, Home or Shop locations.
This confirms the root cause is the
ppc-simulate-cartrequest being triggered on product page load specifically when Pay Later banner is active on that location.