PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.3
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.3
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 19.1 All 128 releases
wordpress-seo / src / initializers / woocommerce.php

woocommerce.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 28.3, at src/initializers/woocommerce.php

35 lines 783 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Yoast\WP\SEO\Initializers;
4
5 use Automattic\WooCommerce\Utilities\FeaturesUtil;
6 use Yoast\WP\SEO\Conditionals\No_Conditionals;
7
8 /**
9 * Declares compatibility with the WooCommerce HPOS feature.
10 */
11 class Woocommerce implements Initializer_Interface {
12
13 use No_Conditionals;
14
15 /**
16 * Hooks into WooCommerce.
17 *
18 * @return void
19 */
20 public function initialize() {
21 \add_action( 'before_woocommerce_init', [ $this, 'declare_custom_order_tables_compatibility' ] );
22 }
23
24 /**
25 * Declares compatibility with the WooCommerce HPOS feature.
26 *
27 * @return void
28 */
29 public function declare_custom_order_tables_compatibility() {
30 if ( \class_exists( FeaturesUtil::class ) ) {
31 FeaturesUtil::declare_compatibility( 'custom_order_tables', \WPSEO_FILE, true );
32 }
33 }
34 }
35