diff --git a/includes/class-wc-frontend-scripts.php b/includes/class-wc-frontend-scripts.php index b7c1e688b47..d85a019d54c 100644 --- a/includes/class-wc-frontend-scripts.php +++ b/includes/class-wc-frontend-scripts.php @@ -509,7 +509,7 @@ class WC_Frontend_Scripts { 'remove_coupon_nonce' => wp_create_nonce( 'remove-coupon' ), 'option_guest_checkout' => get_option( 'woocommerce_enable_guest_checkout' ), 'checkout_url' => WC_AJAX::get_endpoint( 'checkout' ), - 'is_checkout' => is_page( wc_get_page_id( 'checkout' ) ) && empty( $wp->query_vars['order-pay'] ) && ! isset( $wp->query_vars['order-received'] ) ? 1 : 0, + 'is_checkout' => is_checkout() && empty( $wp->query_vars['order-pay'] ) && ! isset( $wp->query_vars['order-received'] ) ? 1 : 0, 'debug_mode' => defined( 'WP_DEBUG' ) && WP_DEBUG, 'i18n_checkout_error' => esc_attr__( 'Error processing checkout. Please try again.', 'woocommerce' ), );