Merged in feature/117-dev-dev01 (pull request #8)
auto-patch 117-dev-dev01-2023-12-15T16_09_06 * auto-patch 117-dev-dev01-2023-12-15T16_09_06
This commit is contained in:
@@ -28,7 +28,6 @@ function wc_template_redirect() {
|
||||
|
||||
// When on the checkout with an empty cart, redirect to cart page.
|
||||
if ( is_page( wc_get_page_id( 'checkout' ) ) && wc_get_page_id( 'checkout' ) !== wc_get_page_id( 'cart' ) && WC()->cart->is_empty() && empty( $wp->query_vars['order-pay'] ) && ! isset( $wp->query_vars['order-received'] ) && ! is_customize_preview() && apply_filters( 'woocommerce_checkout_redirect_empty_cart', true ) ) {
|
||||
wc_add_notice( __( 'Checkout is not available whilst your cart is empty.', 'woocommerce' ), 'notice' );
|
||||
wp_safe_redirect( wc_get_cart_url() );
|
||||
exit;
|
||||
|
||||
@@ -339,6 +338,12 @@ function wc_body_class( $classes ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( wc_current_theme_is_fse_theme() ) {
|
||||
|
||||
$classes[] = 'woocommerce-uses-block-theme';
|
||||
|
||||
}
|
||||
|
||||
if ( wc_block_theme_has_styles_for_element( 'button' ) ) {
|
||||
|
||||
$classes[] = 'woocommerce-block-theme-has-button-styles';
|
||||
|
||||
Reference in New Issue
Block a user