diff --git a/changelog.txt b/changelog.txt index fc4c9c98b..5b92beb47 100644 --- a/changelog.txt +++ b/changelog.txt @@ -19,6 +19,8 @@ * Tweak - Do not load ECE button if the total amount is 0. * Add - Show ECE button preview on settings page. * Tweak - Remove the subscription order notes added each time a source wasn't migrated. +* Tweak - Update ECE default button type. +* Fix - Fix position of ECE button on shortcode cart page. = 8.8.2 - 2024-11-07 = * Fix - Prevent marking renewal orders as processing/completed multiple times due to handling the Stripe webhook in parallel. diff --git a/includes/admin/stripe-settings.php b/includes/admin/stripe-settings.php index 5d80a4637..f13e45852 100644 --- a/includes/admin/stripe-settings.php +++ b/includes/admin/stripe-settings.php @@ -138,7 +138,7 @@ 'label' => __( 'Button Type', 'woocommerce-gateway-stripe' ), 'type' => 'select', 'description' => __( 'Select the button type you would like to show.', 'woocommerce-gateway-stripe' ), - 'default' => 'buy', + 'default' => 'default', 'desc_tip' => true, 'options' => [ 'default' => __( 'Default', 'woocommerce-gateway-stripe' ), diff --git a/includes/payment-methods/class-wc-stripe-express-checkout-element.php b/includes/payment-methods/class-wc-stripe-express-checkout-element.php index 7b0745ae6..df7bd845c 100644 --- a/includes/payment-methods/class-wc-stripe-express-checkout-element.php +++ b/includes/payment-methods/class-wc-stripe-express-checkout-element.php @@ -91,7 +91,7 @@ public function init() { add_action( 'wp_enqueue_scripts', [ $this, 'scripts' ] ); add_action( 'woocommerce_after_add_to_cart_form', [ $this, 'display_express_checkout_button_html' ], 1 ); - add_action( 'woocommerce_proceed_to_checkout', [ $this, 'display_express_checkout_button_html' ] ); + add_action( 'woocommerce_proceed_to_checkout', [ $this, 'display_express_checkout_button_html' ], 20 ); add_action( 'woocommerce_checkout_before_customer_details', [ $this, 'display_express_checkout_button_html' ], 1 ); add_action( 'woocommerce_pay_order_before_payment', [ $this, 'display_express_checkout_button_html' ], 1 ); @@ -403,7 +403,7 @@ public function display_express_checkout_button_html() { * Display express checkout button separator. */ public function display_express_checkout_button_separator_html() { - if ( ! is_checkout() && ! is_cart() && ! is_wc_endpoint_url( 'order-pay' ) ) { + if ( ! is_checkout() && ! is_wc_endpoint_url( 'order-pay' ) ) { return; } @@ -411,10 +411,6 @@ public function display_express_checkout_button_separator_html() { return; } - if ( is_cart() && ! in_array( 'cart', $this->express_checkout_helper->get_button_locations(), true ) ) { - return; - } - ?>