PluginProbe
YayExtra – WooCommerce Extra Product Options / 1.3.1
YayExtra – WooCommerce Extra Product Options v1.3.1
trunk 1.1.4 1.1.5 1.1.8 1.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3 1.3.1 1.3.4 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.5.2 1.5.3 1.5.5 1.5.6 1.5.6.1 All 29 releases
yayextra / yayextra.php

yayextra.php in YayExtra – WooCommerce Extra Product Options 1.3.1, at yayextra.php

94 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: YayExtra Lite - WooCommerce Extra Product Options
4 * Plugin URI: https://yaycommerce.com/yayextra-woocommerce-extra-product-options
5 * Description: Offer extra options like personal engraving, print-on-demand items, gifts, custom canvas prints, and personalized products.
6 * Version: 1.3.1
7 * Author: YayCommerce
8 * Author URI: https://yaycommerce.com
9 * Text Domain: yayextra
10 * WC requires at least: 3.0.0
11 * WC tested up to: 8.5.1
12 * Domain Path: /i18n/languages/
13 */
14
15 namespace YayExtra;
16
17 use YayExtra\Init\Settings;
18
19 defined( 'ABSPATH' ) || exit;
20
21 if ( function_exists( 'YayExtra\\plugins_loaded' ) ) {
22 require_once ABSPATH . '/wp-admin/includes/plugin.php';
23 require_once ABSPATH . WPINC . '/pluggable.php';
24 deactivate_plugins( plugin_basename( __FILE__ ) );
25 require_once plugin_dir_path( __FILE__ ) . 'includes/UpdateVersion.php';
26 return;
27 }
28
29 if ( ! defined( 'YAYE_PLUGIN_FILE' ) ) {
30 define( 'YAYE_PLUGIN_FILE', __FILE__ );
31 }
32
33 if ( ! defined( 'YAYE_PREFIX' ) ) {
34 define( 'YAYE_PREFIX', 'YAYE_' );
35 }
36
37 if ( ! defined( 'YAYE_URL' ) ) {
38 define( 'YAYE_URL', plugin_dir_url( YAYE_PLUGIN_FILE ) );
39 }
40
41 if ( ! defined( 'YAYE_PATH' ) ) {
42 define( 'YAYE_PATH', plugin_dir_path( YAYE_PLUGIN_FILE ) );
43 }
44
45 if ( ! defined( 'YAYE_BASENAME' ) ) {
46 define( 'YAYE_BASENAME', plugin_basename( YAYE_PLUGIN_FILE ) );
47 }
48
49 if ( ! defined( 'YAYE_VERSION' ) ) {
50 define( 'YAYE_VERSION', '1.3.1' );
51 }
52
53 if ( ! defined( 'YAYE_SITE_URL' ) ) {
54 define( 'YAYE_SITE_URL', site_url() );
55 }
56
57 require __DIR__ . '/autoloader.php';
58
59 /**
60 * Callback for plugins_loaded action
61 *
62 * @return void
63 */
64 if ( ! function_exists( 'YayExtra\\plugins_loaded' ) ) {
65 function plugins_loaded() {
66 \YayExtra\YayCommerceMenu\RegisterMenu::get_instance();
67 I18n::getInstance();
68 Settings::get_instance();
69 add_action( 'admin_notices', 'YayExtra\\required_woocommerce_notice' );
70 }
71 }
72
73 if ( ! function_exists( 'required_woocommerce_notice' ) ) {
74 function required_woocommerce_notice() {
75 if ( ! function_exists( 'WC' ) ) :
76 ?>
77 <div class="error">
78 <p>
79 <?php
80 // translators: %s: search WooCommerce plugin link
81 printf( 'YayExtra ' . esc_html__( 'is enabled but not effective. It requires %1$sWooCommerce%2$s in order to work.', 'yayextra' ), '<a href="' . esc_url( admin_url( 'plugin-install.php?s=woocommerce&tab=search&type=term' ) ) . '">', '</a>' );
82 ?>
83 </p>
84 </div>
85 <?php
86 endif;
87 }
88 }
89
90 add_action(
91 'plugins_loaded',
92 'YayExtra\\plugins_loaded'
93 );
94