| @@ -2,9 +2,9 @@ | ||
| 2 | 2 | /** |
| 3 | 3 | * Plugin Name: YayMail - WooCommerce Email Customizer |
| 4 | 4 | * Plugin URI: https://yaycommerce.com/yaymail-woocommerce-email-customizer/ |
| 5 | 5 | * Description: Create awesome transactional emails with a drag and drop email builder |
| 6 | - * Version: 4.4.4 | |
| 6 | + * Version: 4.4.5 | |
| 7 | 7 | * Author: YayCommerce |
| 8 | 8 | * Author URI: https://yaycommerce.com |
| 9 | 9 | * License: GPLv2 or later |
| 10 | 10 | * License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| @@ -12,9 +12,9 @@ | ||
| 12 | 12 | * Requires at least: 4.7 |
| 13 | 13 | * Tested up to: 7.1 |
| 14 | 14 | * Requires PHP: 5.4 |
| 15 | 15 | * WC requires at least: 3.0.0 |
| 16 | - * WC tested up to: 11.0.1 | |
| 16 | + * WC tested up to: 11.1.2 | |
| 17 | 17 | * Domain Path: /i18n/languages/ |
| 18 | 18 | * |
| 19 | 19 | * @package YayMail |
| 20 | 20 | */ |
| @@ -31,9 +31,9 @@ | ||
| 31 | 31 | define( 'YAYMAIL_DEBUG', false ); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | if ( ! defined( 'YAYMAIL_VERSION' ) ) { |
| 35 | - define( 'YAYMAIL_VERSION', '4.4.4' ); | |
| 35 | + define( 'YAYMAIL_VERSION', '4.4.5' ); | |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | if ( ! defined( 'YAYMAIL_PLUGIN_URL' ) ) { |
| 39 | 39 | define( 'YAYMAIL_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); |
| @@ -112,9 +112,9 @@ | ||
| 112 | 112 | // Check if yay-wp-pro active |
| 113 | 113 | if ( ! function_exists( 'is_plugin_active' ) ) { |
| 114 | 114 | require_once ABSPATH . 'wp-admin/includes/plugin.php'; |
| 115 | 115 | } |
| 116 | - $yaymail_wp_pro_plugin_file = 'email-builder-pro/email-builder.php'; | |
| 116 | + $yaymail_wp_pro_plugin_file = 'yaymagic-email-builder-pro/yaymagic-email-builder.php'; | |
| 117 | 117 | $yaymail_wp_pro_active = is_plugin_active( $yaymail_wp_pro_plugin_file ) || is_plugin_active_for_network( $yaymail_wp_pro_plugin_file ); |
| 118 | 118 | |
| 119 | 119 | if ( $yaymail_wp_pro_active && defined( 'YAYWP_PLUGIN_PATH' ) ) { |
| 120 | 120 | $core_file = YAYWP_PLUGIN_PATH . 'src/' . $relative_path; |
| @@ -174,11 +174,16 @@ | ||
| 174 | 174 | function yaymail_enable_compatible_hpos() { |
| 175 | 175 | if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) { |
| 176 | 176 | \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); |
| 177 | 177 | |
| 178 | - // Set compatible for addon | |
| 179 | - $plugins = get_plugins(); | |
| 180 | - foreach ( array_keys( $plugins ) as $key ) { | |
| 178 | + // Set compatible for active addons. Read the active-plugin options instead of | |
| 179 | + // scanning the plugin directory: this hook fires on every request and that scans and | |
| 180 | + // parses every plugin header on disk. | |
| 181 | + $active_plugins = array_merge( | |
| 182 | + (array) get_option( 'active_plugins', [] ), | |
| 183 | + array_keys( (array) get_site_option( 'active_sitewide_plugins', [] ) ) | |
| 184 | + ); | |
| 185 | + foreach ( $active_plugins as $key ) { | |
| 181 | 186 | $is_yaymail_addon = strpos( $key, 'yaymail-addon' ) !== false || strpos( $key, 'email-customizer' ) !== false; |
| 182 | 187 | if ( $is_yaymail_addon ) { |
| 183 | 188 | \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', $key, true ); |
| 184 | 189 | } |