Changeset 3009471
- Timestamp:
- 12/13/2023 02:39:41 PM (2 years ago)
- Location:
- simpler-checkout
- Files:
-
- 22 edited
- 1 copied
-
tags/0.7.7 (copied) (copied from simpler-checkout/trunk)
-
tags/0.7.7/README.txt (modified) (2 diffs)
-
tags/0.7.7/includes/Services/CartHelper.php (modified) (2 diffs)
-
tags/0.7.7/includes/Services/QuotationService.php (modified) (1 diff)
-
tags/0.7.7/includes/button.php (modified) (11 diffs)
-
tags/0.7.7/includes/compat.php (modified) (3 diffs)
-
tags/0.7.7/includes/constants.php (modified) (3 diffs)
-
tags/0.7.7/simpler.php (modified) (1 diff)
-
tags/0.7.7/vendor/autoload.php (modified) (1 diff)
-
tags/0.7.7/vendor/composer/autoload_real.php (modified) (3 diffs)
-
tags/0.7.7/vendor/composer/autoload_static.php (modified) (2 diffs)
-
tags/0.7.7/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/includes/Services/CartHelper.php (modified) (2 diffs)
-
trunk/includes/Services/QuotationService.php (modified) (1 diff)
-
trunk/includes/button.php (modified) (11 diffs)
-
trunk/includes/compat.php (modified) (3 diffs)
-
trunk/includes/constants.php (modified) (3 diffs)
-
trunk/simpler.php (modified) (1 diff)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_real.php (modified) (3 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (2 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
simpler-checkout/tags/0.7.7/README.txt
r2980496 r3009471 5 5 Tested up to: 6.1 6 6 Requires PHP: 7.0 7 Stable tag: 0.7. 67 Stable tag: 0.7.7 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 35 35 36 36 == Changelog == 37 38 == 0.7.8 39 Feat: preset coupon applied to woo cart to simpler checkout form 40 41 == 0.7.7 42 Feat: introduce `simplerwc_should_render_product_button` and `simplerwc_should_render_cart_button` filters for granular control of rendering logic 43 Feat: introduce `simplerwc_button_get_product_attibutes` and `simplerwc_get_cart_item_data` filters for managing cart item attributes 44 Compat: [iThemeland Free Gifts](https://ithemelandco.com/plugins/free-gifts-for-woocommerce/) 37 45 38 46 == 0.7.6 -
simpler-checkout/tags/0.7.7/includes/Services/CartHelper.php
r2785748 r3009471 34 34 $item->get_quantity(), 35 35 NULL, 36 $item->get_attributes_array() 36 $item->get_attributes_array(), 37 apply_filters('simplerwc_get_cart_item_data', [], $item) 37 38 ); 38 39 } … … 43 44 } 44 45 45 do_action('simplerwc_after_add_to_cart' );46 do_action('simplerwc_after_add_to_cart', $productAdded, $item); 46 47 } 47 48 -
simpler-checkout/tags/0.7.7/includes/Services/QuotationService.php
r2980496 r3009471 12 12 use Simpler\Exceptions\UnshippableCartException; 13 13 use Simpler\Exceptions\UnshippableLocationException; 14 use Simpler\Models\{Fee, Money, P aymentMethod, ProductAttribute, Quotation, QuotationRequest, QuotedProduct};14 use Simpler\Models\{Fee, Money, ProductAttribute, Quotation, QuotationRequest, QuotedProduct}; 15 15 16 16 class QuotationService -
simpler-checkout/tags/0.7.7/includes/button.php
r2906969 r3009471 64 64 } 65 65 66 return simplerwc_button("shortcode_product", simplerwc_prepare_product($product), SIMPLERWC_BTNPOS_PRODUCT_SHORTCODE); 66 if (apply_filters('simplerwc_should_render_product_button', true, $product)) { 67 return simplerwc_button("shortcode_product", simplerwc_prepare_product($product), SIMPLERWC_BTNPOS_PRODUCT_SHORTCODE); 68 } 67 69 } 68 70 … … 78 80 } 79 81 80 return simplerwc_button("shortcode_cart", simplerwc_prepare_cart($cart), SIMPLERWC_BTNPOS_CART_SHORTCODE); 82 if (apply_filters('simplerwc_should_render_cart_button', true, $cart)) { 83 return simplerwc_button("shortcode_cart", simplerwc_prepare_cart($cart), SIMPLERWC_BTNPOS_CART_SHORTCODE); 84 } 81 85 } 82 86 … … 92 96 93 97 global $product; 94 echo simplerwc_button(get_option('simplerwc_product_button_placement'), simplerwc_prepare_product($product), SIMPLERWC_BTNPOS_PRODUCT_PAGE); 98 if (apply_filters('simplerwc_should_render_product_button', true, $product)) { 99 echo simplerwc_button(get_option('simplerwc_product_button_placement'), simplerwc_prepare_product($product), SIMPLERWC_BTNPOS_PRODUCT_PAGE); 100 }; 95 101 } 96 102 … … 110 116 } 111 117 112 echo simplerwc_button("minicart", simplerwc_prepare_cart($cart), SIMPLERWC_BTNPOS_MINICART); 118 if (apply_filters('simplerwc_should_render_cart_button', true, $cart)) { 119 echo simplerwc_button("minicart", simplerwc_prepare_cart($cart), SIMPLERWC_BTNPOS_MINICART); 120 } 113 121 } 114 122 … … 128 136 } 129 137 130 echo simplerwc_button(get_option('simplerwc_cart_page_button_placement'), simplerwc_prepare_cart($cart), SIMPLERWC_BTNPOS_PROCEED_TO_CHECKOUT); 138 if (apply_filters('simplerwc_should_render_cart_button', true, $cart)) { 139 echo simplerwc_button(get_option('simplerwc_cart_page_button_placement'), simplerwc_prepare_cart($cart), SIMPLERWC_BTNPOS_PROCEED_TO_CHECKOUT); 140 } 131 141 } 132 142 … … 146 156 } 147 157 148 echo simplerwc_button(get_option('simplerwc_checkout_page_button_placement'), simplerwc_prepare_cart($cart), SIMPLERWC_BTNPOS_BEFORE_CHECKOUT); 158 if (apply_filters('simplerwc_should_render_cart_button', true, $cart)) { 159 echo simplerwc_button(get_option('simplerwc_checkout_page_button_placement'), simplerwc_prepare_cart($cart), SIMPLERWC_BTNPOS_BEFORE_CHECKOUT); 160 } 149 161 } 150 162 … … 193 205 { 194 206 return esc_html(base64_encode(json_encode([ 195 'cart' => $cart, 207 'cart' => $cart['items'], 208 'coupon' => $cart['coupon'] ?? NULL, 196 209 'locale' => get_locale(), 197 210 'currency' => get_woocommerce_currency(), … … 202 215 { 203 216 return [ 204 simplerwc_get_product_attributes($product)217 'items' => [simplerwc_get_product_attributes($product)] 205 218 ]; 206 219 } … … 208 221 function simplerwc_prepare_cart($cart) 209 222 { 210 $ret = []; 223 $coupons = $cart->get_applied_coupons(); 224 $ret = [ 225 'coupon' => reset($coupons) ?? NULL, 226 'items' => [] 227 ]; 211 228 foreach ($cart->get_cart_contents() as $cart_item) { 212 229 if (!array_key_exists('data', $cart_item) || !($cart_item['data'] instanceof WC_Product)) { 230 continue; 231 } 232 233 if (apply_filters('simplerwc_button_should_ignore_cart_item', false, $cart_item)) { 213 234 continue; 214 235 } … … 224 245 $bundled_items[$idx]['quantity'] = $item['quantity'] / $cart_item['quantity']; 225 246 } 226 array_push($ret , simplerwc_get_cart_item_attributes($cart_item, $bundled_items));247 array_push($ret['items'], simplerwc_get_cart_item_attributes($cart_item, $bundled_items)); 227 248 } else { 228 array_push($ret , simplerwc_get_cart_item_attributes($cart_item));249 array_push($ret['items'], simplerwc_get_cart_item_attributes($cart_item)); 229 250 } 230 251 } … … 267 288 'sold_individually' => $product->is_sold_individually(), 268 289 'purchasable' => $product->is_purchasable(), 269 'attributes' => []290 'attributes' => apply_filters('simplerwc_button_get_product_attributes', [], $product) 270 291 ]; 271 292 if (is_a($product, 'WC_Product_Variable')) { -
simpler-checkout/tags/0.7.7/includes/compat.php
r2980496 r3009471 69 69 } 70 70 // COD isn't enabled for any shipping method 71 if ( !($cod = $availablePaymentMethods['cod'])->enable_for_methods) {71 if (!($cod = $availablePaymentMethods['cod'])->enable_for_methods) { 72 72 return $paymentMethods; 73 73 } 74 74 // COD isn't enabled for quote's shipping method (e.g. local pickup or BoxNow) 75 if ( !in_array($quotation->get_shipping_rate()->get_method_id(), $cod->enable_for_methods)) {75 if (!in_array($quotation->get_shipping_rate()->get_method_id(), $cod->enable_for_methods)) { 76 76 return $paymentMethods; 77 77 } … … 99 99 function simplerwc_compat_wc_smart_cod_order(array $closures, OrderRequest $orderRequest): array 100 100 { 101 if ( ! ($paymentMethod = $orderRequest->get_order()->get_payment_method()) 102 || $paymentMethod->getType() != PaymentMethod::COD 103 || ! class_exists('Wc_Smart_Cod_Admin') 101 if ( 102 !($paymentMethod = $orderRequest->get_order()->get_payment_method()) 103 || $paymentMethod->getType() != PaymentMethod::COD 104 || !class_exists('Wc_Smart_Cod_Admin') 104 105 ) { 105 106 return $closures; … … 120 121 } 121 122 122 add_filter('simplerwc_order_fees', 'simplerwc_compat_wc_smart_cod_order', 10 , 2); 123 add_filter('simplerwc_order_fees', 'simplerwc_compat_wc_smart_cod_order', 10, 2); 124 125 // iThemeland Free Gifts : https://ithemelandco.com/plugins/free-gifts-for-woocommerce/ 126 function simplerwc_compat_ithemeland_free_gifts_add_to_cart() 127 { 128 if (!class_exists('iThemeland_front_order')) { 129 return; 130 } 131 $ithemeland = new iThemeland_front_order(); 132 $ithemeland->check_session_gift(); 133 $ithemeland->pw_add_free_gifts(); 134 } 135 136 function simplerwc_compat_ithemeland_free_gifts_ignore($value, $cart_item) 137 { 138 if (isset($cart_item['it_free_gift'])) { 139 return true; 140 } 141 return $value; 142 } 143 144 add_action('simplerwc_after_add_to_cart', 'simplerwc_compat_ithemeland_free_gifts_add_to_cart', 10, 0); 145 add_filter('simplerwc_button_should_ignore_cart_item', 'simplerwc_compat_ithemeland_free_gifts_ignore', 10, 2); -
simpler-checkout/tags/0.7.7/includes/constants.php
r2980496 r3009471 1 1 <?php 2 2 3 const SIMPLERWC_VERSION = '0.7. 6';3 const SIMPLERWC_VERSION = '0.7.7'; 4 4 5 5 function simplerwc_get_sdk_uri() … … 21 21 switch (get_option('simpler_environment')) { 22 22 case 'development': 23 return 'http s://localhost:4003/v1/refunds';23 return 'http://merchant-api.simpler.test/api/v1/refunds'; 24 24 case 'sandbox': 25 25 return 'https://merchant.staging.simpler.so/api/v1/refunds'; … … 33 33 switch (get_option('simpler_environment')) { 34 34 case 'development': 35 return 'http s://localhost:4003/v1/integrations/status';35 return 'http://merchant-api.simpler.test/api/v1/integrations/status'; 36 36 case 'sandbox': 37 37 return 'https://merchant.staging.simpler.so/api/v1/integrations/status'; -
simpler-checkout/tags/0.7.7/simpler.php
r2980496 r3009471 8 8 * Description: Simpler Checkout lets your customers complete their purchases in seconds, with any payment method they want, in any device or browser and without a password. 9 9 * Tags: woocommerce, checkout, payments, conversion rate 10 * Version: 0.7. 610 * Version: 0.7.7 11 11 * Requires at least: 5.1 12 12 * Tested up to: 6.3.1 -
simpler-checkout/tags/0.7.7/vendor/autoload.php
r2980496 r3009471 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit5 e11b8fedcc547300b02e0b9084e2c12::getLoader();7 return ComposerAutoloaderInit54184cac7c4d89fb1088302c5c373494::getLoader(); -
simpler-checkout/tags/0.7.7/vendor/composer/autoload_real.php
r2980496 r3009471 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit5 e11b8fedcc547300b02e0b9084e2c125 class ComposerAutoloaderInit54184cac7c4d89fb1088302c5c373494 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit5 e11b8fedcc547300b02e0b9084e2c12', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInit54184cac7c4d89fb1088302c5c373494', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); 29 spl_autoload_unregister(array('ComposerAutoloaderInit5 e11b8fedcc547300b02e0b9084e2c12', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInit54184cac7c4d89fb1088302c5c373494', 'loadClassLoader')); 30 30 31 31 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 33 33 require __DIR__ . '/autoload_static.php'; 34 34 35 call_user_func(\Composer\Autoload\ComposerStaticInit5 e11b8fedcc547300b02e0b9084e2c12::getInitializer($loader));35 call_user_func(\Composer\Autoload\ComposerStaticInit54184cac7c4d89fb1088302c5c373494::getInitializer($loader)); 36 36 } else { 37 37 $map = require __DIR__ . '/autoload_namespaces.php'; -
simpler-checkout/tags/0.7.7/vendor/composer/autoload_static.php
r2980496 r3009471 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit5 e11b8fedcc547300b02e0b9084e2c127 class ComposerStaticInit54184cac7c4d89fb1088302c5c373494 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 84 84 { 85 85 return \Closure::bind(function () use ($loader) { 86 $loader->prefixLengthsPsr4 = ComposerStaticInit5 e11b8fedcc547300b02e0b9084e2c12::$prefixLengthsPsr4;87 $loader->prefixDirsPsr4 = ComposerStaticInit5 e11b8fedcc547300b02e0b9084e2c12::$prefixDirsPsr4;88 $loader->classMap = ComposerStaticInit5 e11b8fedcc547300b02e0b9084e2c12::$classMap;86 $loader->prefixLengthsPsr4 = ComposerStaticInit54184cac7c4d89fb1088302c5c373494::$prefixLengthsPsr4; 87 $loader->prefixDirsPsr4 = ComposerStaticInit54184cac7c4d89fb1088302c5c373494::$prefixDirsPsr4; 88 $loader->classMap = ComposerStaticInit54184cac7c4d89fb1088302c5c373494::$classMap; 89 89 90 90 }, null, ClassLoader::class); -
simpler-checkout/tags/0.7.7/vendor/composer/installed.php
r2980496 r3009471 1 1 <?php return array( 2 2 'root' => array( 3 'pretty_version' => '0.7. 6',4 'version' => '0.7. 6.0',3 'pretty_version' => '0.7.7', 4 'version' => '0.7.7.0', 5 5 'type' => 'wordpress-plugin', 6 6 'install_path' => __DIR__ . '/../../', 7 7 'aliases' => array(), 8 'reference' => ' 6a429d9ed73ad03b0514f372e40bd0760235b535',8 'reference' => '725649f6395aababba993e9b189ed1a134bcfa35', 9 9 'name' => 'simpler-checkout/woo', 10 10 'dev' => false, … … 12 12 'versions' => array( 13 13 'simpler-checkout/woo' => array( 14 'pretty_version' => '0.7. 6',15 'version' => '0.7. 6.0',14 'pretty_version' => '0.7.7', 15 'version' => '0.7.7.0', 16 16 'type' => 'wordpress-plugin', 17 17 'install_path' => __DIR__ . '/../../', 18 18 'aliases' => array(), 19 'reference' => ' 6a429d9ed73ad03b0514f372e40bd0760235b535',19 'reference' => '725649f6395aababba993e9b189ed1a134bcfa35', 20 20 'dev_requirement' => false, 21 21 ), -
simpler-checkout/trunk/README.txt
r2980496 r3009471 5 5 Tested up to: 6.1 6 6 Requires PHP: 7.0 7 Stable tag: 0.7. 67 Stable tag: 0.7.7 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 35 35 36 36 == Changelog == 37 38 == 0.7.8 39 Feat: preset coupon applied to woo cart to simpler checkout form 40 41 == 0.7.7 42 Feat: introduce `simplerwc_should_render_product_button` and `simplerwc_should_render_cart_button` filters for granular control of rendering logic 43 Feat: introduce `simplerwc_button_get_product_attibutes` and `simplerwc_get_cart_item_data` filters for managing cart item attributes 44 Compat: [iThemeland Free Gifts](https://ithemelandco.com/plugins/free-gifts-for-woocommerce/) 37 45 38 46 == 0.7.6 -
simpler-checkout/trunk/includes/Services/CartHelper.php
r2785748 r3009471 34 34 $item->get_quantity(), 35 35 NULL, 36 $item->get_attributes_array() 36 $item->get_attributes_array(), 37 apply_filters('simplerwc_get_cart_item_data', [], $item) 37 38 ); 38 39 } … … 43 44 } 44 45 45 do_action('simplerwc_after_add_to_cart' );46 do_action('simplerwc_after_add_to_cart', $productAdded, $item); 46 47 } 47 48 -
simpler-checkout/trunk/includes/Services/QuotationService.php
r2980496 r3009471 12 12 use Simpler\Exceptions\UnshippableCartException; 13 13 use Simpler\Exceptions\UnshippableLocationException; 14 use Simpler\Models\{Fee, Money, P aymentMethod, ProductAttribute, Quotation, QuotationRequest, QuotedProduct};14 use Simpler\Models\{Fee, Money, ProductAttribute, Quotation, QuotationRequest, QuotedProduct}; 15 15 16 16 class QuotationService -
simpler-checkout/trunk/includes/button.php
r2906969 r3009471 64 64 } 65 65 66 return simplerwc_button("shortcode_product", simplerwc_prepare_product($product), SIMPLERWC_BTNPOS_PRODUCT_SHORTCODE); 66 if (apply_filters('simplerwc_should_render_product_button', true, $product)) { 67 return simplerwc_button("shortcode_product", simplerwc_prepare_product($product), SIMPLERWC_BTNPOS_PRODUCT_SHORTCODE); 68 } 67 69 } 68 70 … … 78 80 } 79 81 80 return simplerwc_button("shortcode_cart", simplerwc_prepare_cart($cart), SIMPLERWC_BTNPOS_CART_SHORTCODE); 82 if (apply_filters('simplerwc_should_render_cart_button', true, $cart)) { 83 return simplerwc_button("shortcode_cart", simplerwc_prepare_cart($cart), SIMPLERWC_BTNPOS_CART_SHORTCODE); 84 } 81 85 } 82 86 … … 92 96 93 97 global $product; 94 echo simplerwc_button(get_option('simplerwc_product_button_placement'), simplerwc_prepare_product($product), SIMPLERWC_BTNPOS_PRODUCT_PAGE); 98 if (apply_filters('simplerwc_should_render_product_button', true, $product)) { 99 echo simplerwc_button(get_option('simplerwc_product_button_placement'), simplerwc_prepare_product($product), SIMPLERWC_BTNPOS_PRODUCT_PAGE); 100 }; 95 101 } 96 102 … … 110 116 } 111 117 112 echo simplerwc_button("minicart", simplerwc_prepare_cart($cart), SIMPLERWC_BTNPOS_MINICART); 118 if (apply_filters('simplerwc_should_render_cart_button', true, $cart)) { 119 echo simplerwc_button("minicart", simplerwc_prepare_cart($cart), SIMPLERWC_BTNPOS_MINICART); 120 } 113 121 } 114 122 … … 128 136 } 129 137 130 echo simplerwc_button(get_option('simplerwc_cart_page_button_placement'), simplerwc_prepare_cart($cart), SIMPLERWC_BTNPOS_PROCEED_TO_CHECKOUT); 138 if (apply_filters('simplerwc_should_render_cart_button', true, $cart)) { 139 echo simplerwc_button(get_option('simplerwc_cart_page_button_placement'), simplerwc_prepare_cart($cart), SIMPLERWC_BTNPOS_PROCEED_TO_CHECKOUT); 140 } 131 141 } 132 142 … … 146 156 } 147 157 148 echo simplerwc_button(get_option('simplerwc_checkout_page_button_placement'), simplerwc_prepare_cart($cart), SIMPLERWC_BTNPOS_BEFORE_CHECKOUT); 158 if (apply_filters('simplerwc_should_render_cart_button', true, $cart)) { 159 echo simplerwc_button(get_option('simplerwc_checkout_page_button_placement'), simplerwc_prepare_cart($cart), SIMPLERWC_BTNPOS_BEFORE_CHECKOUT); 160 } 149 161 } 150 162 … … 193 205 { 194 206 return esc_html(base64_encode(json_encode([ 195 'cart' => $cart, 207 'cart' => $cart['items'], 208 'coupon' => $cart['coupon'] ?? NULL, 196 209 'locale' => get_locale(), 197 210 'currency' => get_woocommerce_currency(), … … 202 215 { 203 216 return [ 204 simplerwc_get_product_attributes($product)217 'items' => [simplerwc_get_product_attributes($product)] 205 218 ]; 206 219 } … … 208 221 function simplerwc_prepare_cart($cart) 209 222 { 210 $ret = []; 223 $coupons = $cart->get_applied_coupons(); 224 $ret = [ 225 'coupon' => reset($coupons) ?? NULL, 226 'items' => [] 227 ]; 211 228 foreach ($cart->get_cart_contents() as $cart_item) { 212 229 if (!array_key_exists('data', $cart_item) || !($cart_item['data'] instanceof WC_Product)) { 230 continue; 231 } 232 233 if (apply_filters('simplerwc_button_should_ignore_cart_item', false, $cart_item)) { 213 234 continue; 214 235 } … … 224 245 $bundled_items[$idx]['quantity'] = $item['quantity'] / $cart_item['quantity']; 225 246 } 226 array_push($ret , simplerwc_get_cart_item_attributes($cart_item, $bundled_items));247 array_push($ret['items'], simplerwc_get_cart_item_attributes($cart_item, $bundled_items)); 227 248 } else { 228 array_push($ret , simplerwc_get_cart_item_attributes($cart_item));249 array_push($ret['items'], simplerwc_get_cart_item_attributes($cart_item)); 229 250 } 230 251 } … … 267 288 'sold_individually' => $product->is_sold_individually(), 268 289 'purchasable' => $product->is_purchasable(), 269 'attributes' => []290 'attributes' => apply_filters('simplerwc_button_get_product_attributes', [], $product) 270 291 ]; 271 292 if (is_a($product, 'WC_Product_Variable')) { -
simpler-checkout/trunk/includes/compat.php
r2980496 r3009471 69 69 } 70 70 // COD isn't enabled for any shipping method 71 if ( !($cod = $availablePaymentMethods['cod'])->enable_for_methods) {71 if (!($cod = $availablePaymentMethods['cod'])->enable_for_methods) { 72 72 return $paymentMethods; 73 73 } 74 74 // COD isn't enabled for quote's shipping method (e.g. local pickup or BoxNow) 75 if ( !in_array($quotation->get_shipping_rate()->get_method_id(), $cod->enable_for_methods)) {75 if (!in_array($quotation->get_shipping_rate()->get_method_id(), $cod->enable_for_methods)) { 76 76 return $paymentMethods; 77 77 } … … 99 99 function simplerwc_compat_wc_smart_cod_order(array $closures, OrderRequest $orderRequest): array 100 100 { 101 if ( ! ($paymentMethod = $orderRequest->get_order()->get_payment_method()) 102 || $paymentMethod->getType() != PaymentMethod::COD 103 || ! class_exists('Wc_Smart_Cod_Admin') 101 if ( 102 !($paymentMethod = $orderRequest->get_order()->get_payment_method()) 103 || $paymentMethod->getType() != PaymentMethod::COD 104 || !class_exists('Wc_Smart_Cod_Admin') 104 105 ) { 105 106 return $closures; … … 120 121 } 121 122 122 add_filter('simplerwc_order_fees', 'simplerwc_compat_wc_smart_cod_order', 10 , 2); 123 add_filter('simplerwc_order_fees', 'simplerwc_compat_wc_smart_cod_order', 10, 2); 124 125 // iThemeland Free Gifts : https://ithemelandco.com/plugins/free-gifts-for-woocommerce/ 126 function simplerwc_compat_ithemeland_free_gifts_add_to_cart() 127 { 128 if (!class_exists('iThemeland_front_order')) { 129 return; 130 } 131 $ithemeland = new iThemeland_front_order(); 132 $ithemeland->check_session_gift(); 133 $ithemeland->pw_add_free_gifts(); 134 } 135 136 function simplerwc_compat_ithemeland_free_gifts_ignore($value, $cart_item) 137 { 138 if (isset($cart_item['it_free_gift'])) { 139 return true; 140 } 141 return $value; 142 } 143 144 add_action('simplerwc_after_add_to_cart', 'simplerwc_compat_ithemeland_free_gifts_add_to_cart', 10, 0); 145 add_filter('simplerwc_button_should_ignore_cart_item', 'simplerwc_compat_ithemeland_free_gifts_ignore', 10, 2); -
simpler-checkout/trunk/includes/constants.php
r2980496 r3009471 1 1 <?php 2 2 3 const SIMPLERWC_VERSION = '0.7. 6';3 const SIMPLERWC_VERSION = '0.7.7'; 4 4 5 5 function simplerwc_get_sdk_uri() … … 21 21 switch (get_option('simpler_environment')) { 22 22 case 'development': 23 return 'http s://localhost:4003/v1/refunds';23 return 'http://merchant-api.simpler.test/api/v1/refunds'; 24 24 case 'sandbox': 25 25 return 'https://merchant.staging.simpler.so/api/v1/refunds'; … … 33 33 switch (get_option('simpler_environment')) { 34 34 case 'development': 35 return 'http s://localhost:4003/v1/integrations/status';35 return 'http://merchant-api.simpler.test/api/v1/integrations/status'; 36 36 case 'sandbox': 37 37 return 'https://merchant.staging.simpler.so/api/v1/integrations/status'; -
simpler-checkout/trunk/simpler.php
r2980496 r3009471 8 8 * Description: Simpler Checkout lets your customers complete their purchases in seconds, with any payment method they want, in any device or browser and without a password. 9 9 * Tags: woocommerce, checkout, payments, conversion rate 10 * Version: 0.7. 610 * Version: 0.7.7 11 11 * Requires at least: 5.1 12 12 * Tested up to: 6.3.1 -
simpler-checkout/trunk/vendor/autoload.php
r2980496 r3009471 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit5 e11b8fedcc547300b02e0b9084e2c12::getLoader();7 return ComposerAutoloaderInit54184cac7c4d89fb1088302c5c373494::getLoader(); -
simpler-checkout/trunk/vendor/composer/autoload_real.php
r2980496 r3009471 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit5 e11b8fedcc547300b02e0b9084e2c125 class ComposerAutoloaderInit54184cac7c4d89fb1088302c5c373494 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit5 e11b8fedcc547300b02e0b9084e2c12', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInit54184cac7c4d89fb1088302c5c373494', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); 29 spl_autoload_unregister(array('ComposerAutoloaderInit5 e11b8fedcc547300b02e0b9084e2c12', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInit54184cac7c4d89fb1088302c5c373494', 'loadClassLoader')); 30 30 31 31 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 33 33 require __DIR__ . '/autoload_static.php'; 34 34 35 call_user_func(\Composer\Autoload\ComposerStaticInit5 e11b8fedcc547300b02e0b9084e2c12::getInitializer($loader));35 call_user_func(\Composer\Autoload\ComposerStaticInit54184cac7c4d89fb1088302c5c373494::getInitializer($loader)); 36 36 } else { 37 37 $map = require __DIR__ . '/autoload_namespaces.php'; -
simpler-checkout/trunk/vendor/composer/autoload_static.php
r2980496 r3009471 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit5 e11b8fedcc547300b02e0b9084e2c127 class ComposerStaticInit54184cac7c4d89fb1088302c5c373494 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 84 84 { 85 85 return \Closure::bind(function () use ($loader) { 86 $loader->prefixLengthsPsr4 = ComposerStaticInit5 e11b8fedcc547300b02e0b9084e2c12::$prefixLengthsPsr4;87 $loader->prefixDirsPsr4 = ComposerStaticInit5 e11b8fedcc547300b02e0b9084e2c12::$prefixDirsPsr4;88 $loader->classMap = ComposerStaticInit5 e11b8fedcc547300b02e0b9084e2c12::$classMap;86 $loader->prefixLengthsPsr4 = ComposerStaticInit54184cac7c4d89fb1088302c5c373494::$prefixLengthsPsr4; 87 $loader->prefixDirsPsr4 = ComposerStaticInit54184cac7c4d89fb1088302c5c373494::$prefixDirsPsr4; 88 $loader->classMap = ComposerStaticInit54184cac7c4d89fb1088302c5c373494::$classMap; 89 89 90 90 }, null, ClassLoader::class); -
simpler-checkout/trunk/vendor/composer/installed.php
r2980496 r3009471 1 1 <?php return array( 2 2 'root' => array( 3 'pretty_version' => '0.7. 6',4 'version' => '0.7. 6.0',3 'pretty_version' => '0.7.7', 4 'version' => '0.7.7.0', 5 5 'type' => 'wordpress-plugin', 6 6 'install_path' => __DIR__ . '/../../', 7 7 'aliases' => array(), 8 'reference' => ' 6a429d9ed73ad03b0514f372e40bd0760235b535',8 'reference' => '725649f6395aababba993e9b189ed1a134bcfa35', 9 9 'name' => 'simpler-checkout/woo', 10 10 'dev' => false, … … 12 12 'versions' => array( 13 13 'simpler-checkout/woo' => array( 14 'pretty_version' => '0.7. 6',15 'version' => '0.7. 6.0',14 'pretty_version' => '0.7.7', 15 'version' => '0.7.7.0', 16 16 'type' => 'wordpress-plugin', 17 17 'install_path' => __DIR__ . '/../../', 18 18 'aliases' => array(), 19 'reference' => ' 6a429d9ed73ad03b0514f372e40bd0760235b535',19 'reference' => '725649f6395aababba993e9b189ed1a134bcfa35', 20 20 'dev_requirement' => false, 21 21 ),
Note: See TracChangeset
for help on using the changeset viewer.