is_checkout()WC 1.0

Checks if the current page is the checkout page. Conditional tag.

Hooks from the function

Returns

true|false.

Usage

is_checkout();

Examples

1

#1 Check whether we on the Woo-commerce checkout page

if ( is_checkout() ) {
	//order page
}

is_checkout() code WC 10.8.1

function is_checkout() {
	/**
	 * Filter to allow for custom logic to determine if the checkout page is being viewed.
	 *
	 * @since 2.4.0
	 * @param bool $is_checkout Whether the checkout page is being viewed.
	 */
	return apply_filters( 'woocommerce_is_checkout', false ) || Constants::is_defined( 'WOOCOMMERCE_CHECKOUT' ) || CartCheckoutUtils::is_checkout_page();
}