Plugin Directory

Changeset 3003031


Ignore:
Timestamp:
11/29/2023 03:06:55 AM (2 years ago)
Author:
clearpayit
Message:

Release v3.7.2.

Location:
clearpay-gateway-for-woocommerce
Files:
46 added
1 deleted
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • clearpay-gateway-for-woocommerce/tags/3.7.2/clearpay-gateway-for-woocommerce.php

    r2993700 r3003031  
    55 * Author: Clearpay
    66 * Author URI: https://www.clearpay.co.uk/
    7  * Version: 3.7.1
     7 * Version: 3.7.2
    88 * Text Domain: woo_clearpay
    99 * Domain Path: /languages/
    1010 * WC requires at least: 3.2.6
    11  * WC tested up to: 8.2.1
     11 * WC tested up to: 8.3.1
    1212 *
    1313 * Copyright: (c) 2021 Clearpay
     
    4747         *                                          the value in the comments above.
    4848         */
    49         public static $version = '3.7.1';
     49        public static $version = '3.7.2';
    5050
    5151        /**
     
    258258
    259259        public static function register_js_lib() {
     260            if ( ! self::init() ) { return; }
     261
    260262            $instance = WC_Gateway_Clearpay::getInstance();
    261263            $subdomain = $instance->get_api_env() == 'production' ? 'js' : 'js-sandbox';
     
    264266
    265267        public static function register_common_assets() {
     268            if ( ! self::init() ) { return; }
     269
    266270            self::register_js_lib();
    267271
     
    455459            }
    456460
     461            if ( ! self::init() ) {
     462                // WooCommerce is not active.
     463                return;
     464            }
     465
    457466            self::register_js_lib();
    458467
     
    463472                __DIR__ . '/build/product-messaging-block/block.json',
    464473                array(
    465                     'editor_script_handles' => [ 'square_marketplace_js' ],
    466                     'view_script_handles' => [ 'square_marketplace_js' ],
    467474                    'render_callback' => array($instance, 'render_product_messaging_block')
    468475                )
     
    475482             * to check restricted categories, or fetch the skus and categories for analytics.
    476483             */
    477             $cart_messaging_asset = include( plugin_dir_path( __FILE__ ) . 'build/cart-messaging-block/index.asset.php');
    478             wp_register_script( 'clearpay_cart_messaging',
    479                 plugins_url('build/cart-messaging-block/index.js', __FILE__),
     484            $cart_messaging_asset = include( plugin_dir_path( __FILE__ ) . 'build/cart-messaging-block/frontend.asset.php');
     485            wp_register_script(
     486                'clearpay_cart_messaging',
     487                plugins_url('build/cart-messaging-block/frontend.js', __FILE__),
    480488                $cart_messaging_asset['dependencies'],
    481                 $cart_messaging_asset['version'],
     489                $cart_messaging_asset['version'],
    482490                true
    483491            );
     
    489497                __DIR__ . '/build/cart-messaging-block/block.json',
    490498                array(
    491                     'editor_script_handles' => [ 'square_marketplace_js' ],
    492                     'view_script_handles' => [ 'square_marketplace_js' ],
    493499                    'render_callback' => array($instance, 'render_cart_messaging_block')
    494500                )
    495501            );
    496502        }
     503
     504        public static function plugin_dependencies() {
     505            if ( ! function_exists('WC') ) {
     506                // show notice if WooCommerce plugin is not active
     507                add_action('admin_notices', array(get_called_class(), 'admin_notice_dependency_error'));
     508            }
     509        }
     510
     511        public static function admin_notice_dependency_error() {
     512            ?>
     513            <div class="notice notice-error is-dismissible">
     514                <p><?php _e( 'Clearpay Gateway for WooCommerce requires WooCommerce to be installed and active!', 'woo_clearpay' ); ?></p>
     515            </div>
     516            <?php
     517        }
    497518    }
    498519
     
    502523
    503524    add_action( 'init', array('Clearpay_Plugin', 'register_blocks') );
     525    add_action( 'plugins_loaded', array('Clearpay_Plugin', 'plugin_dependencies') );
    504526    add_action( 'plugins_loaded', array('Clearpay_Plugin', 'init'), 10, 0 );
    505527    add_action( 'upgrader_process_complete', array('Clearpay_Plugin', 'upgrade_complete'), 10, 2 );
  • clearpay-gateway-for-woocommerce/tags/3.7.2/readme.txt

    r2993700 r3003031  
    33Tags: woocommerce, clearpay
    44Requires at least: 4.8.3
    5 Tested up to: 6.3.2
    6 Stable tag: 3.7.1
     5Tested up to: 6.4.1
     6Stable tag: 3.7.2
    77License: GNU Public License
    88License URI: https://www.gnu.org/licenses/
     
    4040== Changelog ==
    4141
     42= 3.7.2 =
     43*Release Date: Wednesday, 29 Nov 2023*
     44
     45* Minor bug fixes and performance improvements.
     46* Tested and verified support for WordPress 6.4.1 and WooCommerce 8.3.1.
     47
    4248= 3.7.1 =
    4349*Release Date: Friday, 10 Nov 2023*
  • clearpay-gateway-for-woocommerce/tags/3.7.2/vendor/composer/installed.php

    r2993700 r3003031  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => '2e415c2e31d0d12db85a87aa2c0ff5d86d0c05a7',
     6        'reference' => '638cb91d9b55ad8584bae638de96cc5cd3b7c116',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-master',
    1515            'version' => 'dev-master',
    16             'reference' => '2e415c2e31d0d12db85a87aa2c0ff5d86d0c05a7',
     16            'reference' => '638cb91d9b55ad8584bae638de96cc5cd3b7c116',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
  • clearpay-gateway-for-woocommerce/trunk/clearpay-gateway-for-woocommerce.php

    r2993700 r3003031  
    55 * Author: Clearpay
    66 * Author URI: https://www.clearpay.co.uk/
    7  * Version: 3.7.1
     7 * Version: 3.7.2
    88 * Text Domain: woo_clearpay
    99 * Domain Path: /languages/
    1010 * WC requires at least: 3.2.6
    11  * WC tested up to: 8.2.1
     11 * WC tested up to: 8.3.1
    1212 *
    1313 * Copyright: (c) 2021 Clearpay
     
    4747         *                                          the value in the comments above.
    4848         */
    49         public static $version = '3.7.1';
     49        public static $version = '3.7.2';
    5050
    5151        /**
     
    258258
    259259        public static function register_js_lib() {
     260            if ( ! self::init() ) { return; }
     261
    260262            $instance = WC_Gateway_Clearpay::getInstance();
    261263            $subdomain = $instance->get_api_env() == 'production' ? 'js' : 'js-sandbox';
     
    264266
    265267        public static function register_common_assets() {
     268            if ( ! self::init() ) { return; }
     269
    266270            self::register_js_lib();
    267271
     
    455459            }
    456460
     461            if ( ! self::init() ) {
     462                // WooCommerce is not active.
     463                return;
     464            }
     465
    457466            self::register_js_lib();
    458467
     
    463472                __DIR__ . '/build/product-messaging-block/block.json',
    464473                array(
    465                     'editor_script_handles' => [ 'square_marketplace_js' ],
    466                     'view_script_handles' => [ 'square_marketplace_js' ],
    467474                    'render_callback' => array($instance, 'render_product_messaging_block')
    468475                )
     
    475482             * to check restricted categories, or fetch the skus and categories for analytics.
    476483             */
    477             $cart_messaging_asset = include( plugin_dir_path( __FILE__ ) . 'build/cart-messaging-block/index.asset.php');
    478             wp_register_script( 'clearpay_cart_messaging',
    479                 plugins_url('build/cart-messaging-block/index.js', __FILE__),
     484            $cart_messaging_asset = include( plugin_dir_path( __FILE__ ) . 'build/cart-messaging-block/frontend.asset.php');
     485            wp_register_script(
     486                'clearpay_cart_messaging',
     487                plugins_url('build/cart-messaging-block/frontend.js', __FILE__),
    480488                $cart_messaging_asset['dependencies'],
    481                 $cart_messaging_asset['version'],
     489                $cart_messaging_asset['version'],
    482490                true
    483491            );
     
    489497                __DIR__ . '/build/cart-messaging-block/block.json',
    490498                array(
    491                     'editor_script_handles' => [ 'square_marketplace_js' ],
    492                     'view_script_handles' => [ 'square_marketplace_js' ],
    493499                    'render_callback' => array($instance, 'render_cart_messaging_block')
    494500                )
    495501            );
    496502        }
     503
     504        public static function plugin_dependencies() {
     505            if ( ! function_exists('WC') ) {
     506                // show notice if WooCommerce plugin is not active
     507                add_action('admin_notices', array(get_called_class(), 'admin_notice_dependency_error'));
     508            }
     509        }
     510
     511        public static function admin_notice_dependency_error() {
     512            ?>
     513            <div class="notice notice-error is-dismissible">
     514                <p><?php _e( 'Clearpay Gateway for WooCommerce requires WooCommerce to be installed and active!', 'woo_clearpay' ); ?></p>
     515            </div>
     516            <?php
     517        }
    497518    }
    498519
     
    502523
    503524    add_action( 'init', array('Clearpay_Plugin', 'register_blocks') );
     525    add_action( 'plugins_loaded', array('Clearpay_Plugin', 'plugin_dependencies') );
    504526    add_action( 'plugins_loaded', array('Clearpay_Plugin', 'init'), 10, 0 );
    505527    add_action( 'upgrader_process_complete', array('Clearpay_Plugin', 'upgrade_complete'), 10, 2 );
  • clearpay-gateway-for-woocommerce/trunk/readme.txt

    r2993700 r3003031  
    33Tags: woocommerce, clearpay
    44Requires at least: 4.8.3
    5 Tested up to: 6.3.2
    6 Stable tag: 3.7.1
     5Tested up to: 6.4.1
     6Stable tag: 3.7.2
    77License: GNU Public License
    88License URI: https://www.gnu.org/licenses/
     
    4040== Changelog ==
    4141
     42= 3.7.2 =
     43*Release Date: Wednesday, 29 Nov 2023*
     44
     45* Minor bug fixes and performance improvements.
     46* Tested and verified support for WordPress 6.4.1 and WooCommerce 8.3.1.
     47
    4248= 3.7.1 =
    4349*Release Date: Friday, 10 Nov 2023*
  • clearpay-gateway-for-woocommerce/trunk/vendor/composer/installed.php

    r2993700 r3003031  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => '2e415c2e31d0d12db85a87aa2c0ff5d86d0c05a7',
     6        'reference' => '638cb91d9b55ad8584bae638de96cc5cd3b7c116',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-master',
    1515            'version' => 'dev-master',
    16             'reference' => '2e415c2e31d0d12db85a87aa2c0ff5d86d0c05a7',
     16            'reference' => '638cb91d9b55ad8584bae638de96cc5cd3b7c116',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.