WordPress at Your Fingertips
function is not described

WC_Query::get_endpoints_mask() public WC 2.6.2

Endpoint mask describing the places the endpoint should be added.

{} It's a method of the class: WC_Query{}

No Hooks.

Return

Int.

Usage

$WC_Query = new WC_Query();
$WC_Query->get_endpoints_mask();

Changelog

Since 2.6.2 Introduced.

Code of WC_Query::get_endpoints_mask() WC 5.7.1

public function get_endpoints_mask() {
	if ( 'page' === get_option( 'show_on_front' ) ) {
		$page_on_front     = get_option( 'page_on_front' );
		$myaccount_page_id = get_option( 'woocommerce_myaccount_page_id' );
		$checkout_page_id  = get_option( 'woocommerce_checkout_page_id' );

		if ( in_array( $page_on_front, array( $myaccount_page_id, $checkout_page_id ), true ) ) {
			return EP_ROOT | EP_PAGES;
		}
	}

	return EP_PAGES;
}