Yoast\WP\SEO\Initializers

Woocommerce{}Yoast 1.0

Declares compatibility with the WooCommerce HPOS feature.

Хуков нет.

Использование

$Woocommerce = new Woocommerce();
// use class methods

Методы

  1. public declare_custom_order_tables_compatibility()
  2. public initialize()

Код Woocommerce{} Yoast 19.10

class Woocommerce implements Initializer_Interface {

	use No_Conditionals;

	/**
	 * Hooks into WooCommerce.
	 */
	public function initialize() {
			\add_action( 'before_woocommerce_init', [ $this, 'declare_custom_order_tables_compatibility' ] );
	}

	/**
	 * Declares compatibility with the WooCommerce HPOS feature.
	 */
	public function declare_custom_order_tables_compatibility() {
		if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) {
			\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', WPSEO_FILE, true );
		}
	}
}