protected 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))) {
return EP_ROOT | EP_PAGES;
}
}
return EP_PAGES;
}