is_checkout()
Is_checkout - Returns true when viewing the checkout page.
Used By: is_checkout_pay_page()
Hooks from the function
Return
true|false
.
Usage
is_checkout();
Code of is_checkout() is checkout WC 6.5.1
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' ); }