<?php
namespace Yoast\WP\SEO\Editors\Framework\Integrations;
use WPSEO_Addon_Manager;
use Yoast\WP\SEO\Editors\Domain\Integrations\Integration_Data_Provider_Interface;
class WooCommerce_SEO implements Integration_Data_Provider_Interface {
private $addon_manager;
public function __construct( WPSEO_Addon_Manager $addon_manager ) {
$this->addon_manager = $addon_manager;
}
public function is_enabled(): bool {
return \is_plugin_active( $this->addon_manager->get_plugin_file( WPSEO_Addon_Manager::WOOCOMMERCE_SLUG ) );
}
public function to_array(): array {
return [ 'isWooCommerceSeoActive' => $this->is_enabled() ];
}