Skip to content

Commit 3557376

Browse files
authored
Only load the ECE class (including scripts) if UPE is enabled (#3489)
1 parent 27475b4 commit 3557376

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

includes/payment-methods/class-wc-stripe-express-checkout-element.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ public function init() {
6565
return;
6666
}
6767

68+
// ECE is only available when UPE checkout is enabled.
69+
if ( ! WC_Stripe_Feature_Flags::is_upe_checkout_enabled() ) {
70+
return;
71+
}
72+
6873
// Checks if Stripe Gateway is enabled.
6974
if ( empty( $this->stripe_settings ) || ( isset( $this->stripe_settings['enabled'] ) && 'yes' !== $this->stripe_settings['enabled'] ) ) {
7075
return;

0 commit comments

Comments
 (0)