Open roskno opened 4 months ago
My guess is that just adding a custom product type to wc_stripe_payment_request_supported_types
isn't enough. There's likely other work that needs to be done to make it work with Apple Pay, but I'll let our devs provide a more detailed answer. :)
Describe the bug The WC_Stripe_Payment_Request::ajax_add_to_cart() function won't allow custom product-type products to be added to the cart. It will return 0 as the price to the Apple Pay modal (It seems to work properly with Google Pay).
The Google and Apple Pay buttons appear on the custom product page because we used the 'wc_stripe_payment_request_supported_types' filter to add our types.
Product types allowed: variable variable-subscription simple variation subscription subscription_variation
Any additional type won't work.
To Reproduce Steps to reproduce the behaviour:
Expected behaviour It should check and set the correct price for all product types. Maybe two filters could be added, one for parent products and the other for simple products.
Screenshots The Apple Pay button The modal with the correct price The modal after refreshing the price using the ajac_add_to_cart function
Environment (please complete the following information):