WC_Query::get_endpoints_mask()
Endpoint mask describing the places the endpoint should be added.
Description Description
Return Return
(int)
Source Source
File: includes/class-wc-query.php
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;
}
Changelog Changelog
| Version | Description |
|---|---|
| 2.6.2 | Introduced. |