Plugin Directory

Changeset 2986471


Ignore:
Timestamp:
10/31/2023 12:37:39 AM (2 years ago)
Author:
afterpayit
Message:

Release v3.7.0.

Location:
afterpay-gateway-for-woocommerce
Files:
42 added
18 edited
1 copied

Legend:

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

    r2972429 r2986471  
    55 * Author: Afterpay
    66 * Author URI: https://www.afterpay.com/
    7  * Version: 3.6.1
     7 * Version: 3.7.0
    88 * Text Domain: afterpay-gateway-for-woocommerce
    99 * WC requires at least: 3.2.6
    10  * WC tested up to: 8.1.1
     10 * WC tested up to: 8.2.1
    1111 *
    1212 * Copyright: (c) 2020 Afterpay
     
    4646         *                                          the value in the comments above.
    4747         */
    48         public static $version = '3.6.1';
     48        public static $version = '3.7.0';
    4949
    5050        /**
     
    108108            add_filter( 'woocommerce_get_price_html', array($gateway, 'filter_woocommerce_get_price_html'), 10, 2 );
    109109            add_filter( 'woocommerce_gateway_icon', array($gateway, 'filter_woocommerce_gateway_icon'), 10, 2 );
     110            add_filter(
     111                '__experimental_woocommerce_blocks_add_data_attributes_to_namespace',
     112                function ( $allowed_namespaces ) {
     113                    $allowed_namespaces[] = 'afterpay-gateway-for-woocommerce';
     114                    return $allowed_namespaces;
     115                },
     116                10, 1
     117            );
     118
    110119            /**
    111120             * Shortcodes.
     
    199208        public function init_website_assets()
    200209        {
     210            self::register_common_assets();
     211
    201212            $instance = WC_Gateway_Afterpay::getInstance();
    202213
    203             if ($instance->is_enabled()) {
     214            if (is_checkout() && $instance->is_enabled()) {
    204215                $plugin_version = self::$version;
    205216
    206                 /**
    207                  * Register CSS.
    208                  */
    209                 wp_register_style( 'afterpay_css', plugins_url( 'css/afterpay.css', __FILE__ ), array(), $plugin_version );
    210 
    211                 /**
    212                  * Register & Enqueue JS.
    213                  * Note: Admin assets are registered in self::init_admin_assets()
    214                  */
    215                 $subdomain = $instance->get_api_env() == 'production' ? 'js' : 'js-sandbox';
    216                 wp_register_script( 'square_marketplace_js', "https://{$subdomain}.squarecdn.com/square-marketplace.js", array(), null, true );
    217 
    218                 if (is_checkout()) {
    219                     wp_enqueue_style( 'afterpay_css' );
    220                     wp_enqueue_script(
    221                         'afterpay_checkout_page',
    222                         plugins_url('build/afterpay-page-checkout.js', __FILE__),
    223                         ['jquery', 'square_marketplace_js'],
    224                         $plugin_version,
    225                         true
    226                     );
    227                 }
    228 
    229                 if(is_cart()) {
    230                     wp_register_script( 'afterpay_express', plugins_url( 'build/afterpay-express.js', __FILE__ ), array('jquery', 'square_marketplace_js'), $plugin_version, true );
    231                     wp_localize_script( 'afterpay_express', 'afterpay_express_js_config', array(
    232                         'ajaxurl' => admin_url('admin-ajax.php'),
    233                         'ec_start_nonce' => wp_create_nonce("ec_start_nonce"),
    234                         'ec_change_nonce' => wp_create_nonce("ec_change_nonce"),
    235                         'ec_change_shipping_nonce' => wp_create_nonce("ec_change_shipping_nonce"),
    236                         'ec_complete_nonce' => wp_create_nonce("ec_complete_nonce"),
    237                         'country_code' => $instance->get_country_code()
    238                     ) );
    239                 }
     217                wp_enqueue_style( 'afterpay_css' );
     218                wp_enqueue_script(
     219                    'afterpay_checkout_page',
     220                    plugins_url('build/afterpay-page-checkout/index.js', __FILE__),
     221                    ['jquery', 'square_marketplace_js'],
     222                    $plugin_version,
     223                    true
     224                );
    240225            }
    241226        }
     
    249234        public function init_admin_assets($hook)
    250235        {
     236            self::register_common_assets();
     237
    251238            if ( $hook == 'woocommerce_page_wc-settings' &&
    252239                isset($_GET['section']) && $_GET['section'] == 'afterpay'
    253240            ) {
     241                $plugin_version = self::$version;
    254242                $instance = WC_Gateway_Afterpay::getInstance();
    255                 $subdomain = $instance->get_api_env() == 'production' ? 'js' : 'js-sandbox';
    256                 wp_register_script( 'square_marketplace_js', "https://{$subdomain}.squarecdn.com/square-marketplace.js", array(), null, true );
    257 
    258                 wp_enqueue_script( 'afterpay_admin_js', plugins_url( 'build/afterpay-admin.js', __FILE__ ), array('square_marketplace_js'), false, true );
     243
     244                wp_enqueue_script( 'afterpay_admin_js', plugins_url( 'build/afterpay-admin/index.js', __FILE__ ), array('square_marketplace_js'), $plugin_version, true );
    259245                wp_localize_script( 'afterpay_admin_js', 'afterpay_ajax_object', array( 'ajax_url' => admin_url( 'admin-ajax.php' )) );
    260246                wp_localize_script( 'afterpay_admin_js', 'afterpay_config', array(
     
    265251                ) );
    266252            }
     253        }
     254
     255        public static function register_js_lib() {
     256            $instance = WC_Gateway_Afterpay::getInstance();
     257            $subdomain = $instance->get_api_env() == 'production' ? 'js' : 'js-sandbox';
     258            wp_register_script( 'square_marketplace_js', "https://{$subdomain}.squarecdn.com/square-marketplace.js", array(), null, true );
     259        }
     260
     261        public static function register_common_assets() {
     262            self::register_js_lib();
     263
     264            $plugin_version = self::$version;
     265            $instance = WC_Gateway_Afterpay::getInstance();
     266
     267            wp_register_style( 'afterpay_css', plugins_url( 'css/afterpay.css', __FILE__ ), array(), $plugin_version );
     268
     269            wp_register_script( 'afterpay_express', plugins_url( 'build/afterpay-express/index.js', __FILE__ ), array('jquery', 'square_marketplace_js'), $plugin_version, true );
     270            wp_localize_script( 'afterpay_express', 'afterpay_express_js_config', array(
     271                'ajaxurl' => admin_url('admin-ajax.php'),
     272                'ec_start_nonce' => wp_create_nonce("ec_start_nonce"),
     273                'ec_change_nonce' => wp_create_nonce("ec_change_nonce"),
     274                'ec_change_shipping_nonce' => wp_create_nonce("ec_change_shipping_nonce"),
     275                'ec_complete_nonce' => wp_create_nonce("ec_complete_nonce"),
     276                'country_code' => $instance->get_country_code()
     277            ) );
    267278        }
    268279
     
    433444            }
    434445        }
     446
     447        public static function register_blocks() {
     448            if ( ! function_exists( 'register_block_type' ) ) {
     449                // Block editor is not available.
     450                return;
     451            }
     452
     453            self::register_js_lib();
     454
     455            $instance = WC_Gateway_Afterpay::getInstance();
     456
     457            // Register product messaging block
     458            register_block_type(
     459                __DIR__ . '/build/product-messaging-block/block.json',
     460                array(
     461                    'editor_script_handles' => [ 'square_marketplace_js' ],
     462                    'view_script_handles' => [ 'square_marketplace_js' ],
     463                    'render_callback' => array($instance, 'render_product_messaging_block')
     464                )
     465            );
     466
     467            /**
     468             * Register cart messaging block
     469             * Note: Unable to retrieve the WC()->cart object on the server side,
     470             * hence it cannot get the cart total dynamically, or loop through the cart items
     471             * to check restricted categories, or fetch the skus and categories for analytics.
     472             */
     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__),
     476                $cart_messaging_asset['dependencies'],
     477                $cart_messaging_asset['version'],
     478                true
     479            );
     480            wp_localize_script( 'afterpay_cart_messaging','plugin_data', array(
     481                'frontend_is_ready' => $instance->frontend_is_ready(),
     482                'placement_attributes' => $instance->get_cart_placement_attributes(),
     483            ) );
     484            register_block_type(
     485                __DIR__ . '/build/cart-messaging-block/block.json',
     486                array(
     487                    'editor_script_handles' => [ 'square_marketplace_js' ],
     488                    'view_script_handles' => [ 'square_marketplace_js' ],
     489                    'render_callback' => array($instance, 'render_cart_messaging_block')
     490                )
     491            );
     492        }
    435493    }
    436494
     
    439497    register_uninstall_hook( __FILE__, array('Afterpay_Plugin', 'uninstall_plugin') );
    440498
     499    add_action( 'init', array('Afterpay_Plugin', 'register_blocks') );
    441500    add_action( 'plugins_loaded', array('Afterpay_Plugin', 'init'), 10, 0 );
    442501    add_action( 'upgrader_process_complete', array('Afterpay_Plugin', 'upgrade_complete'), 10, 2 );
  • afterpay-gateway-for-woocommerce/tags/3.7.0/class/WC_Gateway_Afterpay.php

    r2972429 r2986471  
    822822         */
    823823        private function cart_products_are_supported() {
    824             if (did_action('wp_loaded')) {
     824            if (did_action('wp_loaded') && WC()->cart) {
    825825                foreach (WC()->cart->get_cart() as $cart_item) {
    826826                    $product = $cart_item['data'];
     
    944944        public function render_express_checkout_on_cart_page() {
    945945            if (
    946                 !isset($this->settings['show-express-on-cart-page']) ||
    947                 $this->settings['show-express-on-cart-page'] != 'yes' ||
    948                 get_woocommerce_currency() != $this->settings['settlement-currency'] ||
    949                 !$this->cart_is_within_limits() ||
    950                 !$this->cart_products_are_supported() ||
    951                 $this->cart_is_virtual()
     946                !$this->express_is_available() ||
     947                !$this->cart_is_within_limits()
    952948            ) {
    953949                return;
     
    962958                'tr' => true,
    963959                'td' => array( 'colspan' => true, 'class' => true, ),
     960                'button' => array( 'id' => true, 'class' => true, 'type' => true, 'disabled' => true, ),
     961                'img' => array( 'src' => true, 'alt' => true, ),
     962            ));
     963        }
     964
     965        public function express_is_available() {
     966            // Need to check cart total separately
     967            return isset($this->settings['show-express-on-cart-page'])
     968                && 'yes' == $this->settings['show-express-on-cart-page']
     969                && get_woocommerce_currency() == $this->settings['settlement-currency']
     970                && $this->cart_products_are_supported()
     971                && !$this->cart_is_virtual();
     972        }
     973
     974        public function get_express_checkout_button_for_block() {
     975            $button_html = str_replace('[THEME]', $this->settings['express-button-theme'], $this->assets['cart_page_express_button']);
     976
     977            return wp_kses($button_html, array(
    964978                'button' => array( 'id' => true, 'class' => true, 'type' => true, 'disabled' => true, ),
    965979                'img' => array( 'src' => true, 'alt' => true, ),
     
    15081522                $address['city'] = $address['suburb'];
    15091523
     1524                $address = apply_filters( 'woocommerce_cart_calculate_shipping_address', $address );
     1525
    15101526                if ( $address['postcode'] && ! WC_Validation::is_postcode( $address['postcode'], $address['country'] ) ) {
    15111527                    throw new Exception( __( 'Please enter a valid postcode / ZIP.', 'woocommerce' ) );
     
    15601576                $customer->save();
    15611577
    1562                 //do_action( 'woocommerce_calculated_shipping' );
     1578                do_action( 'woocommerce_calculated_shipping' );
    15631579
    15641580                WC()->cart->calculate_totals();
     
    15741590                $response = array();
    15751591                $currency = get_woocommerce_currency();
    1576                 $totals = WC()->cart->get_totals();
    1577                 $cart_total = $totals['cart_contents_tax'] + (float)$totals['cart_contents_total'];
    15781592                $maximum = floatval($this->getOrderLimitMax());
    15791593
    15801594                foreach ($methods as $method) {
    1581                     $shipping_cost = (float)$method->get_cost() + $method->get_shipping_tax();
    1582                     $total = $cart_total + $shipping_cost;
    1583 
    1584                     if ($total <= $maximum) {
     1595                    /**
     1596                     * Mimic WC_AJAX::update_shipping_method() to get the correct total amounts.
     1597                     * Mainly for 'Local Pickup' shipping option, because it calculates taxes
     1598                     * based on the base store location by default, and not the customer’s address.
     1599                     */
     1600                    WC()->session->set( 'chosen_shipping_methods', array($method->get_id()) );
     1601                    WC()->cart->calculate_totals();
     1602
     1603                    $shipping_amount = (float)WC()->cart->get_shipping_total(); // without tax
     1604                    $order_amount = (float)WC()->cart->get_total(''); // incl. shipping and taxes
     1605                    $tax_amount = (float)WC()->cart->get_total_tax();
     1606
     1607                    if ($order_amount <= $maximum) {
    15851608                        $response[] = array(
    15861609                            'id' => $method->get_id(),
     
    15881611                            'description' => $method->get_label(),
    15891612                            'shippingAmount' => array(
    1590                                 'amount' => number_format($shipping_cost, 2, '.', ''),
     1613                                'amount' => number_format($shipping_amount, 2, '.', ''),
    15911614                                'currency' => $currency
    15921615                            ),
    15931616                            'orderAmount' => array(
    1594                                 'amount' => number_format($total, 2, '.', ''),
     1617                                'amount' => number_format($order_amount, 2, '.', ''),
     1618                                'currency' => $currency
     1619                            ),
     1620                            'taxAmount' => array(
     1621                                'amount' => number_format($tax_amount, 2, '.', ''),
    15951622                                'currency' => $currency
    15961623                            ),
     
    18371864         */
    18381865        private function cart_is_virtual() {
    1839             foreach ( WC()->cart->get_cart() as $cart_item ) {
    1840                 if (!$cart_item['data']->is_virtual()) {
    1841                     return false;
     1866            if (WC()->cart) {
     1867                foreach ( WC()->cart->get_cart() as $cart_item ) {
     1868                    if (!$cart_item['data']->is_virtual()) {
     1869                        return false;
     1870                    }
    18421871                }
    18431872            }
     
    24172446            return !empty($this->settings[$key]) ? $this->settings[$key] : '';
    24182447        }
     2448
     2449        public function render_product_messaging_block($attributes, $content, $block) {
     2450            $style = "display:block;float:none;clear:both;";
     2451            if (isset($attributes['align'])) {
     2452                $style .= "text-align:{$attributes['align']};";
     2453            }
     2454            $wrapper_attributes = get_block_wrapper_attributes();
     2455
     2456            if (isset($block->context['postId'])) {
     2457                $post_id = $block->context['postId'];
     2458                $product = wc_get_product($post_id);
     2459       
     2460                if ($product) {
     2461                    if (isset($block->context['singleProduct']) && $block->context['singleProduct']) {
     2462                        $context = 'product-pages';
     2463                    } else {
     2464                        $context = 'category-pages';
     2465                    }
     2466                    ob_start();
     2467                    echo "<div {$wrapper_attributes} style={$style}>";
     2468                    $this->render_placement($context, $product);
     2469                    echo "</div>";
     2470                    $markup = ob_get_clean();
     2471                    return $markup;
     2472                }
     2473            }
     2474        }
     2475
     2476        public function render_cart_messaging_block($attributes, $content, $block) {
     2477            $wrapper_attributes = get_block_wrapper_attributes();
     2478            return "<div {$wrapper_attributes}></div>";
     2479        }
     2480
     2481        public function get_cart_placement_attributes() {
     2482            $attributes = [];
     2483
     2484            $attributes['data-mpid'] = $this->get_mpid();
     2485            $attributes['data-currency'] = get_woocommerce_currency();
     2486
     2487            $input = $this->settings['cart-page-placement-attributes'];
     2488            if (preg_match_all('/data(-[a-z]+)+="[^"]+"/', $input, $raw_attributes)) {
     2489                foreach ($raw_attributes[0] as $pair) {
     2490                    if (preg_match('/data(-[a-z]+)+(?==")/', $pair, $key)
     2491                        && preg_match('/(?<==")[^"]+(?=")/', $pair, $value)
     2492                    ) {
     2493                        $attributes[$key[0]] = $value[0];
     2494                    }
     2495                }
     2496            }
     2497            if (!$this->cart_products_are_supported()) {
     2498                $attributes['data-cart-is-eligible'] = 'false';
     2499            }
     2500
     2501            $attributes['data-platform'] = 'WooCommerce';
     2502            $attributes['data-page-type'] = 'cart';
     2503            $attributes['data-item-skus'] = $this->get_cart_item_skus();
     2504            $attributes['data-item-categories'] = $this->get_cart_item_categories();
     2505
     2506            return $attributes;
     2507        }
    24192508    }
    24202509}
  • afterpay-gateway-for-woocommerce/tags/3.7.0/class/WC_Gateway_Afterpay/form_fields.php

    r2959051 r2986471  
    3333        'title'             => __( 'Merchant ID (Production)', 'woo_afterpay' ),
    3434        'type'              => 'text',
     35        'custom_attributes' =>  array(
     36            'environment-field' => 'production'
     37        ),
    3538        'default'           => ''
    3639    ),
     
    3841        'title'             => __( 'Secret Key (Production)', 'woo_afterpay' ),
    3942        'type'              => 'password',
     43        'custom_attributes' =>  array(
     44            'environment-field' => 'production'
     45        ),
    4046        'default'           => ''
    4147    ),
     
    4551        'description'       => __( 'This information is supplied by Afterpay and cannot be edited.', 'woo_afterpay' ),
    4652        'custom_attributes' =>  array(
    47                                     'readonly' => 'true'
    48                                 ),
     53            'readonly' => 'true',
     54            'environment-field' => 'production'
     55        ),
    4956        'default'           => ''
    5057    ),
     
    5259        'title'             => __( 'Merchant ID (Sandbox)', 'woo_afterpay' ),
    5360        'type'              => 'text',
     61        'custom_attributes' =>  array(
     62            'environment-field' => 'sandbox'
     63        ),
    5464        'default'           => ''
    5565    ),
     
    5767        'title'             => __( 'Secret Key (Sandbox)', 'woo_afterpay' ),
    5868        'type'              => 'password',
     69        'custom_attributes' =>  array(
     70            'environment-field' => 'sandbox'
     71        ),
    5972        'default'           => ''
    6073    ),
     
    6477        'description'       => __( 'This information is supplied by Afterpay and cannot be edited.', 'woo_afterpay' ),
    6578        'custom_attributes' =>  array(
    66                                     'readonly' => 'true'
    67                                 ),
     79            'readonly' => 'true',
     80            'environment-field' => 'sandbox'
     81        ),
    6882        'default'           => ''
    6983    ),
  • afterpay-gateway-for-woocommerce/tags/3.7.0/class/WC_Gateway_Afterpay_Blocks_Support.php

    r2959051 r2986471  
    4141     */
    4242    public function get_payment_method_script_handles() {
    43         $asset_path   = WC_GATEWAY_AFTERPAY_PATH . '/build/afterpay-blocks.asset.php';
     43        $asset_path   = WC_GATEWAY_AFTERPAY_PATH . '/build/afterpay-blocks/index.asset.php';
    4444        $version      = Afterpay_Plugin::$version;
    4545        $dependencies = [];
     
    5555        wp_register_script(
    5656            'wc-afterpay-blocks-integration',
    57             WC_GATEWAY_AFTERPAY_URL . '/build/afterpay-blocks.js',
     57            WC_GATEWAY_AFTERPAY_URL . '/build/afterpay-blocks/index.js',
    5858            $dependencies,
    5959            $version,
    6060            true
    6161        );
    62         return [ 'wc-afterpay-blocks-integration' ];
     62        return [ 'wc-afterpay-blocks-integration', 'afterpay_express' ];
    6363    }
    6464
     
    7070    public function get_payment_method_data() {
    7171        $instance = WC_Gateway_Afterpay::getInstance();
    72         wp_enqueue_script('square_marketplace_js');
    7372        wp_enqueue_style( 'afterpay_css' );
    7473        return [
     
    7877            'testmode' => $this->get_setting('testmode'),
    7978            'locale' => $instance->get_js_locale(),
    80             'supports' => $this->get_supported_features()
     79            'supports' => $this->get_supported_features(),
     80            'ec_available' => $instance->express_is_available(),
     81            'ec_button' => $instance->get_express_checkout_button_for_block(),
    8182        ];
    8283    }
  • afterpay-gateway-for-woocommerce/tags/3.7.0/readme.txt

    r2972429 r2986471  
    33Tags: woocommerce, afterpay
    44Requires at least: 4.8.3
    5 Tested up to: 6.3.1
    6 Stable tag: 3.6.1
     5Tested up to: 6.3.2
     6Stable tag: 3.7.0
    77License: GNU Public License
    88License URI: https://www.gnu.org/licenses/
     
    3939
    4040== Changelog ==
     41
     42= 3.7.0 =
     43*Release Date: Tuesday, 31 Oct 2023*
     44
     45* Created messaging block types for product and cart blocks.
     46* Added support for express checkout in cart and checkout blocks.
     47* Tested and verified support for WordPress 6.3.2 and WooCommerce 8.2.1.
    4148
    4249= 3.6.1 =
  • afterpay-gateway-for-woocommerce/tags/3.7.0/vendor/autoload.php

    r2972429 r2986471  
    2323require_once __DIR__ . '/composer/autoload_real.php';
    2424
    25 return ComposerAutoloaderInitd1b79db0b8d59aaf8ea8aa86543d756f::getLoader();
     25return ComposerAutoloaderInit40b20a308214f7ee0fb661161f18ab08::getLoader();
  • afterpay-gateway-for-woocommerce/tags/3.7.0/vendor/composer/autoload_real.php

    r2972429 r2986471  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInitd1b79db0b8d59aaf8ea8aa86543d756f
     5class ComposerAutoloaderInit40b20a308214f7ee0fb661161f18ab08
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInitd1b79db0b8d59aaf8ea8aa86543d756f', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderInit40b20a308214f7ee0fb661161f18ab08', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    27         spl_autoload_unregister(array('ComposerAutoloaderInitd1b79db0b8d59aaf8ea8aa86543d756f', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInit40b20a308214f7ee0fb661161f18ab08', 'loadClassLoader'));
    2828
    2929        require __DIR__ . '/autoload_static.php';
    30         call_user_func(\Composer\Autoload\ComposerStaticInitd1b79db0b8d59aaf8ea8aa86543d756f::getInitializer($loader));
     30        call_user_func(\Composer\Autoload\ComposerStaticInit40b20a308214f7ee0fb661161f18ab08::getInitializer($loader));
    3131
    3232        $loader->register(true);
  • afterpay-gateway-for-woocommerce/tags/3.7.0/vendor/composer/autoload_static.php

    r2972429 r2986471  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInitd1b79db0b8d59aaf8ea8aa86543d756f
     7class ComposerStaticInit40b20a308214f7ee0fb661161f18ab08
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    2828    {
    2929        return \Closure::bind(function () use ($loader) {
    30             $loader->prefixLengthsPsr4 = ComposerStaticInitd1b79db0b8d59aaf8ea8aa86543d756f::$prefixLengthsPsr4;
    31             $loader->prefixDirsPsr4 = ComposerStaticInitd1b79db0b8d59aaf8ea8aa86543d756f::$prefixDirsPsr4;
    32             $loader->classMap = ComposerStaticInitd1b79db0b8d59aaf8ea8aa86543d756f::$classMap;
     30            $loader->prefixLengthsPsr4 = ComposerStaticInit40b20a308214f7ee0fb661161f18ab08::$prefixLengthsPsr4;
     31            $loader->prefixDirsPsr4 = ComposerStaticInit40b20a308214f7ee0fb661161f18ab08::$prefixDirsPsr4;
     32            $loader->classMap = ComposerStaticInit40b20a308214f7ee0fb661161f18ab08::$classMap;
    3333
    3434        }, null, ClassLoader::class);
  • afterpay-gateway-for-woocommerce/tags/3.7.0/vendor/composer/installed.php

    r2972429 r2986471  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => '0fad5e51d0a6de8476a97c6d54bc409bbdf40fe2',
     6        'reference' => '28e7f01931141bac147c154a8b6a043ef9498b8c',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-master',
    1515            'version' => 'dev-master',
    16             'reference' => '0fad5e51d0a6de8476a97c6d54bc409bbdf40fe2',
     16            'reference' => '28e7f01931141bac147c154a8b6a043ef9498b8c',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
  • afterpay-gateway-for-woocommerce/trunk/afterpay-gateway-for-woocommerce.php

    r2972429 r2986471  
    55 * Author: Afterpay
    66 * Author URI: https://www.afterpay.com/
    7  * Version: 3.6.1
     7 * Version: 3.7.0
    88 * Text Domain: afterpay-gateway-for-woocommerce
    99 * WC requires at least: 3.2.6
    10  * WC tested up to: 8.1.1
     10 * WC tested up to: 8.2.1
    1111 *
    1212 * Copyright: (c) 2020 Afterpay
     
    4646         *                                          the value in the comments above.
    4747         */
    48         public static $version = '3.6.1';
     48        public static $version = '3.7.0';
    4949
    5050        /**
     
    108108            add_filter( 'woocommerce_get_price_html', array($gateway, 'filter_woocommerce_get_price_html'), 10, 2 );
    109109            add_filter( 'woocommerce_gateway_icon', array($gateway, 'filter_woocommerce_gateway_icon'), 10, 2 );
     110            add_filter(
     111                '__experimental_woocommerce_blocks_add_data_attributes_to_namespace',
     112                function ( $allowed_namespaces ) {
     113                    $allowed_namespaces[] = 'afterpay-gateway-for-woocommerce';
     114                    return $allowed_namespaces;
     115                },
     116                10, 1
     117            );
     118
    110119            /**
    111120             * Shortcodes.
     
    199208        public function init_website_assets()
    200209        {
     210            self::register_common_assets();
     211
    201212            $instance = WC_Gateway_Afterpay::getInstance();
    202213
    203             if ($instance->is_enabled()) {
     214            if (is_checkout() && $instance->is_enabled()) {
    204215                $plugin_version = self::$version;
    205216
    206                 /**
    207                  * Register CSS.
    208                  */
    209                 wp_register_style( 'afterpay_css', plugins_url( 'css/afterpay.css', __FILE__ ), array(), $plugin_version );
    210 
    211                 /**
    212                  * Register & Enqueue JS.
    213                  * Note: Admin assets are registered in self::init_admin_assets()
    214                  */
    215                 $subdomain = $instance->get_api_env() == 'production' ? 'js' : 'js-sandbox';
    216                 wp_register_script( 'square_marketplace_js', "https://{$subdomain}.squarecdn.com/square-marketplace.js", array(), null, true );
    217 
    218                 if (is_checkout()) {
    219                     wp_enqueue_style( 'afterpay_css' );
    220                     wp_enqueue_script(
    221                         'afterpay_checkout_page',
    222                         plugins_url('build/afterpay-page-checkout.js', __FILE__),
    223                         ['jquery', 'square_marketplace_js'],
    224                         $plugin_version,
    225                         true
    226                     );
    227                 }
    228 
    229                 if(is_cart()) {
    230                     wp_register_script( 'afterpay_express', plugins_url( 'build/afterpay-express.js', __FILE__ ), array('jquery', 'square_marketplace_js'), $plugin_version, true );
    231                     wp_localize_script( 'afterpay_express', 'afterpay_express_js_config', array(
    232                         'ajaxurl' => admin_url('admin-ajax.php'),
    233                         'ec_start_nonce' => wp_create_nonce("ec_start_nonce"),
    234                         'ec_change_nonce' => wp_create_nonce("ec_change_nonce"),
    235                         'ec_change_shipping_nonce' => wp_create_nonce("ec_change_shipping_nonce"),
    236                         'ec_complete_nonce' => wp_create_nonce("ec_complete_nonce"),
    237                         'country_code' => $instance->get_country_code()
    238                     ) );
    239                 }
     217                wp_enqueue_style( 'afterpay_css' );
     218                wp_enqueue_script(
     219                    'afterpay_checkout_page',
     220                    plugins_url('build/afterpay-page-checkout/index.js', __FILE__),
     221                    ['jquery', 'square_marketplace_js'],
     222                    $plugin_version,
     223                    true
     224                );
    240225            }
    241226        }
     
    249234        public function init_admin_assets($hook)
    250235        {
     236            self::register_common_assets();
     237
    251238            if ( $hook == 'woocommerce_page_wc-settings' &&
    252239                isset($_GET['section']) && $_GET['section'] == 'afterpay'
    253240            ) {
     241                $plugin_version = self::$version;
    254242                $instance = WC_Gateway_Afterpay::getInstance();
    255                 $subdomain = $instance->get_api_env() == 'production' ? 'js' : 'js-sandbox';
    256                 wp_register_script( 'square_marketplace_js', "https://{$subdomain}.squarecdn.com/square-marketplace.js", array(), null, true );
    257 
    258                 wp_enqueue_script( 'afterpay_admin_js', plugins_url( 'build/afterpay-admin.js', __FILE__ ), array('square_marketplace_js'), false, true );
     243
     244                wp_enqueue_script( 'afterpay_admin_js', plugins_url( 'build/afterpay-admin/index.js', __FILE__ ), array('square_marketplace_js'), $plugin_version, true );
    259245                wp_localize_script( 'afterpay_admin_js', 'afterpay_ajax_object', array( 'ajax_url' => admin_url( 'admin-ajax.php' )) );
    260246                wp_localize_script( 'afterpay_admin_js', 'afterpay_config', array(
     
    265251                ) );
    266252            }
     253        }
     254
     255        public static function register_js_lib() {
     256            $instance = WC_Gateway_Afterpay::getInstance();
     257            $subdomain = $instance->get_api_env() == 'production' ? 'js' : 'js-sandbox';
     258            wp_register_script( 'square_marketplace_js', "https://{$subdomain}.squarecdn.com/square-marketplace.js", array(), null, true );
     259        }
     260
     261        public static function register_common_assets() {
     262            self::register_js_lib();
     263
     264            $plugin_version = self::$version;
     265            $instance = WC_Gateway_Afterpay::getInstance();
     266
     267            wp_register_style( 'afterpay_css', plugins_url( 'css/afterpay.css', __FILE__ ), array(), $plugin_version );
     268
     269            wp_register_script( 'afterpay_express', plugins_url( 'build/afterpay-express/index.js', __FILE__ ), array('jquery', 'square_marketplace_js'), $plugin_version, true );
     270            wp_localize_script( 'afterpay_express', 'afterpay_express_js_config', array(
     271                'ajaxurl' => admin_url('admin-ajax.php'),
     272                'ec_start_nonce' => wp_create_nonce("ec_start_nonce"),
     273                'ec_change_nonce' => wp_create_nonce("ec_change_nonce"),
     274                'ec_change_shipping_nonce' => wp_create_nonce("ec_change_shipping_nonce"),
     275                'ec_complete_nonce' => wp_create_nonce("ec_complete_nonce"),
     276                'country_code' => $instance->get_country_code()
     277            ) );
    267278        }
    268279
     
    433444            }
    434445        }
     446
     447        public static function register_blocks() {
     448            if ( ! function_exists( 'register_block_type' ) ) {
     449                // Block editor is not available.
     450                return;
     451            }
     452
     453            self::register_js_lib();
     454
     455            $instance = WC_Gateway_Afterpay::getInstance();
     456
     457            // Register product messaging block
     458            register_block_type(
     459                __DIR__ . '/build/product-messaging-block/block.json',
     460                array(
     461                    'editor_script_handles' => [ 'square_marketplace_js' ],
     462                    'view_script_handles' => [ 'square_marketplace_js' ],
     463                    'render_callback' => array($instance, 'render_product_messaging_block')
     464                )
     465            );
     466
     467            /**
     468             * Register cart messaging block
     469             * Note: Unable to retrieve the WC()->cart object on the server side,
     470             * hence it cannot get the cart total dynamically, or loop through the cart items
     471             * to check restricted categories, or fetch the skus and categories for analytics.
     472             */
     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__),
     476                $cart_messaging_asset['dependencies'],
     477                $cart_messaging_asset['version'],
     478                true
     479            );
     480            wp_localize_script( 'afterpay_cart_messaging','plugin_data', array(
     481                'frontend_is_ready' => $instance->frontend_is_ready(),
     482                'placement_attributes' => $instance->get_cart_placement_attributes(),
     483            ) );
     484            register_block_type(
     485                __DIR__ . '/build/cart-messaging-block/block.json',
     486                array(
     487                    'editor_script_handles' => [ 'square_marketplace_js' ],
     488                    'view_script_handles' => [ 'square_marketplace_js' ],
     489                    'render_callback' => array($instance, 'render_cart_messaging_block')
     490                )
     491            );
     492        }
    435493    }
    436494
     
    439497    register_uninstall_hook( __FILE__, array('Afterpay_Plugin', 'uninstall_plugin') );
    440498
     499    add_action( 'init', array('Afterpay_Plugin', 'register_blocks') );
    441500    add_action( 'plugins_loaded', array('Afterpay_Plugin', 'init'), 10, 0 );
    442501    add_action( 'upgrader_process_complete', array('Afterpay_Plugin', 'upgrade_complete'), 10, 2 );
  • afterpay-gateway-for-woocommerce/trunk/class/WC_Gateway_Afterpay.php

    r2972429 r2986471  
    822822         */
    823823        private function cart_products_are_supported() {
    824             if (did_action('wp_loaded')) {
     824            if (did_action('wp_loaded') && WC()->cart) {
    825825                foreach (WC()->cart->get_cart() as $cart_item) {
    826826                    $product = $cart_item['data'];
     
    944944        public function render_express_checkout_on_cart_page() {
    945945            if (
    946                 !isset($this->settings['show-express-on-cart-page']) ||
    947                 $this->settings['show-express-on-cart-page'] != 'yes' ||
    948                 get_woocommerce_currency() != $this->settings['settlement-currency'] ||
    949                 !$this->cart_is_within_limits() ||
    950                 !$this->cart_products_are_supported() ||
    951                 $this->cart_is_virtual()
     946                !$this->express_is_available() ||
     947                !$this->cart_is_within_limits()
    952948            ) {
    953949                return;
     
    962958                'tr' => true,
    963959                'td' => array( 'colspan' => true, 'class' => true, ),
     960                'button' => array( 'id' => true, 'class' => true, 'type' => true, 'disabled' => true, ),
     961                'img' => array( 'src' => true, 'alt' => true, ),
     962            ));
     963        }
     964
     965        public function express_is_available() {
     966            // Need to check cart total separately
     967            return isset($this->settings['show-express-on-cart-page'])
     968                && 'yes' == $this->settings['show-express-on-cart-page']
     969                && get_woocommerce_currency() == $this->settings['settlement-currency']
     970                && $this->cart_products_are_supported()
     971                && !$this->cart_is_virtual();
     972        }
     973
     974        public function get_express_checkout_button_for_block() {
     975            $button_html = str_replace('[THEME]', $this->settings['express-button-theme'], $this->assets['cart_page_express_button']);
     976
     977            return wp_kses($button_html, array(
    964978                'button' => array( 'id' => true, 'class' => true, 'type' => true, 'disabled' => true, ),
    965979                'img' => array( 'src' => true, 'alt' => true, ),
     
    15081522                $address['city'] = $address['suburb'];
    15091523
     1524                $address = apply_filters( 'woocommerce_cart_calculate_shipping_address', $address );
     1525
    15101526                if ( $address['postcode'] && ! WC_Validation::is_postcode( $address['postcode'], $address['country'] ) ) {
    15111527                    throw new Exception( __( 'Please enter a valid postcode / ZIP.', 'woocommerce' ) );
     
    15601576                $customer->save();
    15611577
    1562                 //do_action( 'woocommerce_calculated_shipping' );
     1578                do_action( 'woocommerce_calculated_shipping' );
    15631579
    15641580                WC()->cart->calculate_totals();
     
    15741590                $response = array();
    15751591                $currency = get_woocommerce_currency();
    1576                 $totals = WC()->cart->get_totals();
    1577                 $cart_total = $totals['cart_contents_tax'] + (float)$totals['cart_contents_total'];
    15781592                $maximum = floatval($this->getOrderLimitMax());
    15791593
    15801594                foreach ($methods as $method) {
    1581                     $shipping_cost = (float)$method->get_cost() + $method->get_shipping_tax();
    1582                     $total = $cart_total + $shipping_cost;
    1583 
    1584                     if ($total <= $maximum) {
     1595                    /**
     1596                     * Mimic WC_AJAX::update_shipping_method() to get the correct total amounts.
     1597                     * Mainly for 'Local Pickup' shipping option, because it calculates taxes
     1598                     * based on the base store location by default, and not the customer’s address.
     1599                     */
     1600                    WC()->session->set( 'chosen_shipping_methods', array($method->get_id()) );
     1601                    WC()->cart->calculate_totals();
     1602
     1603                    $shipping_amount = (float)WC()->cart->get_shipping_total(); // without tax
     1604                    $order_amount = (float)WC()->cart->get_total(''); // incl. shipping and taxes
     1605                    $tax_amount = (float)WC()->cart->get_total_tax();
     1606
     1607                    if ($order_amount <= $maximum) {
    15851608                        $response[] = array(
    15861609                            'id' => $method->get_id(),
     
    15881611                            'description' => $method->get_label(),
    15891612                            'shippingAmount' => array(
    1590                                 'amount' => number_format($shipping_cost, 2, '.', ''),
     1613                                'amount' => number_format($shipping_amount, 2, '.', ''),
    15911614                                'currency' => $currency
    15921615                            ),
    15931616                            'orderAmount' => array(
    1594                                 'amount' => number_format($total, 2, '.', ''),
     1617                                'amount' => number_format($order_amount, 2, '.', ''),
     1618                                'currency' => $currency
     1619                            ),
     1620                            'taxAmount' => array(
     1621                                'amount' => number_format($tax_amount, 2, '.', ''),
    15951622                                'currency' => $currency
    15961623                            ),
     
    18371864         */
    18381865        private function cart_is_virtual() {
    1839             foreach ( WC()->cart->get_cart() as $cart_item ) {
    1840                 if (!$cart_item['data']->is_virtual()) {
    1841                     return false;
     1866            if (WC()->cart) {
     1867                foreach ( WC()->cart->get_cart() as $cart_item ) {
     1868                    if (!$cart_item['data']->is_virtual()) {
     1869                        return false;
     1870                    }
    18421871                }
    18431872            }
     
    24172446            return !empty($this->settings[$key]) ? $this->settings[$key] : '';
    24182447        }
     2448
     2449        public function render_product_messaging_block($attributes, $content, $block) {
     2450            $style = "display:block;float:none;clear:both;";
     2451            if (isset($attributes['align'])) {
     2452                $style .= "text-align:{$attributes['align']};";
     2453            }
     2454            $wrapper_attributes = get_block_wrapper_attributes();
     2455
     2456            if (isset($block->context['postId'])) {
     2457                $post_id = $block->context['postId'];
     2458                $product = wc_get_product($post_id);
     2459       
     2460                if ($product) {
     2461                    if (isset($block->context['singleProduct']) && $block->context['singleProduct']) {
     2462                        $context = 'product-pages';
     2463                    } else {
     2464                        $context = 'category-pages';
     2465                    }
     2466                    ob_start();
     2467                    echo "<div {$wrapper_attributes} style={$style}>";
     2468                    $this->render_placement($context, $product);
     2469                    echo "</div>";
     2470                    $markup = ob_get_clean();
     2471                    return $markup;
     2472                }
     2473            }
     2474        }
     2475
     2476        public function render_cart_messaging_block($attributes, $content, $block) {
     2477            $wrapper_attributes = get_block_wrapper_attributes();
     2478            return "<div {$wrapper_attributes}></div>";
     2479        }
     2480
     2481        public function get_cart_placement_attributes() {
     2482            $attributes = [];
     2483
     2484            $attributes['data-mpid'] = $this->get_mpid();
     2485            $attributes['data-currency'] = get_woocommerce_currency();
     2486
     2487            $input = $this->settings['cart-page-placement-attributes'];
     2488            if (preg_match_all('/data(-[a-z]+)+="[^"]+"/', $input, $raw_attributes)) {
     2489                foreach ($raw_attributes[0] as $pair) {
     2490                    if (preg_match('/data(-[a-z]+)+(?==")/', $pair, $key)
     2491                        && preg_match('/(?<==")[^"]+(?=")/', $pair, $value)
     2492                    ) {
     2493                        $attributes[$key[0]] = $value[0];
     2494                    }
     2495                }
     2496            }
     2497            if (!$this->cart_products_are_supported()) {
     2498                $attributes['data-cart-is-eligible'] = 'false';
     2499            }
     2500
     2501            $attributes['data-platform'] = 'WooCommerce';
     2502            $attributes['data-page-type'] = 'cart';
     2503            $attributes['data-item-skus'] = $this->get_cart_item_skus();
     2504            $attributes['data-item-categories'] = $this->get_cart_item_categories();
     2505
     2506            return $attributes;
     2507        }
    24192508    }
    24202509}
  • afterpay-gateway-for-woocommerce/trunk/class/WC_Gateway_Afterpay/form_fields.php

    r2959051 r2986471  
    3333        'title'             => __( 'Merchant ID (Production)', 'woo_afterpay' ),
    3434        'type'              => 'text',
     35        'custom_attributes' =>  array(
     36            'environment-field' => 'production'
     37        ),
    3538        'default'           => ''
    3639    ),
     
    3841        'title'             => __( 'Secret Key (Production)', 'woo_afterpay' ),
    3942        'type'              => 'password',
     43        'custom_attributes' =>  array(
     44            'environment-field' => 'production'
     45        ),
    4046        'default'           => ''
    4147    ),
     
    4551        'description'       => __( 'This information is supplied by Afterpay and cannot be edited.', 'woo_afterpay' ),
    4652        'custom_attributes' =>  array(
    47                                     'readonly' => 'true'
    48                                 ),
     53            'readonly' => 'true',
     54            'environment-field' => 'production'
     55        ),
    4956        'default'           => ''
    5057    ),
     
    5259        'title'             => __( 'Merchant ID (Sandbox)', 'woo_afterpay' ),
    5360        'type'              => 'text',
     61        'custom_attributes' =>  array(
     62            'environment-field' => 'sandbox'
     63        ),
    5464        'default'           => ''
    5565    ),
     
    5767        'title'             => __( 'Secret Key (Sandbox)', 'woo_afterpay' ),
    5868        'type'              => 'password',
     69        'custom_attributes' =>  array(
     70            'environment-field' => 'sandbox'
     71        ),
    5972        'default'           => ''
    6073    ),
     
    6477        'description'       => __( 'This information is supplied by Afterpay and cannot be edited.', 'woo_afterpay' ),
    6578        'custom_attributes' =>  array(
    66                                     'readonly' => 'true'
    67                                 ),
     79            'readonly' => 'true',
     80            'environment-field' => 'sandbox'
     81        ),
    6882        'default'           => ''
    6983    ),
  • afterpay-gateway-for-woocommerce/trunk/class/WC_Gateway_Afterpay_Blocks_Support.php

    r2959051 r2986471  
    4141     */
    4242    public function get_payment_method_script_handles() {
    43         $asset_path   = WC_GATEWAY_AFTERPAY_PATH . '/build/afterpay-blocks.asset.php';
     43        $asset_path   = WC_GATEWAY_AFTERPAY_PATH . '/build/afterpay-blocks/index.asset.php';
    4444        $version      = Afterpay_Plugin::$version;
    4545        $dependencies = [];
     
    5555        wp_register_script(
    5656            'wc-afterpay-blocks-integration',
    57             WC_GATEWAY_AFTERPAY_URL . '/build/afterpay-blocks.js',
     57            WC_GATEWAY_AFTERPAY_URL . '/build/afterpay-blocks/index.js',
    5858            $dependencies,
    5959            $version,
    6060            true
    6161        );
    62         return [ 'wc-afterpay-blocks-integration' ];
     62        return [ 'wc-afterpay-blocks-integration', 'afterpay_express' ];
    6363    }
    6464
     
    7070    public function get_payment_method_data() {
    7171        $instance = WC_Gateway_Afterpay::getInstance();
    72         wp_enqueue_script('square_marketplace_js');
    7372        wp_enqueue_style( 'afterpay_css' );
    7473        return [
     
    7877            'testmode' => $this->get_setting('testmode'),
    7978            'locale' => $instance->get_js_locale(),
    80             'supports' => $this->get_supported_features()
     79            'supports' => $this->get_supported_features(),
     80            'ec_available' => $instance->express_is_available(),
     81            'ec_button' => $instance->get_express_checkout_button_for_block(),
    8182        ];
    8283    }
  • afterpay-gateway-for-woocommerce/trunk/readme.txt

    r2972429 r2986471  
    33Tags: woocommerce, afterpay
    44Requires at least: 4.8.3
    5 Tested up to: 6.3.1
    6 Stable tag: 3.6.1
     5Tested up to: 6.3.2
     6Stable tag: 3.7.0
    77License: GNU Public License
    88License URI: https://www.gnu.org/licenses/
     
    3939
    4040== Changelog ==
     41
     42= 3.7.0 =
     43*Release Date: Tuesday, 31 Oct 2023*
     44
     45* Created messaging block types for product and cart blocks.
     46* Added support for express checkout in cart and checkout blocks.
     47* Tested and verified support for WordPress 6.3.2 and WooCommerce 8.2.1.
    4148
    4249= 3.6.1 =
  • afterpay-gateway-for-woocommerce/trunk/vendor/autoload.php

    r2972429 r2986471  
    2323require_once __DIR__ . '/composer/autoload_real.php';
    2424
    25 return ComposerAutoloaderInitd1b79db0b8d59aaf8ea8aa86543d756f::getLoader();
     25return ComposerAutoloaderInit40b20a308214f7ee0fb661161f18ab08::getLoader();
  • afterpay-gateway-for-woocommerce/trunk/vendor/composer/autoload_real.php

    r2972429 r2986471  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInitd1b79db0b8d59aaf8ea8aa86543d756f
     5class ComposerAutoloaderInit40b20a308214f7ee0fb661161f18ab08
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInitd1b79db0b8d59aaf8ea8aa86543d756f', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderInit40b20a308214f7ee0fb661161f18ab08', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    27         spl_autoload_unregister(array('ComposerAutoloaderInitd1b79db0b8d59aaf8ea8aa86543d756f', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInit40b20a308214f7ee0fb661161f18ab08', 'loadClassLoader'));
    2828
    2929        require __DIR__ . '/autoload_static.php';
    30         call_user_func(\Composer\Autoload\ComposerStaticInitd1b79db0b8d59aaf8ea8aa86543d756f::getInitializer($loader));
     30        call_user_func(\Composer\Autoload\ComposerStaticInit40b20a308214f7ee0fb661161f18ab08::getInitializer($loader));
    3131
    3232        $loader->register(true);
  • afterpay-gateway-for-woocommerce/trunk/vendor/composer/autoload_static.php

    r2972429 r2986471  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInitd1b79db0b8d59aaf8ea8aa86543d756f
     7class ComposerStaticInit40b20a308214f7ee0fb661161f18ab08
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    2828    {
    2929        return \Closure::bind(function () use ($loader) {
    30             $loader->prefixLengthsPsr4 = ComposerStaticInitd1b79db0b8d59aaf8ea8aa86543d756f::$prefixLengthsPsr4;
    31             $loader->prefixDirsPsr4 = ComposerStaticInitd1b79db0b8d59aaf8ea8aa86543d756f::$prefixDirsPsr4;
    32             $loader->classMap = ComposerStaticInitd1b79db0b8d59aaf8ea8aa86543d756f::$classMap;
     30            $loader->prefixLengthsPsr4 = ComposerStaticInit40b20a308214f7ee0fb661161f18ab08::$prefixLengthsPsr4;
     31            $loader->prefixDirsPsr4 = ComposerStaticInit40b20a308214f7ee0fb661161f18ab08::$prefixDirsPsr4;
     32            $loader->classMap = ComposerStaticInit40b20a308214f7ee0fb661161f18ab08::$classMap;
    3333
    3434        }, null, ClassLoader::class);
  • afterpay-gateway-for-woocommerce/trunk/vendor/composer/installed.php

    r2972429 r2986471  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => '0fad5e51d0a6de8476a97c6d54bc409bbdf40fe2',
     6        'reference' => '28e7f01931141bac147c154a8b6a043ef9498b8c',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-master',
    1515            'version' => 'dev-master',
    16             'reference' => '0fad5e51d0a6de8476a97c6d54bc409bbdf40fe2',
     16            'reference' => '28e7f01931141bac147c154a8b6a043ef9498b8c',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.