PluginProbe
YayMail – WooCommerce Email Customizer / 4.3.3
YayMail – WooCommerce Email Customizer v4.3.3
4.4.4 4.4.3 4.4.2 4.4.1 trunk 1.9.6 2.1.4 2.1.5 3.2.2 3.2.6 3.2.7.1 3.2.8.1 3.2.9 3.3 3.3.1 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.4 3.4.1 3.4.2 3.4.3 All 55 releases
← All changes | yaymail.php +13 -68 trunk4.3.3 View file →
@@ -2,19 +2,14 @@
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.3.3
7 7 * Author: YayCommerce
8 8 * Author URI: https://yaycommerce.com
9 - * License: GPLv2 or later
10 - * License URI: https://www.gnu.org/licenses/gpl-2.0.html
11 9 * Text Domain: yaymail
12 - * Requires at least: 4.7
13 - * Tested up to: 7.1
14 - * Requires PHP: 5.4
15 10 * WC requires at least: 3.0.0
16 - * WC tested up to: 11.0.1
11 + * WC tested up to: 10.5.1
17 12 * Domain Path: /i18n/languages/
18 13 *
19 14 * @package YayMail
20 15 */
@@ -31,9 +26,9 @@
31 26 define( 'YAYMAIL_DEBUG', false );
32 27 }
33 28
34 29 if ( ! defined( 'YAYMAIL_VERSION' ) ) {
35 - define( 'YAYMAIL_VERSION', '4.4.4' );
30 + define( 'YAYMAIL_VERSION', '4.3.3' );
36 31 }
37 32
38 33 if ( ! defined( 'YAYMAIL_PLUGIN_URL' ) ) {
39 34 define( 'YAYMAIL_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
@@ -54,18 +49,8 @@
54 49 if ( ! defined( 'YAYMAIL_REST_NAMESPACE' ) ) {
55 50 define( 'YAYMAIL_REST_NAMESPACE', 'yaymail/v1' );
56 51 }
57 52
58 -if ( ! defined( 'YAYMAIL_MENU_PRIORITY' ) ) {
59 - define( 'YAYMAIL_MENU_PRIORITY', 100 );
60 -}
61 -
62 -// Lite customizer JS expects a single { global_header_elements, global_footer_elements }
63 -// object, not the multi-language array used by pro. SettingsPage gates on this flag.
64 -if ( ! defined( 'YAYMAIL_LITE_LEGACY_GHF_SHAPE' ) ) {
65 - define( 'YAYMAIL_LITE_LEGACY_GHF_SHAPE', true );
66 -}
67 -
68 53 $yaymail_has_required_deps = true;
69 54 if ( function_exists( 'YayMail\\init' ) ) {
70 55 require_once plugin_dir_path( __FILE__ ) . 'templates/fallbacks/fallback-exists.php';
71 56 $yaymail_has_required_deps = false;
@@ -92,48 +77,10 @@
92 77 // Return early to prevent loading the plugin.
93 78 return;
94 79 }
95 80
96 -require_once __DIR__ . '/vendor/autoload.php';
97 -require_once __DIR__ . '/YaymailPluginAdapter.php';
81 +require_once YAYMAIL_PLUGIN_PATH . 'vendor/autoload.php';
98 82
99 -spl_autoload_register(
100 - function ( $class ) {
101 - $prefix = 'YayMail\\';
102 -
103 - if ( strpos( $class, $prefix ) !== 0 ) {
104 - return;
105 - }
106 -
107 - $relative = substr( $class, strlen( $prefix ) );
108 - $relative_path = str_replace( '\\', '/', $relative ) . '.php';
109 -
110 - $core_file = YAYMAIL_PLUGIN_PATH . 'src/' . $relative_path;
111 -
112 - // Check if yay-wp-pro active
113 - if ( ! function_exists( 'is_plugin_active' ) ) {
114 - require_once ABSPATH . 'wp-admin/includes/plugin.php';
115 - }
116 - $yaymail_wp_pro_plugin_file = 'email-builder-pro/email-builder.php';
117 - $yaymail_wp_pro_active = is_plugin_active( $yaymail_wp_pro_plugin_file ) || is_plugin_active_for_network( $yaymail_wp_pro_plugin_file );
118 -
119 - if ( $yaymail_wp_pro_active && defined( 'YAYWP_PLUGIN_PATH' ) ) {
120 - $core_file = YAYWP_PLUGIN_PATH . 'src/' . $relative_path;
121 - }
122 -
123 - if ( file_exists( $core_file ) ) {
124 - require $core_file;
125 - }
126 - },
127 - true,
128 - true
129 -);
130 -
131 -// Declare this platform so shared core reads platform-specific values from the
132 -// registry instead of detecting the platform inline. Registered after the core
133 -// autoloader above so PlatformRegistry/PlatformInterface resolve, and before Initialize.
134 -\YayMail\Platform\PlatformRegistry::register( new \YayMail\Platform\YaymailPlatform() );
135 -
136 83 /**
137 84 * Initialize constants
138 85 */
139 86 Constants\ConstantsHandler::get_instance();
@@ -140,16 +87,16 @@
140 87
141 88 if ( ! function_exists( 'install_yaymail_admin_notice' ) ) {
142 89 function install_yaymail_admin_notice() {
143 90 ?>
144 -<div class="error">
145 - <p>
146 - <?php
91 + <div class="error">
92 + <p>
93 + <?php
147 94 // translators: %s: search WooCommerce plugin link
148 95 printf( 'YayMail ' . esc_html__( 'is enabled but not effective. It requires %1$sWooCommerce%2$s in order to work.', 'yaymail' ), '<a href="' . esc_url( admin_url( 'plugin-install.php?s=woocommerce&tab=search&type=term' ) ) . '">', '</a>' );
149 - ?>
150 - </p>
151 -</div>
96 + ?>
97 + </p>
98 + </div>
152 99 <?php
153 100 }
154 101 }
155 102
@@ -154,12 +101,10 @@
154 101 }
155 102
156 103 if ( ! function_exists( 'YayMail\\init' ) ) {
157 104 function init() {
158 - \YayMailScoped\YayCommerce\AdminShell\AdminShell::boot();
159 - \YayMailScoped\YayCommerce\AdminShell\AdminShell::register_plugin(
160 - new \YaymailPluginAdapter()
161 - );
105 + \YayMail\YayCommerceMenu\RegisterMenu::get_instance();
106 + \YayMail\License\LicenseHandler::get_instance();
162 107 if ( ! function_exists( 'WC' ) ) {
163 108 add_action( 'admin_notices', 'YayMail\\install_yaymail_admin_notice' );
164 109 } else {
165 110 add_action( 'before_woocommerce_init', 'YayMail\\yaymail_enable_compatible_hpos' );
@@ -191,5 +136,5 @@
191 136 add_action( 'plugins_loaded', 'YayMail\\init' );
192 137 }
193 138
194 139 register_activation_hook( __FILE__, [ \YayMail\Engine\ActDeact::class, 'activate' ] );
195 -register_deactivation_hook( __FILE__, [ \YayMail\Engine\ActDeact::class, 'deactivate' ] );
140 +register_deactivation_hook( __FILE__, [ \YayMail\Engine\ActDeact::class, 'deactivate' ] );