mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 10:55:00 +08:00
Revert removal of gateway status check
Looks like it was accidentally removed after #704 merge conflict. Without it we always render the hidden area for separate card gateway, so the check in JS fails and we always render all standard buttons separately in checkout, which may result in wrong style and other issues.
This commit is contained in:
parent
f256134148
commit
65b435135b
1 changed files with 6 additions and 0 deletions
|
@ -559,6 +559,12 @@ class SmartButton implements SmartButtonInterface {
|
|||
return;
|
||||
}
|
||||
|
||||
$available_gateways = WC()->payment_gateways->get_available_payment_gateways();
|
||||
|
||||
if ( ! isset( $available_gateways[ $gateway_id ] ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// The wrapper is needed for the loading spinner,
|
||||
// otherwise jQuery block() prevents buttons rendering.
|
||||
echo '<div class="ppc-button-wrapper"><div id="ppc-button-' . esc_attr( $gateway_id ) . '"></div></div>';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue