Yoast\WP\SEO\Helpers
Woocommerce_Helper::current_post_is_terms_and_conditions_page
Checks if the current page is a WooCommerce shop page.
Метод класса: Woocommerce_Helper{}
Хуков нет.
Возвращает
true|false. True when the page is a shop page.
Использование
$Woocommerce_Helper = new Woocommerce_Helper(); $Woocommerce_Helper->current_post_is_terms_and_conditions_page();
Код Woocommerce_Helper::current_post_is_terms_and_conditions_page() Woocommerce Helper::current post is terms and conditions page Yoast 27.8
public function current_post_is_terms_and_conditions_page() {
if ( ! \function_exists( 'wc_terms_and_conditions_page_id' ) ) {
return false;
}
global $post;
if ( ! isset( $post->ID ) ) {
return false;
}
return (int) $post->ID === (int) \wc_terms_and_conditions_page_id();
}