@@ -95,10 +95,6 @@ public function init() {
95
95
$ is_woopay_enabled = WC_Payments_Features::is_woopay_enabled ();
96
96
$ is_payment_request_enabled = 'yes ' === $ this ->gateway ->get_option ( 'payment_request ' );
97
97
98
- if ( $ is_payment_request_enabled ) {
99
- $ this ->add_html_container_for_test_express_checkout_buttons ();
100
- }
101
-
102
98
if ( $ is_woopay_enabled || $ is_payment_request_enabled ) {
103
99
add_action ( 'wc_ajax_wcpay_add_to_cart ' , [ $ this ->express_checkout_ajax_handler , 'ajax_add_to_cart ' ] );
104
100
add_action ( 'wc_ajax_wcpay_empty_cart ' , [ $ this ->express_checkout_ajax_handler , 'ajax_empty_cart ' ] );
@@ -178,31 +174,6 @@ public function add_order_attribution_inputs() {
178
174
echo '<wc-order-attribution-inputs id="wcpay-express-checkout__order-attribution-inputs"></wc-order-attribution-inputs> ' ;
179
175
}
180
176
181
-
182
- /**
183
- * Add HTML containers to be used by the Express Checkout buttons that check if the payment method is available.
184
- *
185
- * @return void
186
- */
187
- private function add_html_container_for_test_express_checkout_buttons () {
188
- add_filter (
189
- 'the_content ' ,
190
- function ( $ content ) {
191
- $ supported_payment_methods = [ 'applePay ' , 'googlePay ' ];
192
- // Restrict adding these HTML containers to only the necessary pages.
193
- if ( $ this ->express_checkout_helper ->is_checkout () || $ this ->express_checkout_helper ->is_cart () ) {
194
- foreach ( $ supported_payment_methods as $ value ) {
195
- // The inline styles ensure that the HTML elements don't occupy space on the page.
196
- $ content = '<div id="express-checkout-check-availability-container- ' . $ value . '" style="height: 0; float:left; opacity: 0; pointer-events: none;"></div> ' . $ content ;
197
- }
198
- }
199
- return $ content ;
200
- },
201
- 10 ,
202
- 1
203
- );
204
- }
205
-
206
177
/**
207
178
* Check if the pay-for-order flow is supported.
208
179
*
0 commit comments