PluginProbe
YayMail – WooCommerce Email Customizer / 1.9.6
YayMail – WooCommerce Email Customizer v1.9.6
4.4.6 4.4.5 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 All 57 releases
yaymail / yaymail.php

yaymail.php in YayMail – WooCommerce Email Customizer 1.9.6, at yaymail.php

65 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: YayMail - WooCommerce Email Customizer
4 * Plugin URI: https://yaycommerce.com/yaymail-woocommerce-email-customizer/
5 * Description: Create awesome transactional emails with a drag and drop email builder
6 * Version: 1.9.6
7 * Author: YayCommerce
8 * Author URI: https://yaycommerce.com
9 * Text Domain: yaymail
10 * WC requires at least: 3.0.0
11 * WC tested up to: 5.1.0
12 * Domain Path: /i18n/languages/
13 */
14
15 namespace YayMail;
16
17 defined( 'ABSPATH' ) || exit;
18 define( 'YAYMAIL_PREFIX', 'yaymail' );
19 define( 'YAYMAIL_VERSION', '1.9.6' );
20 define( 'YAYMAIL_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
21 define( 'YAYMAIL_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
22 define( 'YAYMAIL_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
23
24 spl_autoload_register(
25 function ( $class ) {
26 $prefix = __NAMESPACE__;
27 $base_dir = __DIR__ . '/includes';
28
29 $len = strlen( $prefix );
30 if ( strncmp( $prefix, $class, $len ) !== 0 ) {
31 return;
32 }
33
34 $relative_class_name = substr( $class, $len );
35
36 $file = $base_dir . str_replace( '\\', '/', $relative_class_name ) . '.php';
37
38 if ( file_exists( $file ) ) {
39 require $file;
40 }
41 }
42 );
43 if ( ! function_exists( 'install_yaymail_admin_notice' ) ) {
44 function install_yaymail_admin_notice() {
45 ?>
46 <div class="error">
47 <p><?php echo 'YayMail ' . __( 'is enabled but not effective. It requires WooCommerce in order to work.', 'yaymail' ); ?></p>
48 </div>
49 <?php
50 }
51 }
52 function init() {
53 if ( ! function_exists( 'WC' ) ) {
54 add_action( 'admin_notices', 'YayMail\\install_yaymail_admin_notice' );
55 }
56 Plugin::getInstance();
57 I18n::getInstance();
58 Page\Settings::getInstance();
59 MailBuilder\WooTemplate::getInstance();
60 }
61 add_action( 'plugins_loaded', 'YayMail\\init' );
62
63 register_activation_hook( __FILE__, array( 'YayMail\\Plugin', 'activate' ) );
64 register_deactivation_hook( __FILE__, array( 'YayMail\\Plugin', 'deactivate' ) );
65