Changeset 2986472
- Timestamp:
- 10/31/2023 12:46:39 AM (2 years ago)
- Location:
- clearpay-gateway-for-woocommerce
- Files:
-
- 42 added
- 18 edited
- 1 copied
-
tags/3.7.0 (copied) (copied from clearpay-gateway-for-woocommerce/trunk)
-
tags/3.7.0/build (added)
-
tags/3.7.0/build/cart-messaging-block (added)
-
tags/3.7.0/build/cart-messaging-block/block.json (added)
-
tags/3.7.0/build/cart-messaging-block/index.asset.php (added)
-
tags/3.7.0/build/cart-messaging-block/index.js (added)
-
tags/3.7.0/build/clearpay-admin (added)
-
tags/3.7.0/build/clearpay-admin/index.asset.php (added)
-
tags/3.7.0/build/clearpay-admin/index.js (added)
-
tags/3.7.0/build/clearpay-blocks (added)
-
tags/3.7.0/build/clearpay-blocks/index.asset.php (added)
-
tags/3.7.0/build/clearpay-blocks/index.js (added)
-
tags/3.7.0/build/clearpay-express (added)
-
tags/3.7.0/build/clearpay-express/index.asset.php (added)
-
tags/3.7.0/build/clearpay-express/index.js (added)
-
tags/3.7.0/build/clearpay-page-checkout (added)
-
tags/3.7.0/build/clearpay-page-checkout/index.asset.php (added)
-
tags/3.7.0/build/clearpay-page-checkout/index.js (added)
-
tags/3.7.0/build/product-messaging-block (added)
-
tags/3.7.0/build/product-messaging-block/block.json (added)
-
tags/3.7.0/build/product-messaging-block/index.asset.php (added)
-
tags/3.7.0/build/product-messaging-block/index.js (added)
-
tags/3.7.0/class/WC_Gateway_Clearpay.php (modified) (9 diffs)
-
tags/3.7.0/class/WC_Gateway_Clearpay/form_fields.php (modified) (6 diffs)
-
tags/3.7.0/class/WC_Gateway_Clearpay_Blocks_Support.php (modified) (4 diffs)
-
tags/3.7.0/clearpay-gateway-for-woocommerce.php (modified) (8 diffs)
-
tags/3.7.0/readme.txt (modified) (2 diffs)
-
tags/3.7.0/vendor/autoload.php (modified) (1 diff)
-
tags/3.7.0/vendor/composer/autoload_real.php (modified) (2 diffs)
-
tags/3.7.0/vendor/composer/autoload_static.php (modified) (2 diffs)
-
tags/3.7.0/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/build (added)
-
trunk/build/cart-messaging-block (added)
-
trunk/build/cart-messaging-block/block.json (added)
-
trunk/build/cart-messaging-block/index.asset.php (added)
-
trunk/build/cart-messaging-block/index.js (added)
-
trunk/build/clearpay-admin (added)
-
trunk/build/clearpay-admin/index.asset.php (added)
-
trunk/build/clearpay-admin/index.js (added)
-
trunk/build/clearpay-blocks (added)
-
trunk/build/clearpay-blocks/index.asset.php (added)
-
trunk/build/clearpay-blocks/index.js (added)
-
trunk/build/clearpay-express (added)
-
trunk/build/clearpay-express/index.asset.php (added)
-
trunk/build/clearpay-express/index.js (added)
-
trunk/build/clearpay-page-checkout (added)
-
trunk/build/clearpay-page-checkout/index.asset.php (added)
-
trunk/build/clearpay-page-checkout/index.js (added)
-
trunk/build/product-messaging-block (added)
-
trunk/build/product-messaging-block/block.json (added)
-
trunk/build/product-messaging-block/index.asset.php (added)
-
trunk/build/product-messaging-block/index.js (added)
-
trunk/class/WC_Gateway_Clearpay.php (modified) (9 diffs)
-
trunk/class/WC_Gateway_Clearpay/form_fields.php (modified) (6 diffs)
-
trunk/class/WC_Gateway_Clearpay_Blocks_Support.php (modified) (4 diffs)
-
trunk/clearpay-gateway-for-woocommerce.php (modified) (8 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_real.php (modified) (2 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (2 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
clearpay-gateway-for-woocommerce/tags/3.7.0/class/WC_Gateway_Clearpay.php
r2972430 r2986472 817 817 */ 818 818 private function cart_products_are_supported() { 819 if (did_action('wp_loaded') ) {819 if (did_action('wp_loaded') && WC()->cart) { 820 820 foreach (WC()->cart->get_cart() as $cart_item) { 821 821 $product = $cart_item['data']; … … 939 939 public function render_express_checkout_on_cart_page() { 940 940 if ( 941 !isset($this->settings['show-express-on-cart-page']) || 942 $this->settings['show-express-on-cart-page'] != 'yes' || 943 get_woocommerce_currency() != $this->settings['settlement-currency'] || 944 !$this->cart_is_within_limits() || 945 !$this->cart_products_are_supported() || 946 $this->cart_is_virtual() 941 !$this->express_is_available() || 942 !$this->cart_is_within_limits() 947 943 ) { 948 944 return; … … 957 953 'tr' => true, 958 954 'td' => array( 'colspan' => true, 'class' => true, ), 955 'button' => array( 'id' => true, 'class' => true, 'type' => true, 'disabled' => true, ), 956 'img' => array( 'src' => true, 'alt' => true, ), 957 )); 958 } 959 960 public function express_is_available() { 961 // Need to check cart total separately 962 return isset($this->settings['show-express-on-cart-page']) 963 && 'yes' == $this->settings['show-express-on-cart-page'] 964 && get_woocommerce_currency() == $this->settings['settlement-currency'] 965 && $this->cart_products_are_supported() 966 && !$this->cart_is_virtual(); 967 } 968 969 public function get_express_checkout_button_for_block() { 970 $button_html = str_replace('[THEME]', $this->settings['express-button-theme'], $this->assets['cart_page_express_button']); 971 972 return wp_kses($button_html, array( 959 973 'button' => array( 'id' => true, 'class' => true, 'type' => true, 'disabled' => true, ), 960 974 'img' => array( 'src' => true, 'alt' => true, ), … … 1500 1514 $address['city'] = $address['suburb']; 1501 1515 1516 $address = apply_filters( 'woocommerce_cart_calculate_shipping_address', $address ); 1517 1502 1518 if ( $address['postcode'] && ! WC_Validation::is_postcode( $address['postcode'], $address['country'] ) ) { 1503 1519 throw new Exception( __( 'Please enter a valid postcode / ZIP.', 'woocommerce' ) ); … … 1552 1568 $customer->save(); 1553 1569 1554 //do_action( 'woocommerce_calculated_shipping' );1570 do_action( 'woocommerce_calculated_shipping' ); 1555 1571 1556 1572 WC()->cart->calculate_totals(); … … 1566 1582 $response = array(); 1567 1583 $currency = get_woocommerce_currency(); 1568 $totals = WC()->cart->get_totals();1569 $cart_total = $totals['cart_contents_tax'] + (float)$totals['cart_contents_total'];1570 1584 $maximum = floatval($this->getOrderLimitMax()); 1571 1585 1572 1586 foreach ($methods as $method) { 1573 $shipping_cost = (float)$method->get_cost() + $method->get_shipping_tax(); 1574 $total = $cart_total + $shipping_cost; 1575 1576 if ($total <= $maximum) { 1587 /** 1588 * Mimic WC_AJAX::update_shipping_method() to get the correct total amounts. 1589 * Mainly for 'Local Pickup' shipping option, because it calculates taxes 1590 * based on the base store location by default, and not the customer’s address. 1591 */ 1592 WC()->session->set( 'chosen_shipping_methods', array($method->get_id()) ); 1593 WC()->cart->calculate_totals(); 1594 1595 $shipping_amount = (float)WC()->cart->get_shipping_total(); // without tax 1596 $order_amount = (float)WC()->cart->get_total(''); // incl. shipping and taxes 1597 $tax_amount = (float)WC()->cart->get_total_tax(); 1598 1599 if ($order_amount <= $maximum) { 1577 1600 $response[] = array( 1578 1601 'id' => $method->get_id(), … … 1580 1603 'description' => $method->get_label(), 1581 1604 'shippingAmount' => array( 1582 'amount' => number_format($shipping_ cost, 2, '.', ''),1605 'amount' => number_format($shipping_amount, 2, '.', ''), 1583 1606 'currency' => $currency 1584 1607 ), 1585 1608 'orderAmount' => array( 1586 'amount' => number_format($total, 2, '.', ''), 1609 'amount' => number_format($order_amount, 2, '.', ''), 1610 'currency' => $currency 1611 ), 1612 'taxAmount' => array( 1613 'amount' => number_format($tax_amount, 2, '.', ''), 1587 1614 'currency' => $currency 1588 1615 ), … … 1829 1856 */ 1830 1857 private function cart_is_virtual() { 1831 foreach ( WC()->cart->get_cart() as $cart_item ) { 1832 if (!$cart_item['data']->is_virtual()) { 1833 return false; 1858 if (WC()->cart) { 1859 foreach ( WC()->cart->get_cart() as $cart_item ) { 1860 if (!$cart_item['data']->is_virtual()) { 1861 return false; 1862 } 1834 1863 } 1835 1864 } … … 2408 2437 return !empty($this->settings[$key]) ? $this->settings[$key] : ''; 2409 2438 } 2439 2440 public function render_product_messaging_block($attributes, $content, $block) { 2441 $style = "display:block;float:none;clear:both;"; 2442 if (isset($attributes['align'])) { 2443 $style .= "text-align:{$attributes['align']};"; 2444 } 2445 $wrapper_attributes = get_block_wrapper_attributes(); 2446 2447 if (isset($block->context['postId'])) { 2448 $post_id = $block->context['postId']; 2449 $product = wc_get_product($post_id); 2450 2451 if ($product) { 2452 if (isset($block->context['singleProduct']) && $block->context['singleProduct']) { 2453 $context = 'product-pages'; 2454 } else { 2455 $context = 'category-pages'; 2456 } 2457 ob_start(); 2458 echo "<div {$wrapper_attributes} style={$style}>"; 2459 $this->render_placement($context, $product); 2460 echo "</div>"; 2461 $markup = ob_get_clean(); 2462 return $markup; 2463 } 2464 } 2465 } 2466 2467 public function render_cart_messaging_block($attributes, $content, $block) { 2468 $wrapper_attributes = get_block_wrapper_attributes(); 2469 return "<div {$wrapper_attributes}></div>"; 2470 } 2471 2472 public function get_cart_placement_attributes() { 2473 $attributes = []; 2474 2475 $attributes['data-mpid'] = $this->get_mpid(); 2476 $attributes['data-currency'] = get_woocommerce_currency(); 2477 2478 $input = $this->settings['cart-page-placement-attributes']; 2479 if (preg_match_all('/data(-[a-z]+)+="[^"]+"/', $input, $raw_attributes)) { 2480 foreach ($raw_attributes[0] as $pair) { 2481 if (preg_match('/data(-[a-z]+)+(?==")/', $pair, $key) 2482 && preg_match('/(?<==")[^"]+(?=")/', $pair, $value) 2483 ) { 2484 $attributes[$key[0]] = $value[0]; 2485 } 2486 } 2487 } 2488 if (!$this->cart_products_are_supported()) { 2489 $attributes['data-cart-is-eligible'] = 'false'; 2490 } 2491 2492 $attributes['data-platform'] = 'WooCommerce'; 2493 $attributes['data-page-type'] = 'cart'; 2494 $attributes['data-item-skus'] = $this->get_cart_item_skus(); 2495 $attributes['data-item-categories'] = $this->get_cart_item_categories(); 2496 2497 return $attributes; 2498 } 2410 2499 } 2411 2500 } -
clearpay-gateway-for-woocommerce/tags/3.7.0/class/WC_Gateway_Clearpay/form_fields.php
r2959052 r2986472 33 33 'title' => __( 'Merchant ID (Production)', 'woo_clearpay' ), 34 34 'type' => 'text', 35 'custom_attributes' => array( 36 'environment-field' => 'production' 37 ), 35 38 'default' => '' 36 39 ), … … 38 41 'title' => __( 'Secret Key (Production)', 'woo_clearpay' ), 39 42 'type' => 'password', 43 'custom_attributes' => array( 44 'environment-field' => 'production' 45 ), 40 46 'default' => '' 41 47 ), … … 45 51 'description' => __( 'This information is supplied by Clearpay and cannot be edited.', 'woo_clearpay' ), 46 52 'custom_attributes' => array( 47 'readonly' => 'true' 48 ), 53 'readonly' => 'true', 54 'environment-field' => 'production' 55 ), 49 56 'default' => '' 50 57 ), … … 52 59 'title' => __( 'Merchant ID (Sandbox)', 'woo_clearpay' ), 53 60 'type' => 'text', 61 'custom_attributes' => array( 62 'environment-field' => 'sandbox' 63 ), 54 64 'default' => '' 55 65 ), … … 57 67 'title' => __( 'Secret Key (Sandbox)', 'woo_clearpay' ), 58 68 'type' => 'password', 69 'custom_attributes' => array( 70 'environment-field' => 'sandbox' 71 ), 59 72 'default' => '' 60 73 ), … … 64 77 'description' => __( 'This information is supplied by Clearpay and cannot be edited.', 'woo_clearpay' ), 65 78 'custom_attributes' => array( 66 'readonly' => 'true' 67 ), 79 'readonly' => 'true', 80 'environment-field' => 'sandbox' 81 ), 68 82 'default' => '' 69 83 ), -
clearpay-gateway-for-woocommerce/tags/3.7.0/class/WC_Gateway_Clearpay_Blocks_Support.php
r2959052 r2986472 41 41 */ 42 42 public function get_payment_method_script_handles() { 43 $asset_path = WC_GATEWAY_CLEARPAY_PATH . '/build/clearpay-blocks .asset.php';43 $asset_path = WC_GATEWAY_CLEARPAY_PATH . '/build/clearpay-blocks/index.asset.php'; 44 44 $version = Clearpay_Plugin::$version; 45 45 $dependencies = []; … … 55 55 wp_register_script( 56 56 'wc-clearpay-blocks-integration', 57 WC_GATEWAY_CLEARPAY_URL . '/build/clearpay-blocks .js',57 WC_GATEWAY_CLEARPAY_URL . '/build/clearpay-blocks/index.js', 58 58 $dependencies, 59 59 $version, 60 60 true 61 61 ); 62 return [ 'wc-clearpay-blocks-integration' ];62 return [ 'wc-clearpay-blocks-integration', 'clearpay_express' ]; 63 63 } 64 64 … … 70 70 public function get_payment_method_data() { 71 71 $instance = WC_Gateway_Clearpay::getInstance(); 72 wp_enqueue_script('square_marketplace_js');73 72 wp_enqueue_style( 'clearpay_css' ); 74 73 return [ … … 78 77 'testmode' => $this->get_setting('testmode'), 79 78 '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(), 81 82 ]; 82 83 } -
clearpay-gateway-for-woocommerce/tags/3.7.0/clearpay-gateway-for-woocommerce.php
r2972430 r2986472 5 5 * Author: Clearpay 6 6 * Author URI: https://www.clearpay.co.uk/ 7 * Version: 3. 6.17 * Version: 3.7.0 8 8 * Text Domain: woo_clearpay 9 9 * Domain Path: /languages/ 10 10 * WC requires at least: 3.2.6 11 * WC tested up to: 8. 1.111 * WC tested up to: 8.2.1 12 12 * 13 13 * Copyright: (c) 2021 Clearpay … … 47 47 * the value in the comments above. 48 48 */ 49 public static $version = '3. 6.1';49 public static $version = '3.7.0'; 50 50 51 51 /** … … 110 110 add_filter( 'woocommerce_gateway_icon', array($gateway, 'filter_woocommerce_gateway_icon'), 10, 2 ); 111 111 load_plugin_textdomain( 'woo_clearpay', false, plugin_basename( __DIR__ ) . '/languages' ); 112 add_filter( 113 '__experimental_woocommerce_blocks_add_data_attributes_to_namespace', 114 function ( $allowed_namespaces ) { 115 $allowed_namespaces[] = 'clearpay-gateway-for-woocommerce'; 116 return $allowed_namespaces; 117 }, 118 10, 1 119 ); 120 112 121 /** 113 122 * Shortcodes. … … 203 212 public function init_website_assets() 204 213 { 214 self::register_common_assets(); 215 205 216 $instance = WC_Gateway_Clearpay::getInstance(); 206 217 207 if ( $instance->is_enabled()) {218 if (is_checkout() && $instance->is_enabled()) { 208 219 $plugin_version = self::$version; 209 220 210 /** 211 * Register CSS. 212 */ 213 wp_register_style( 'clearpay_css', plugins_url( 'css/clearpay.css', __FILE__ ), array(), $plugin_version ); 214 215 /** 216 * Register & Enqueue JS. 217 * Note: Admin assets are registered in self::init_admin_assets() 218 */ 219 $subdomain = $instance->get_api_env() == 'production' ? 'js' : 'js-sandbox'; 220 wp_register_script( 'square_marketplace_js', "https://{$subdomain}.squarecdn.com/square-marketplace.js", array(), null, true ); 221 222 if (is_checkout()) { 223 wp_enqueue_style( 'clearpay_css' ); 224 wp_enqueue_script( 225 'clearpay_checkout_page', 226 plugins_url('build/clearpay-page-checkout.js', __FILE__), 227 ['jquery', 'square_marketplace_js'], 228 $plugin_version, 229 true 230 ); 231 } 232 233 if(is_cart()) { 234 wp_register_script( 'clearpay_express', plugins_url( 'build/clearpay-express.js', __FILE__ ), array('jquery', 'square_marketplace_js'), $plugin_version, true ); 235 wp_localize_script( 'clearpay_express', 'clearpay_express_js_config', array( 236 'ajaxurl' => admin_url('admin-ajax.php'), 237 'ec_start_nonce' => wp_create_nonce("ec_start_nonce"), 238 'ec_change_nonce' => wp_create_nonce("ec_change_nonce"), 239 'ec_change_shipping_nonce' => wp_create_nonce("ec_change_shipping_nonce"), 240 'ec_complete_nonce' => wp_create_nonce("ec_complete_nonce"), 241 'country_code' => $instance->get_country_code() 242 ) ); 243 } 221 wp_enqueue_style( 'clearpay_css' ); 222 wp_enqueue_script( 223 'clearpay_checkout_page', 224 plugins_url('build/clearpay-page-checkout/index.js', __FILE__), 225 ['jquery', 'square_marketplace_js'], 226 $plugin_version, 227 true 228 ); 244 229 } 245 230 } … … 253 238 public function init_admin_assets($hook) 254 239 { 240 self::register_common_assets(); 241 255 242 if ( $hook == 'woocommerce_page_wc-settings' && 256 243 isset($_GET['section']) && $_GET['section'] == 'clearpay' 257 244 ) { 245 $plugin_version = self::$version; 258 246 $instance = WC_Gateway_Clearpay::getInstance(); 259 $subdomain = $instance->get_api_env() == 'production' ? 'js' : 'js-sandbox'; 260 wp_register_script( 'square_marketplace_js', "https://{$subdomain}.squarecdn.com/square-marketplace.js", array(), null, true ); 261 262 wp_enqueue_script( 'clearpay_admin_js', plugins_url( 'build/clearpay-admin.js', __FILE__ ), array('square_marketplace_js'), false, true ); 247 248 wp_enqueue_script( 'clearpay_admin_js', plugins_url( 'build/clearpay-admin/index.js', __FILE__ ), array('square_marketplace_js'), $plugin_version, true ); 263 249 wp_localize_script( 'clearpay_admin_js', 'clearpay_ajax_object', array( 'ajax_url' => admin_url( 'admin-ajax.php' )) ); 264 250 wp_localize_script( 'clearpay_admin_js', 'clearpay_config', array( … … 269 255 ) ); 270 256 } 257 } 258 259 public static function register_js_lib() { 260 $instance = WC_Gateway_Clearpay::getInstance(); 261 $subdomain = $instance->get_api_env() == 'production' ? 'js' : 'js-sandbox'; 262 wp_register_script( 'square_marketplace_js', "https://{$subdomain}.squarecdn.com/square-marketplace.js", array(), null, true ); 263 } 264 265 public static function register_common_assets() { 266 self::register_js_lib(); 267 268 $plugin_version = self::$version; 269 $instance = WC_Gateway_Clearpay::getInstance(); 270 271 wp_register_style( 'clearpay_css', plugins_url( 'css/clearpay.css', __FILE__ ), array(), $plugin_version ); 272 273 wp_register_script( 'clearpay_express', plugins_url( 'build/clearpay-express/index.js', __FILE__ ), array('jquery', 'square_marketplace_js'), $plugin_version, true ); 274 wp_localize_script( 'clearpay_express', 'clearpay_express_js_config', array( 275 'ajaxurl' => admin_url('admin-ajax.php'), 276 'ec_start_nonce' => wp_create_nonce("ec_start_nonce"), 277 'ec_change_nonce' => wp_create_nonce("ec_change_nonce"), 278 'ec_change_shipping_nonce' => wp_create_nonce("ec_change_shipping_nonce"), 279 'ec_complete_nonce' => wp_create_nonce("ec_complete_nonce"), 280 'country_code' => $instance->get_country_code() 281 ) ); 271 282 } 272 283 … … 437 448 } 438 449 } 450 451 public static function register_blocks() { 452 if ( ! function_exists( 'register_block_type' ) ) { 453 // Block editor is not available. 454 return; 455 } 456 457 self::register_js_lib(); 458 459 $instance = WC_Gateway_Clearpay::getInstance(); 460 461 // Register product messaging block 462 register_block_type( 463 __DIR__ . '/build/product-messaging-block/block.json', 464 array( 465 'editor_script_handles' => [ 'square_marketplace_js' ], 466 'view_script_handles' => [ 'square_marketplace_js' ], 467 'render_callback' => array($instance, 'render_product_messaging_block') 468 ) 469 ); 470 471 /** 472 * Register cart messaging block 473 * Note: Unable to retrieve the WC()->cart object on the server side, 474 * hence it cannot get the cart total dynamically, or loop through the cart items 475 * to check restricted categories, or fetch the skus and categories for analytics. 476 */ 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__), 480 $cart_messaging_asset['dependencies'], 481 $cart_messaging_asset['version'], 482 true 483 ); 484 wp_localize_script( 'clearpay_cart_messaging','plugin_data', array( 485 'frontend_is_ready' => $instance->frontend_is_ready(), 486 'placement_attributes' => $instance->get_cart_placement_attributes(), 487 ) ); 488 register_block_type( 489 __DIR__ . '/build/cart-messaging-block/block.json', 490 array( 491 'editor_script_handles' => [ 'square_marketplace_js' ], 492 'view_script_handles' => [ 'square_marketplace_js' ], 493 'render_callback' => array($instance, 'render_cart_messaging_block') 494 ) 495 ); 496 } 439 497 } 440 498 … … 443 501 register_uninstall_hook( __FILE__, array('Clearpay_Plugin', 'uninstall_plugin') ); 444 502 503 add_action( 'init', array('Clearpay_Plugin', 'register_blocks') ); 445 504 add_action( 'plugins_loaded', array('Clearpay_Plugin', 'init'), 10, 0 ); 446 505 add_action( 'upgrader_process_complete', array('Clearpay_Plugin', 'upgrade_complete'), 10, 2 ); -
clearpay-gateway-for-woocommerce/tags/3.7.0/readme.txt
r2972430 r2986472 3 3 Tags: woocommerce, clearpay 4 4 Requires at least: 4.8.3 5 Tested up to: 6.3. 16 Stable tag: 3. 6.15 Tested up to: 6.3.2 6 Stable tag: 3.7.0 7 7 License: GNU Public License 8 8 License URI: https://www.gnu.org/licenses/ … … 40 40 == Changelog == 41 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. 48 42 49 = 3.6.1 = 43 50 *Release Date: Thursday, 28 Sep 2023* -
clearpay-gateway-for-woocommerce/tags/3.7.0/vendor/autoload.php
r2972430 r2986472 23 23 require_once __DIR__ . '/composer/autoload_real.php'; 24 24 25 return ComposerAutoloaderInit 28353fa2aaa659c6a5bb5054fe0a7d25::getLoader();25 return ComposerAutoloaderInit40b20a308214f7ee0fb661161f18ab08::getLoader(); -
clearpay-gateway-for-woocommerce/tags/3.7.0/vendor/composer/autoload_real.php
r2972430 r2986472 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 28353fa2aaa659c6a5bb5054fe0a7d255 class ComposerAutoloaderInit40b20a308214f7ee0fb661161f18ab08 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit 28353fa2aaa659c6a5bb5054fe0a7d25', 'loadClassLoader'), true, true);25 spl_autoload_register(array('ComposerAutoloaderInit40b20a308214f7ee0fb661161f18ab08', 'loadClassLoader'), true, true); 26 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 27 spl_autoload_unregister(array('ComposerAutoloaderInit 28353fa2aaa659c6a5bb5054fe0a7d25', 'loadClassLoader'));27 spl_autoload_unregister(array('ComposerAutoloaderInit40b20a308214f7ee0fb661161f18ab08', 'loadClassLoader')); 28 28 29 29 require __DIR__ . '/autoload_static.php'; 30 call_user_func(\Composer\Autoload\ComposerStaticInit 28353fa2aaa659c6a5bb5054fe0a7d25::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInit40b20a308214f7ee0fb661161f18ab08::getInitializer($loader)); 31 31 32 32 $loader->register(true); -
clearpay-gateway-for-woocommerce/tags/3.7.0/vendor/composer/autoload_static.php
r2972430 r2986472 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 28353fa2aaa659c6a5bb5054fe0a7d257 class ComposerStaticInit40b20a308214f7ee0fb661161f18ab08 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 28 28 { 29 29 return \Closure::bind(function () use ($loader) { 30 $loader->prefixLengthsPsr4 = ComposerStaticInit 28353fa2aaa659c6a5bb5054fe0a7d25::$prefixLengthsPsr4;31 $loader->prefixDirsPsr4 = ComposerStaticInit 28353fa2aaa659c6a5bb5054fe0a7d25::$prefixDirsPsr4;32 $loader->classMap = ComposerStaticInit 28353fa2aaa659c6a5bb5054fe0a7d25::$classMap;30 $loader->prefixLengthsPsr4 = ComposerStaticInit40b20a308214f7ee0fb661161f18ab08::$prefixLengthsPsr4; 31 $loader->prefixDirsPsr4 = ComposerStaticInit40b20a308214f7ee0fb661161f18ab08::$prefixDirsPsr4; 32 $loader->classMap = ComposerStaticInit40b20a308214f7ee0fb661161f18ab08::$classMap; 33 33 34 34 }, null, ClassLoader::class); -
clearpay-gateway-for-woocommerce/tags/3.7.0/vendor/composer/installed.php
r2972430 r2986472 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' 6fb292f5312bd300225d794929165e2bf0fe4c72',6 'reference' => '990097ecc25270cacd924500ee60cbfc2041b8ca', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => 'dev-master', 15 15 'version' => 'dev-master', 16 'reference' => ' 6fb292f5312bd300225d794929165e2bf0fe4c72',16 'reference' => '990097ecc25270cacd924500ee60cbfc2041b8ca', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../../', -
clearpay-gateway-for-woocommerce/trunk/class/WC_Gateway_Clearpay.php
r2972430 r2986472 817 817 */ 818 818 private function cart_products_are_supported() { 819 if (did_action('wp_loaded') ) {819 if (did_action('wp_loaded') && WC()->cart) { 820 820 foreach (WC()->cart->get_cart() as $cart_item) { 821 821 $product = $cart_item['data']; … … 939 939 public function render_express_checkout_on_cart_page() { 940 940 if ( 941 !isset($this->settings['show-express-on-cart-page']) || 942 $this->settings['show-express-on-cart-page'] != 'yes' || 943 get_woocommerce_currency() != $this->settings['settlement-currency'] || 944 !$this->cart_is_within_limits() || 945 !$this->cart_products_are_supported() || 946 $this->cart_is_virtual() 941 !$this->express_is_available() || 942 !$this->cart_is_within_limits() 947 943 ) { 948 944 return; … … 957 953 'tr' => true, 958 954 'td' => array( 'colspan' => true, 'class' => true, ), 955 'button' => array( 'id' => true, 'class' => true, 'type' => true, 'disabled' => true, ), 956 'img' => array( 'src' => true, 'alt' => true, ), 957 )); 958 } 959 960 public function express_is_available() { 961 // Need to check cart total separately 962 return isset($this->settings['show-express-on-cart-page']) 963 && 'yes' == $this->settings['show-express-on-cart-page'] 964 && get_woocommerce_currency() == $this->settings['settlement-currency'] 965 && $this->cart_products_are_supported() 966 && !$this->cart_is_virtual(); 967 } 968 969 public function get_express_checkout_button_for_block() { 970 $button_html = str_replace('[THEME]', $this->settings['express-button-theme'], $this->assets['cart_page_express_button']); 971 972 return wp_kses($button_html, array( 959 973 'button' => array( 'id' => true, 'class' => true, 'type' => true, 'disabled' => true, ), 960 974 'img' => array( 'src' => true, 'alt' => true, ), … … 1500 1514 $address['city'] = $address['suburb']; 1501 1515 1516 $address = apply_filters( 'woocommerce_cart_calculate_shipping_address', $address ); 1517 1502 1518 if ( $address['postcode'] && ! WC_Validation::is_postcode( $address['postcode'], $address['country'] ) ) { 1503 1519 throw new Exception( __( 'Please enter a valid postcode / ZIP.', 'woocommerce' ) ); … … 1552 1568 $customer->save(); 1553 1569 1554 //do_action( 'woocommerce_calculated_shipping' );1570 do_action( 'woocommerce_calculated_shipping' ); 1555 1571 1556 1572 WC()->cart->calculate_totals(); … … 1566 1582 $response = array(); 1567 1583 $currency = get_woocommerce_currency(); 1568 $totals = WC()->cart->get_totals();1569 $cart_total = $totals['cart_contents_tax'] + (float)$totals['cart_contents_total'];1570 1584 $maximum = floatval($this->getOrderLimitMax()); 1571 1585 1572 1586 foreach ($methods as $method) { 1573 $shipping_cost = (float)$method->get_cost() + $method->get_shipping_tax(); 1574 $total = $cart_total + $shipping_cost; 1575 1576 if ($total <= $maximum) { 1587 /** 1588 * Mimic WC_AJAX::update_shipping_method() to get the correct total amounts. 1589 * Mainly for 'Local Pickup' shipping option, because it calculates taxes 1590 * based on the base store location by default, and not the customer’s address. 1591 */ 1592 WC()->session->set( 'chosen_shipping_methods', array($method->get_id()) ); 1593 WC()->cart->calculate_totals(); 1594 1595 $shipping_amount = (float)WC()->cart->get_shipping_total(); // without tax 1596 $order_amount = (float)WC()->cart->get_total(''); // incl. shipping and taxes 1597 $tax_amount = (float)WC()->cart->get_total_tax(); 1598 1599 if ($order_amount <= $maximum) { 1577 1600 $response[] = array( 1578 1601 'id' => $method->get_id(), … … 1580 1603 'description' => $method->get_label(), 1581 1604 'shippingAmount' => array( 1582 'amount' => number_format($shipping_ cost, 2, '.', ''),1605 'amount' => number_format($shipping_amount, 2, '.', ''), 1583 1606 'currency' => $currency 1584 1607 ), 1585 1608 'orderAmount' => array( 1586 'amount' => number_format($total, 2, '.', ''), 1609 'amount' => number_format($order_amount, 2, '.', ''), 1610 'currency' => $currency 1611 ), 1612 'taxAmount' => array( 1613 'amount' => number_format($tax_amount, 2, '.', ''), 1587 1614 'currency' => $currency 1588 1615 ), … … 1829 1856 */ 1830 1857 private function cart_is_virtual() { 1831 foreach ( WC()->cart->get_cart() as $cart_item ) { 1832 if (!$cart_item['data']->is_virtual()) { 1833 return false; 1858 if (WC()->cart) { 1859 foreach ( WC()->cart->get_cart() as $cart_item ) { 1860 if (!$cart_item['data']->is_virtual()) { 1861 return false; 1862 } 1834 1863 } 1835 1864 } … … 2408 2437 return !empty($this->settings[$key]) ? $this->settings[$key] : ''; 2409 2438 } 2439 2440 public function render_product_messaging_block($attributes, $content, $block) { 2441 $style = "display:block;float:none;clear:both;"; 2442 if (isset($attributes['align'])) { 2443 $style .= "text-align:{$attributes['align']};"; 2444 } 2445 $wrapper_attributes = get_block_wrapper_attributes(); 2446 2447 if (isset($block->context['postId'])) { 2448 $post_id = $block->context['postId']; 2449 $product = wc_get_product($post_id); 2450 2451 if ($product) { 2452 if (isset($block->context['singleProduct']) && $block->context['singleProduct']) { 2453 $context = 'product-pages'; 2454 } else { 2455 $context = 'category-pages'; 2456 } 2457 ob_start(); 2458 echo "<div {$wrapper_attributes} style={$style}>"; 2459 $this->render_placement($context, $product); 2460 echo "</div>"; 2461 $markup = ob_get_clean(); 2462 return $markup; 2463 } 2464 } 2465 } 2466 2467 public function render_cart_messaging_block($attributes, $content, $block) { 2468 $wrapper_attributes = get_block_wrapper_attributes(); 2469 return "<div {$wrapper_attributes}></div>"; 2470 } 2471 2472 public function get_cart_placement_attributes() { 2473 $attributes = []; 2474 2475 $attributes['data-mpid'] = $this->get_mpid(); 2476 $attributes['data-currency'] = get_woocommerce_currency(); 2477 2478 $input = $this->settings['cart-page-placement-attributes']; 2479 if (preg_match_all('/data(-[a-z]+)+="[^"]+"/', $input, $raw_attributes)) { 2480 foreach ($raw_attributes[0] as $pair) { 2481 if (preg_match('/data(-[a-z]+)+(?==")/', $pair, $key) 2482 && preg_match('/(?<==")[^"]+(?=")/', $pair, $value) 2483 ) { 2484 $attributes[$key[0]] = $value[0]; 2485 } 2486 } 2487 } 2488 if (!$this->cart_products_are_supported()) { 2489 $attributes['data-cart-is-eligible'] = 'false'; 2490 } 2491 2492 $attributes['data-platform'] = 'WooCommerce'; 2493 $attributes['data-page-type'] = 'cart'; 2494 $attributes['data-item-skus'] = $this->get_cart_item_skus(); 2495 $attributes['data-item-categories'] = $this->get_cart_item_categories(); 2496 2497 return $attributes; 2498 } 2410 2499 } 2411 2500 } -
clearpay-gateway-for-woocommerce/trunk/class/WC_Gateway_Clearpay/form_fields.php
r2959052 r2986472 33 33 'title' => __( 'Merchant ID (Production)', 'woo_clearpay' ), 34 34 'type' => 'text', 35 'custom_attributes' => array( 36 'environment-field' => 'production' 37 ), 35 38 'default' => '' 36 39 ), … … 38 41 'title' => __( 'Secret Key (Production)', 'woo_clearpay' ), 39 42 'type' => 'password', 43 'custom_attributes' => array( 44 'environment-field' => 'production' 45 ), 40 46 'default' => '' 41 47 ), … … 45 51 'description' => __( 'This information is supplied by Clearpay and cannot be edited.', 'woo_clearpay' ), 46 52 'custom_attributes' => array( 47 'readonly' => 'true' 48 ), 53 'readonly' => 'true', 54 'environment-field' => 'production' 55 ), 49 56 'default' => '' 50 57 ), … … 52 59 'title' => __( 'Merchant ID (Sandbox)', 'woo_clearpay' ), 53 60 'type' => 'text', 61 'custom_attributes' => array( 62 'environment-field' => 'sandbox' 63 ), 54 64 'default' => '' 55 65 ), … … 57 67 'title' => __( 'Secret Key (Sandbox)', 'woo_clearpay' ), 58 68 'type' => 'password', 69 'custom_attributes' => array( 70 'environment-field' => 'sandbox' 71 ), 59 72 'default' => '' 60 73 ), … … 64 77 'description' => __( 'This information is supplied by Clearpay and cannot be edited.', 'woo_clearpay' ), 65 78 'custom_attributes' => array( 66 'readonly' => 'true' 67 ), 79 'readonly' => 'true', 80 'environment-field' => 'sandbox' 81 ), 68 82 'default' => '' 69 83 ), -
clearpay-gateway-for-woocommerce/trunk/class/WC_Gateway_Clearpay_Blocks_Support.php
r2959052 r2986472 41 41 */ 42 42 public function get_payment_method_script_handles() { 43 $asset_path = WC_GATEWAY_CLEARPAY_PATH . '/build/clearpay-blocks .asset.php';43 $asset_path = WC_GATEWAY_CLEARPAY_PATH . '/build/clearpay-blocks/index.asset.php'; 44 44 $version = Clearpay_Plugin::$version; 45 45 $dependencies = []; … … 55 55 wp_register_script( 56 56 'wc-clearpay-blocks-integration', 57 WC_GATEWAY_CLEARPAY_URL . '/build/clearpay-blocks .js',57 WC_GATEWAY_CLEARPAY_URL . '/build/clearpay-blocks/index.js', 58 58 $dependencies, 59 59 $version, 60 60 true 61 61 ); 62 return [ 'wc-clearpay-blocks-integration' ];62 return [ 'wc-clearpay-blocks-integration', 'clearpay_express' ]; 63 63 } 64 64 … … 70 70 public function get_payment_method_data() { 71 71 $instance = WC_Gateway_Clearpay::getInstance(); 72 wp_enqueue_script('square_marketplace_js');73 72 wp_enqueue_style( 'clearpay_css' ); 74 73 return [ … … 78 77 'testmode' => $this->get_setting('testmode'), 79 78 '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(), 81 82 ]; 82 83 } -
clearpay-gateway-for-woocommerce/trunk/clearpay-gateway-for-woocommerce.php
r2972430 r2986472 5 5 * Author: Clearpay 6 6 * Author URI: https://www.clearpay.co.uk/ 7 * Version: 3. 6.17 * Version: 3.7.0 8 8 * Text Domain: woo_clearpay 9 9 * Domain Path: /languages/ 10 10 * WC requires at least: 3.2.6 11 * WC tested up to: 8. 1.111 * WC tested up to: 8.2.1 12 12 * 13 13 * Copyright: (c) 2021 Clearpay … … 47 47 * the value in the comments above. 48 48 */ 49 public static $version = '3. 6.1';49 public static $version = '3.7.0'; 50 50 51 51 /** … … 110 110 add_filter( 'woocommerce_gateway_icon', array($gateway, 'filter_woocommerce_gateway_icon'), 10, 2 ); 111 111 load_plugin_textdomain( 'woo_clearpay', false, plugin_basename( __DIR__ ) . '/languages' ); 112 add_filter( 113 '__experimental_woocommerce_blocks_add_data_attributes_to_namespace', 114 function ( $allowed_namespaces ) { 115 $allowed_namespaces[] = 'clearpay-gateway-for-woocommerce'; 116 return $allowed_namespaces; 117 }, 118 10, 1 119 ); 120 112 121 /** 113 122 * Shortcodes. … … 203 212 public function init_website_assets() 204 213 { 214 self::register_common_assets(); 215 205 216 $instance = WC_Gateway_Clearpay::getInstance(); 206 217 207 if ( $instance->is_enabled()) {218 if (is_checkout() && $instance->is_enabled()) { 208 219 $plugin_version = self::$version; 209 220 210 /** 211 * Register CSS. 212 */ 213 wp_register_style( 'clearpay_css', plugins_url( 'css/clearpay.css', __FILE__ ), array(), $plugin_version ); 214 215 /** 216 * Register & Enqueue JS. 217 * Note: Admin assets are registered in self::init_admin_assets() 218 */ 219 $subdomain = $instance->get_api_env() == 'production' ? 'js' : 'js-sandbox'; 220 wp_register_script( 'square_marketplace_js', "https://{$subdomain}.squarecdn.com/square-marketplace.js", array(), null, true ); 221 222 if (is_checkout()) { 223 wp_enqueue_style( 'clearpay_css' ); 224 wp_enqueue_script( 225 'clearpay_checkout_page', 226 plugins_url('build/clearpay-page-checkout.js', __FILE__), 227 ['jquery', 'square_marketplace_js'], 228 $plugin_version, 229 true 230 ); 231 } 232 233 if(is_cart()) { 234 wp_register_script( 'clearpay_express', plugins_url( 'build/clearpay-express.js', __FILE__ ), array('jquery', 'square_marketplace_js'), $plugin_version, true ); 235 wp_localize_script( 'clearpay_express', 'clearpay_express_js_config', array( 236 'ajaxurl' => admin_url('admin-ajax.php'), 237 'ec_start_nonce' => wp_create_nonce("ec_start_nonce"), 238 'ec_change_nonce' => wp_create_nonce("ec_change_nonce"), 239 'ec_change_shipping_nonce' => wp_create_nonce("ec_change_shipping_nonce"), 240 'ec_complete_nonce' => wp_create_nonce("ec_complete_nonce"), 241 'country_code' => $instance->get_country_code() 242 ) ); 243 } 221 wp_enqueue_style( 'clearpay_css' ); 222 wp_enqueue_script( 223 'clearpay_checkout_page', 224 plugins_url('build/clearpay-page-checkout/index.js', __FILE__), 225 ['jquery', 'square_marketplace_js'], 226 $plugin_version, 227 true 228 ); 244 229 } 245 230 } … … 253 238 public function init_admin_assets($hook) 254 239 { 240 self::register_common_assets(); 241 255 242 if ( $hook == 'woocommerce_page_wc-settings' && 256 243 isset($_GET['section']) && $_GET['section'] == 'clearpay' 257 244 ) { 245 $plugin_version = self::$version; 258 246 $instance = WC_Gateway_Clearpay::getInstance(); 259 $subdomain = $instance->get_api_env() == 'production' ? 'js' : 'js-sandbox'; 260 wp_register_script( 'square_marketplace_js', "https://{$subdomain}.squarecdn.com/square-marketplace.js", array(), null, true ); 261 262 wp_enqueue_script( 'clearpay_admin_js', plugins_url( 'build/clearpay-admin.js', __FILE__ ), array('square_marketplace_js'), false, true ); 247 248 wp_enqueue_script( 'clearpay_admin_js', plugins_url( 'build/clearpay-admin/index.js', __FILE__ ), array('square_marketplace_js'), $plugin_version, true ); 263 249 wp_localize_script( 'clearpay_admin_js', 'clearpay_ajax_object', array( 'ajax_url' => admin_url( 'admin-ajax.php' )) ); 264 250 wp_localize_script( 'clearpay_admin_js', 'clearpay_config', array( … … 269 255 ) ); 270 256 } 257 } 258 259 public static function register_js_lib() { 260 $instance = WC_Gateway_Clearpay::getInstance(); 261 $subdomain = $instance->get_api_env() == 'production' ? 'js' : 'js-sandbox'; 262 wp_register_script( 'square_marketplace_js', "https://{$subdomain}.squarecdn.com/square-marketplace.js", array(), null, true ); 263 } 264 265 public static function register_common_assets() { 266 self::register_js_lib(); 267 268 $plugin_version = self::$version; 269 $instance = WC_Gateway_Clearpay::getInstance(); 270 271 wp_register_style( 'clearpay_css', plugins_url( 'css/clearpay.css', __FILE__ ), array(), $plugin_version ); 272 273 wp_register_script( 'clearpay_express', plugins_url( 'build/clearpay-express/index.js', __FILE__ ), array('jquery', 'square_marketplace_js'), $plugin_version, true ); 274 wp_localize_script( 'clearpay_express', 'clearpay_express_js_config', array( 275 'ajaxurl' => admin_url('admin-ajax.php'), 276 'ec_start_nonce' => wp_create_nonce("ec_start_nonce"), 277 'ec_change_nonce' => wp_create_nonce("ec_change_nonce"), 278 'ec_change_shipping_nonce' => wp_create_nonce("ec_change_shipping_nonce"), 279 'ec_complete_nonce' => wp_create_nonce("ec_complete_nonce"), 280 'country_code' => $instance->get_country_code() 281 ) ); 271 282 } 272 283 … … 437 448 } 438 449 } 450 451 public static function register_blocks() { 452 if ( ! function_exists( 'register_block_type' ) ) { 453 // Block editor is not available. 454 return; 455 } 456 457 self::register_js_lib(); 458 459 $instance = WC_Gateway_Clearpay::getInstance(); 460 461 // Register product messaging block 462 register_block_type( 463 __DIR__ . '/build/product-messaging-block/block.json', 464 array( 465 'editor_script_handles' => [ 'square_marketplace_js' ], 466 'view_script_handles' => [ 'square_marketplace_js' ], 467 'render_callback' => array($instance, 'render_product_messaging_block') 468 ) 469 ); 470 471 /** 472 * Register cart messaging block 473 * Note: Unable to retrieve the WC()->cart object on the server side, 474 * hence it cannot get the cart total dynamically, or loop through the cart items 475 * to check restricted categories, or fetch the skus and categories for analytics. 476 */ 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__), 480 $cart_messaging_asset['dependencies'], 481 $cart_messaging_asset['version'], 482 true 483 ); 484 wp_localize_script( 'clearpay_cart_messaging','plugin_data', array( 485 'frontend_is_ready' => $instance->frontend_is_ready(), 486 'placement_attributes' => $instance->get_cart_placement_attributes(), 487 ) ); 488 register_block_type( 489 __DIR__ . '/build/cart-messaging-block/block.json', 490 array( 491 'editor_script_handles' => [ 'square_marketplace_js' ], 492 'view_script_handles' => [ 'square_marketplace_js' ], 493 'render_callback' => array($instance, 'render_cart_messaging_block') 494 ) 495 ); 496 } 439 497 } 440 498 … … 443 501 register_uninstall_hook( __FILE__, array('Clearpay_Plugin', 'uninstall_plugin') ); 444 502 503 add_action( 'init', array('Clearpay_Plugin', 'register_blocks') ); 445 504 add_action( 'plugins_loaded', array('Clearpay_Plugin', 'init'), 10, 0 ); 446 505 add_action( 'upgrader_process_complete', array('Clearpay_Plugin', 'upgrade_complete'), 10, 2 ); -
clearpay-gateway-for-woocommerce/trunk/readme.txt
r2972430 r2986472 3 3 Tags: woocommerce, clearpay 4 4 Requires at least: 4.8.3 5 Tested up to: 6.3. 16 Stable tag: 3. 6.15 Tested up to: 6.3.2 6 Stable tag: 3.7.0 7 7 License: GNU Public License 8 8 License URI: https://www.gnu.org/licenses/ … … 40 40 == Changelog == 41 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. 48 42 49 = 3.6.1 = 43 50 *Release Date: Thursday, 28 Sep 2023* -
clearpay-gateway-for-woocommerce/trunk/vendor/autoload.php
r2972430 r2986472 23 23 require_once __DIR__ . '/composer/autoload_real.php'; 24 24 25 return ComposerAutoloaderInit 28353fa2aaa659c6a5bb5054fe0a7d25::getLoader();25 return ComposerAutoloaderInit40b20a308214f7ee0fb661161f18ab08::getLoader(); -
clearpay-gateway-for-woocommerce/trunk/vendor/composer/autoload_real.php
r2972430 r2986472 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 28353fa2aaa659c6a5bb5054fe0a7d255 class ComposerAutoloaderInit40b20a308214f7ee0fb661161f18ab08 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit 28353fa2aaa659c6a5bb5054fe0a7d25', 'loadClassLoader'), true, true);25 spl_autoload_register(array('ComposerAutoloaderInit40b20a308214f7ee0fb661161f18ab08', 'loadClassLoader'), true, true); 26 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 27 spl_autoload_unregister(array('ComposerAutoloaderInit 28353fa2aaa659c6a5bb5054fe0a7d25', 'loadClassLoader'));27 spl_autoload_unregister(array('ComposerAutoloaderInit40b20a308214f7ee0fb661161f18ab08', 'loadClassLoader')); 28 28 29 29 require __DIR__ . '/autoload_static.php'; 30 call_user_func(\Composer\Autoload\ComposerStaticInit 28353fa2aaa659c6a5bb5054fe0a7d25::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInit40b20a308214f7ee0fb661161f18ab08::getInitializer($loader)); 31 31 32 32 $loader->register(true); -
clearpay-gateway-for-woocommerce/trunk/vendor/composer/autoload_static.php
r2972430 r2986472 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 28353fa2aaa659c6a5bb5054fe0a7d257 class ComposerStaticInit40b20a308214f7ee0fb661161f18ab08 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 28 28 { 29 29 return \Closure::bind(function () use ($loader) { 30 $loader->prefixLengthsPsr4 = ComposerStaticInit 28353fa2aaa659c6a5bb5054fe0a7d25::$prefixLengthsPsr4;31 $loader->prefixDirsPsr4 = ComposerStaticInit 28353fa2aaa659c6a5bb5054fe0a7d25::$prefixDirsPsr4;32 $loader->classMap = ComposerStaticInit 28353fa2aaa659c6a5bb5054fe0a7d25::$classMap;30 $loader->prefixLengthsPsr4 = ComposerStaticInit40b20a308214f7ee0fb661161f18ab08::$prefixLengthsPsr4; 31 $loader->prefixDirsPsr4 = ComposerStaticInit40b20a308214f7ee0fb661161f18ab08::$prefixDirsPsr4; 32 $loader->classMap = ComposerStaticInit40b20a308214f7ee0fb661161f18ab08::$classMap; 33 33 34 34 }, null, ClassLoader::class); -
clearpay-gateway-for-woocommerce/trunk/vendor/composer/installed.php
r2972430 r2986472 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' 6fb292f5312bd300225d794929165e2bf0fe4c72',6 'reference' => '990097ecc25270cacd924500ee60cbfc2041b8ca', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => 'dev-master', 15 15 'version' => 'dev-master', 16 'reference' => ' 6fb292f5312bd300225d794929165e2bf0fe4c72',16 'reference' => '990097ecc25270cacd924500ee60cbfc2041b8ca', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.