We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb49207 commit f17383cCopy full SHA for f17383c
includes/payment-methods/class-wc-stripe-express-checkout-helper.php
@@ -578,7 +578,7 @@ public function should_show_express_checkout_button() {
578
579
// Don't show if the total price is 0.
580
// ToDo: support free trials. Free trials should be supported if the product does not require shipping.
581
- if ( ( ! ( $this->is_pay_for_order_page() || $this->is_product() ) && 0.0 === (float) WC()->cart->get_total( false ) )
+ if ( ( ! ( $this->is_pay_for_order_page() || $this->is_product() ) && isset( WC()->cart ) && 0.0 === (float) WC()->cart->get_total( false ) )
582
|| ( $this->is_product() && 0.0 === (float) $this->get_product()->get_price() )
583
) {
584
return false;
0 commit comments