PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / trunk
Yoast SEO – Advanced SEO with real-time guidance and built-in AI vtrunk
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
← All changes | src/helpers/woocommerce-helper.php +19 -0 18.4.1 → trunk View file →
@@ -48,5 +48,24 @@
48 48 }
49 49
50 50 return true;
51 51 }
52 +
53 + /**
54 + * Checks if the current page is a WooCommerce shop page.
55 + *
56 + * @return bool True when the page is a shop page.
57 + */
58 + public function current_post_is_terms_and_conditions_page() {
59 + if ( ! \function_exists( 'wc_terms_and_conditions_page_id' ) ) {
60 + return false;
61 + }
62 +
63 + global $post;
64 +
65 + if ( ! isset( $post->ID ) ) {
66 + return false;
67 + }
68 +
69 + return (int) $post->ID === (int) \wc_terms_and_conditions_page_id();
70 + }
52 71 }