Duplicate wc_ajax_wcpay_add_to_cart endpoint is being overriden by WooPay #7801
Labels
category: core
WC Payments core related issues, where it’s obvious.
component: payment request button
Apple Pay, Google Pay, etc
component: WooPay
WooPay related issues
priority: low
The issue/PR is low priority—not many people are affected or there’s a workaround, etc.
type: bug
The issue is a confirmed bug.
Describe the bug
WooPay button's wc_ajax_wcpay_add_to_cart endpoint is taking precedence and overriding the endpoint that was meant to be used by Apple Pay. Currently this is not causing any bugs because both methods are identical, but it is confusing. These endpoints should be merged or one of them should be renamed to avoid conflicts.
To Reproduce
throw new \Exception('test');
as the first line ofWC_Payments_Payment_Request_Button_Handler::ajax_add_to_cart()
.wc_ajax_wcpay_add_to_cart
was succesfull.WC_Payments_WooPay_Button_Handler::ajax_add_to_cart()
.The text was updated successfully, but these errors were encountered: