PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / 2.3.2
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant v2.3.2
2.3.2 2.3.1 2.3.0 2.2.8 2.2.7 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.11.0 1.11.1 1.11.2 1.6 1.7 1.8 1.8.1 1.8.2 1.8.3 1.9.0 1.9.1 1.9.10 1.9.11 All 60 releases
← All changes | merchant.php +110 -105 1.9.02.3.2 View file →
@@ -1,105 +1,110 @@
1 -<?php
2 -/**
3 - * Plugin Name: Merchant
4 - * Plugin URI: https://athemes.com
5 - * Description: All-in-one plugin designed to help you grow your WooCommerce store. Pre-orders, Buy Now buttons, product labels, trust badges, payment logos, and more.
6 - * Version: 1.9.0
7 - * Author: aThemes
8 - * Author URI: https://athemes.com
9 - * License: GPLv3 or later License
10 - * License URI: http://www.gnu.org/licenses/gpl-3.0.html
11 - * Text Domain: merchant
12 - * Domain Path: /languages
13 - *
14 - * WC requires at least: 6.0
15 - * WC tested up to: 8.5.1
16 - *
17 - * @package Merchant
18 - * @since 1.0
19 - */
20 -
21 -// Exit if accessed directly.
22 -if ( ! defined( 'ABSPATH' ) ) {
23 - exit;
24 -}
25 -
26 -// Merchant constants.
27 -define( 'MERCHANT_VERSION', '1.9.0' );
28 -define( 'MERCHANT_FILE', __FILE__ );
29 -define( 'MERCHANT_BASE', trailingslashit( plugin_basename( MERCHANT_FILE ) ) );
30 -define( 'MERCHANT_DIR', trailingslashit( plugin_dir_path( MERCHANT_FILE ) ) );
31 -define( 'MERCHANT_URI', trailingslashit( plugins_url( '/', MERCHANT_FILE ) ) );
32 -define( 'MERCHANT_REVIEW_URL', 'https://wordpress.org/support/plugin/merchant/reviews/#new-post' );
33 -
34 -/**
35 - * Merchant class.
36 - *
37 - */
38 -class Merchant {
39 -
40 - /**
41 - * The single class instance.
42 - *
43 - */
44 - private static $instance = null;
45 -
46 - /**
47 - * Instance.
48 - *
49 - */
50 - public static function instance() {
51 - if ( is_null( self::$instance ) ) {
52 - self::$instance = new self();
53 - }
54 - return self::$instance;
55 - }
56 -
57 - /**
58 - * Constructor.
59 - *
60 - */
61 - public function __construct() {
62 -
63 - // Translation.
64 - add_action( 'init', array( $this, 'translation' ) );
65 -
66 - // Declare WooCommerce HPOS Compatibility.
67 - add_action( 'before_woocommerce_init', function() {
68 - if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
69 - \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
70 - }
71 - } );
72 -
73 - // Declare incompatibility with Woo 8.3.0+ cart and checkout blocks.
74 - add_action( 'before_woocommerce_init', function() {
75 - if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) {
76 - \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'cart_checkout_blocks', __FILE__, false );
77 - }
78 - } );
79 -
80 - // Load the plugin functionality.
81 - $this->includes();
82 - }
83 -
84 - /**
85 - * Translation
86 - *
87 - */
88 - public function translation() {
89 - load_plugin_textdomain( 'merchant', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
90 - }
91 -
92 - /**
93 - * Includes.
94 - *
95 - */
96 - public function includes() {
97 - require_once MERCHANT_DIR . 'admin/class-merchant-admin-loader.php';
98 - require_once MERCHANT_DIR . 'inc/class-merchant-loader.php';
99 - }
100 -}
101 -
102 -/**
103 - * Run the plugin.
104 - */
105 -Merchant::instance();
1 +<?php
2 +/**
3 + * Plugin Name: Merchant
4 + * Plugin URI: https://athemes.com/merchant
5 + * Description: All-in-one WooCommerce plugin for pre-orders, product labels, buy now, quick view, discount rules and more.
6 + * Version: 2.3.2
7 + * Author: aThemes
8 + * Author URI: https://athemes.com
9 + * License: GPLv3 or later License
10 + * License URI: http://www.gnu.org/licenses/gpl-3.0.html
11 + * Text Domain: merchant
12 + * Domain Path: /languages
13 + * Requires PHP: 7.4
14 + *
15 + * WC requires at least: 6.0
16 + * WC tested up to: 11.0.0
17 + *
18 + * @package Merchant
19 + * @since 1.0
20 + */
21 +
22 +// Exit if accessed directly.
23 +if ( ! defined( 'ABSPATH' ) ) {
24 + exit;
25 +}
26 +
27 +// Merchant constants.
28 +define( 'MERCHANT_VERSION', '2.3.2' );
29 +define( 'MERCHANT_DB_VERSION', '1.2.0' ); // Update only when the database structure changes. In inc/classes/class-merchant-db-tables.php
30 +define( 'MERCHANT_FILE', __FILE__ );
31 +define( 'MERCHANT_BASE', trailingslashit( plugin_basename( MERCHANT_FILE ) ) );
32 +define( 'MERCHANT_DIR', trailingslashit( plugin_dir_path( MERCHANT_FILE ) ) );
33 +define( 'MERCHANT_URI', trailingslashit( plugins_url( '/', MERCHANT_FILE ) ) );
34 +define( 'MERCHANT_REVIEW_URL', 'https://wordpress.org/support/plugin/merchant/reviews/#new-post' );
35 +
36 +/**
37 + * Merchant class.
38 + *
39 + */
40 +class Merchant {
41 +
42 + /**
43 + * The single class instance.
44 + *
45 + */
46 + private static $instance = null;
47 +
48 + /**
49 + * Instance.
50 + *
51 + */
52 + public static function instance() {
53 + if ( is_null( self::$instance ) ) {
54 + self::$instance = new self();
55 + }
56 + return self::$instance;
57 + }
58 +
59 + /**
60 + * Constructor.
61 + *
62 + */
63 + public function __construct() {
64 +
65 + // Translation.
66 + add_action( 'init', array( $this, 'translation' ) );
67 +
68 + // Declare WooCommerce HPOS Compatibility.
69 + add_action( 'before_woocommerce_init', function() {
70 + if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
71 + \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
72 + }
73 + } );
74 +
75 + // Declare compatibility with Woo cart and checkout blocks.
76 + add_action( 'before_woocommerce_init', function() {
77 + if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) {
78 + \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'cart_checkout_blocks', __FILE__, true );
79 + }
80 + } );
81 +
82 + // Load the plugin functionality.
83 + $this->includes();
84 +
85 + // Initialize the merchant database tables.
86 + Merchant_DB_Tables::init();
87 + }
88 +
89 + /**
90 + * Translation
91 + *
92 + */
93 + public function translation() {
94 + load_plugin_textdomain( 'merchant', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
95 + }
96 +
97 + /**
98 + * Includes.
99 + *
100 + */
101 + public function includes() {
102 + require_once MERCHANT_DIR . 'admin/class-merchant-admin-loader.php';
103 + require_once MERCHANT_DIR . 'inc/class-merchant-loader.php';
104 + }
105 +}
106 +
107 +/**
108 + * Run the plugin.
109 + */
110 +Merchant::instance();