WordPress at Your Fingertips

is_checkout() WC 1.0

Is_checkout - Returns true when viewing the checkout page.

Hooks from the function
Return

true|false.

Usage

is_checkout();

Code of is_checkout() WC 5.7.0

function is_checkout() {
	$page_id = wc_get_page_id( 'checkout' );

	return ( $page_id && is_page( $page_id ) ) || wc_post_content_has_shortcode( 'woocommerce_checkout' ) || apply_filters( 'woocommerce_is_checkout', false ) || Constants::is_defined( 'WOOCOMMERCE_CHECKOUT' );
}

WC Conditional Tags

No comments
    Log In