Plugin Directory

Changeset 3003030


Ignore:
Timestamp:
11/29/2023 03:03:01 AM (2 years ago)
Author:
afterpayit
Message:

Release v3.7.2.

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

Legend:

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

    r2993698 r3003030  
    55 * Author: Afterpay
    66 * Author URI: https://www.afterpay.com/
    7  * Version: 3.7.1
     7 * Version: 3.7.2
    88 * Text Domain: afterpay-gateway-for-woocommerce
    99 * WC requires at least: 3.2.6
    10  * WC tested up to: 8.2.1
     10 * WC tested up to: 8.3.1
    1111 *
    1212 * Copyright: (c) 2020 Afterpay
     
    4646         *                                          the value in the comments above.
    4747         */
    48         public static $version = '3.7.1';
     48        public static $version = '3.7.2';
    4949
    5050        /**
     
    254254
    255255        public static function register_js_lib() {
     256            if ( ! self::init() ) { return; }
     257
    256258            $instance = WC_Gateway_Afterpay::getInstance();
    257259            $subdomain = $instance->get_api_env() == 'production' ? 'js' : 'js-sandbox';
     
    260262
    261263        public static function register_common_assets() {
     264            if ( ! self::init() ) { return; }
     265
    262266            self::register_js_lib();
    263267
     
    451455            }
    452456
     457            if ( ! self::init() ) {
     458                // WooCommerce is not active.
     459                return;
     460            }
     461
    453462            self::register_js_lib();
    454463
     
    459468                __DIR__ . '/build/product-messaging-block/block.json',
    460469                array(
    461                     'editor_script_handles' => [ 'square_marketplace_js' ],
    462                     'view_script_handles' => [ 'square_marketplace_js' ],
    463470                    'render_callback' => array($instance, 'render_product_messaging_block')
    464471                )
     
    471478             * to check restricted categories, or fetch the skus and categories for analytics.
    472479             */
    473             $cart_messaging_asset = include( plugin_dir_path( __FILE__ ) . 'build/cart-messaging-block/index.asset.php');
    474             wp_register_script( 'afterpay_cart_messaging',
    475                 plugins_url('build/cart-messaging-block/index.js', __FILE__),
     480            $cart_messaging_asset = include( plugin_dir_path( __FILE__ ) . 'build/cart-messaging-block/frontend.asset.php');
     481            wp_register_script(
     482                'afterpay_cart_messaging',
     483                plugins_url('build/cart-messaging-block/frontend.js', __FILE__),
    476484                $cart_messaging_asset['dependencies'],
    477                 $cart_messaging_asset['version'],
     485                $cart_messaging_asset['version'],
    478486                true
    479487            );
     
    485493                __DIR__ . '/build/cart-messaging-block/block.json',
    486494                array(
    487                     'editor_script_handles' => [ 'square_marketplace_js' ],
    488                     'view_script_handles' => [ 'square_marketplace_js' ],
    489495                    'render_callback' => array($instance, 'render_cart_messaging_block')
    490496                )
    491497            );
    492498        }
     499
     500        public static function plugin_dependencies() {
     501            if ( ! function_exists('WC') ) {
     502                // show notice if WooCommerce plugin is not active
     503                add_action('admin_notices', array(get_called_class(), 'admin_notice_dependency_error'));
     504            }
     505        }
     506
     507        public static function admin_notice_dependency_error() {
     508            ?>
     509            <div class="notice notice-error is-dismissible">
     510                <p><?php _e( 'Afterpay Gateway for WooCommerce requires WooCommerce to be installed and active!', 'woo_afterpay' ); ?></p>
     511            </div>
     512            <?php
     513        }
    493514    }
    494515
     
    498519
    499520    add_action( 'init', array('Afterpay_Plugin', 'register_blocks') );
     521    add_action( 'plugins_loaded', array('Afterpay_Plugin', 'plugin_dependencies') );
    500522    add_action( 'plugins_loaded', array('Afterpay_Plugin', 'init'), 10, 0 );
    501523    add_action( 'upgrader_process_complete', array('Afterpay_Plugin', 'upgrade_complete'), 10, 2 );
  • afterpay-gateway-for-woocommerce/tags/3.7.2/readme.txt

    r2993698 r3003030  
    33Tags: woocommerce, afterpay
    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/
     
    3939
    4040== Changelog ==
     41
     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.
    4147
    4248= 3.7.1 =
  • afterpay-gateway-for-woocommerce/tags/3.7.2/vendor/composer/installed.php

    r2993698 r3003030  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => 'b38a630c101a0b9eb5fa46ec7bb443f6c73972cd',
     6        'reference' => 'd2e0bbe033fb5ad201a731e6032da7e4ac9c3456',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-master',
    1515            'version' => 'dev-master',
    16             'reference' => 'b38a630c101a0b9eb5fa46ec7bb443f6c73972cd',
     16            'reference' => 'd2e0bbe033fb5ad201a731e6032da7e4ac9c3456',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
  • afterpay-gateway-for-woocommerce/trunk/afterpay-gateway-for-woocommerce.php

    r2993698 r3003030  
    55 * Author: Afterpay
    66 * Author URI: https://www.afterpay.com/
    7  * Version: 3.7.1
     7 * Version: 3.7.2
    88 * Text Domain: afterpay-gateway-for-woocommerce
    99 * WC requires at least: 3.2.6
    10  * WC tested up to: 8.2.1
     10 * WC tested up to: 8.3.1
    1111 *
    1212 * Copyright: (c) 2020 Afterpay
     
    4646         *                                          the value in the comments above.
    4747         */
    48         public static $version = '3.7.1';
     48        public static $version = '3.7.2';
    4949
    5050        /**
     
    254254
    255255        public static function register_js_lib() {
     256            if ( ! self::init() ) { return; }
     257
    256258            $instance = WC_Gateway_Afterpay::getInstance();
    257259            $subdomain = $instance->get_api_env() == 'production' ? 'js' : 'js-sandbox';
     
    260262
    261263        public static function register_common_assets() {
     264            if ( ! self::init() ) { return; }
     265
    262266            self::register_js_lib();
    263267
     
    451455            }
    452456
     457            if ( ! self::init() ) {
     458                // WooCommerce is not active.
     459                return;
     460            }
     461
    453462            self::register_js_lib();
    454463
     
    459468                __DIR__ . '/build/product-messaging-block/block.json',
    460469                array(
    461                     'editor_script_handles' => [ 'square_marketplace_js' ],
    462                     'view_script_handles' => [ 'square_marketplace_js' ],
    463470                    'render_callback' => array($instance, 'render_product_messaging_block')
    464471                )
     
    471478             * to check restricted categories, or fetch the skus and categories for analytics.
    472479             */
    473             $cart_messaging_asset = include( plugin_dir_path( __FILE__ ) . 'build/cart-messaging-block/index.asset.php');
    474             wp_register_script( 'afterpay_cart_messaging',
    475                 plugins_url('build/cart-messaging-block/index.js', __FILE__),
     480            $cart_messaging_asset = include( plugin_dir_path( __FILE__ ) . 'build/cart-messaging-block/frontend.asset.php');
     481            wp_register_script(
     482                'afterpay_cart_messaging',
     483                plugins_url('build/cart-messaging-block/frontend.js', __FILE__),
    476484                $cart_messaging_asset['dependencies'],
    477                 $cart_messaging_asset['version'],
     485                $cart_messaging_asset['version'],
    478486                true
    479487            );
     
    485493                __DIR__ . '/build/cart-messaging-block/block.json',
    486494                array(
    487                     'editor_script_handles' => [ 'square_marketplace_js' ],
    488                     'view_script_handles' => [ 'square_marketplace_js' ],
    489495                    'render_callback' => array($instance, 'render_cart_messaging_block')
    490496                )
    491497            );
    492498        }
     499
     500        public static function plugin_dependencies() {
     501            if ( ! function_exists('WC') ) {
     502                // show notice if WooCommerce plugin is not active
     503                add_action('admin_notices', array(get_called_class(), 'admin_notice_dependency_error'));
     504            }
     505        }
     506
     507        public static function admin_notice_dependency_error() {
     508            ?>
     509            <div class="notice notice-error is-dismissible">
     510                <p><?php _e( 'Afterpay Gateway for WooCommerce requires WooCommerce to be installed and active!', 'woo_afterpay' ); ?></p>
     511            </div>
     512            <?php
     513        }
    493514    }
    494515
     
    498519
    499520    add_action( 'init', array('Afterpay_Plugin', 'register_blocks') );
     521    add_action( 'plugins_loaded', array('Afterpay_Plugin', 'plugin_dependencies') );
    500522    add_action( 'plugins_loaded', array('Afterpay_Plugin', 'init'), 10, 0 );
    501523    add_action( 'upgrader_process_complete', array('Afterpay_Plugin', 'upgrade_complete'), 10, 2 );
  • afterpay-gateway-for-woocommerce/trunk/readme.txt

    r2993698 r3003030  
    33Tags: woocommerce, afterpay
    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/
     
    3939
    4040== Changelog ==
     41
     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.
    4147
    4248= 3.7.1 =
  • afterpay-gateway-for-woocommerce/trunk/vendor/composer/installed.php

    r2993698 r3003030  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => 'b38a630c101a0b9eb5fa46ec7bb443f6c73972cd',
     6        'reference' => 'd2e0bbe033fb5ad201a731e6032da7e4ac9c3456',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-master',
    1515            'version' => 'dev-master',
    16             'reference' => 'b38a630c101a0b9eb5fa46ec7bb443f6c73972cd',
     16            'reference' => 'd2e0bbe033fb5ad201a731e6032da7e4ac9c3456',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.