Server IP : 104.21.14.48 / Your IP : 18.221.73.212 [ Web Server : Apache System : Linux b70eb322-3aee-0c53-7c82-0db91281f2c6.secureserver.net 6.1.90-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 2 12:09:22 EDT 2024 x86_64 User : root ( 0) PHP Version : 8.0.30.2 Disable Function : NONE Domains : 0 Domains MySQL : ON | cURL : ON | WGET : ON | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/wp-content/plugins/wordpress-seo/src/helpers/ |
Upload File : |
<?php namespace Yoast\WP\SEO\Helpers; /** * Represents helper methods for WooCommerce. */ class Woocommerce_Helper { /** * Checks if WooCommerce is active. * * @return bool Is WooCommerce active. */ public function is_active() { return \class_exists( 'WooCommerce' ); } /** * Returns the id of the set WooCommerce shop page. * * @return int The ID of the set page. */ public function get_shop_page_id() { if ( ! \function_exists( 'wc_get_page_id' ) ) { return -1; } return \wc_get_page_id( 'shop' ); } /** * Checks if the current page is a WooCommerce shop page. * * @return bool True when the page is a shop page. */ public function is_shop_page() { if ( ! \function_exists( 'is_shop' ) ) { return false; } if ( ! \is_shop() ) { return false; } if ( \is_search() ) { return false; } return true; } /** * Checks if the current page is a WooCommerce shop page. * * @return bool True when the page is a shop page. */ 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 \intval( $post->ID ) === \intval( \wc_terms_and_conditions_page_id() ); } }