Plugin Directory

Changeset 3009471


Ignore:
Timestamp:
12/13/2023 02:39:41 PM (2 years ago)
Author:
simplercheckout
Message:

Version 0.7.7

Location:
simpler-checkout
Files:
22 edited
1 copied

Legend:

Unmodified
Added
Removed
  • simpler-checkout/tags/0.7.7/README.txt

    r2980496 r3009471  
    55Tested up to: 6.1
    66Requires PHP: 7.0
    7 Stable tag: 0.7.6
     7Stable tag: 0.7.7
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    3535
    3636== Changelog ==
     37
     38== 0.7.8
     39Feat: preset coupon applied to woo cart to simpler checkout form
     40
     41== 0.7.7
     42Feat: introduce `simplerwc_should_render_product_button` and `simplerwc_should_render_cart_button` filters for granular control of rendering logic
     43Feat: introduce `simplerwc_button_get_product_attibutes` and `simplerwc_get_cart_item_data` filters for managing cart item attributes
     44Compat: [iThemeland Free Gifts](https://ithemelandco.com/plugins/free-gifts-for-woocommerce/)
    3745
    3846== 0.7.6
  • simpler-checkout/tags/0.7.7/includes/Services/CartHelper.php

    r2785748 r3009471  
    3434                $item->get_quantity(),
    3535                NULL,
    36                 $item->get_attributes_array()
     36                $item->get_attributes_array(),
     37                apply_filters('simplerwc_get_cart_item_data', [], $item)
    3738            );
    3839        }
     
    4344        }
    4445
    45         do_action('simplerwc_after_add_to_cart');
     46        do_action('simplerwc_after_add_to_cart', $productAdded, $item);
    4647    }
    4748
  • simpler-checkout/tags/0.7.7/includes/Services/QuotationService.php

    r2980496 r3009471  
    1212use Simpler\Exceptions\UnshippableCartException;
    1313use Simpler\Exceptions\UnshippableLocationException;
    14 use Simpler\Models\{Fee, Money, PaymentMethod, ProductAttribute, Quotation, QuotationRequest, QuotedProduct};
     14use Simpler\Models\{Fee, Money, ProductAttribute, Quotation, QuotationRequest, QuotedProduct};
    1515
    1616class QuotationService
  • simpler-checkout/tags/0.7.7/includes/button.php

    r2906969 r3009471  
    6464    }
    6565
    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    }
    6769}
    6870
     
    7880    }
    7981
    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    }
    8185}
    8286
     
    9296
    9397    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    };
    95101}
    96102
     
    110116    }
    111117
    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    }
    113121}
    114122
     
    128136    }
    129137
    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    }
    131141}
    132142
     
    146156    }
    147157
    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    }
    149161}
    150162
     
    193205{
    194206    return esc_html(base64_encode(json_encode([
    195         'cart' => $cart,
     207        'cart' => $cart['items'],
     208        'coupon' => $cart['coupon'] ?? NULL,
    196209        'locale' => get_locale(),
    197210        'currency' => get_woocommerce_currency(),
     
    202215{
    203216    return [
    204         simplerwc_get_product_attributes($product)
     217        'items' => [simplerwc_get_product_attributes($product)]
    205218    ];
    206219}
     
    208221function simplerwc_prepare_cart($cart)
    209222{
    210     $ret = [];
     223    $coupons = $cart->get_applied_coupons();
     224    $ret = [
     225        'coupon' => reset($coupons) ?? NULL,
     226        'items' => []
     227    ];
    211228    foreach ($cart->get_cart_contents() as $cart_item) {
    212229        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)) {
    213234            continue;
    214235        }
     
    224245                $bundled_items[$idx]['quantity'] = $item['quantity'] / $cart_item['quantity'];
    225246            }
    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));
    227248        } else {
    228             array_push($ret, simplerwc_get_cart_item_attributes($cart_item));
     249            array_push($ret['items'], simplerwc_get_cart_item_attributes($cart_item));
    229250        }
    230251    }
     
    267288        'sold_individually'  => $product->is_sold_individually(),
    268289        'purchasable'        => $product->is_purchasable(),
    269         'attributes'         => []
     290        'attributes'         => apply_filters('simplerwc_button_get_product_attributes', [], $product)
    270291    ];
    271292    if (is_a($product, 'WC_Product_Variable')) {
  • simpler-checkout/tags/0.7.7/includes/compat.php

    r2980496 r3009471  
    6969    }
    7070    // COD isn't enabled for any shipping method
    71     if ( ! ($cod = $availablePaymentMethods['cod'])->enable_for_methods) {
     71    if (!($cod = $availablePaymentMethods['cod'])->enable_for_methods) {
    7272        return $paymentMethods;
    7373    }
    7474    // 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)) {
    7676        return $paymentMethods;
    7777    }
     
    9999function simplerwc_compat_wc_smart_cod_order(array $closures, OrderRequest $orderRequest): array
    100100{
    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')
    104105    ) {
    105106        return $closures;
     
    120121}
    121122
    122 add_filter('simplerwc_order_fees', 'simplerwc_compat_wc_smart_cod_order', 10 , 2);
     123add_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/
     126function 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
     136function 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
     144add_action('simplerwc_after_add_to_cart', 'simplerwc_compat_ithemeland_free_gifts_add_to_cart', 10, 0);
     145add_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  
    11<?php
    22
    3 const SIMPLERWC_VERSION = '0.7.6';
     3const SIMPLERWC_VERSION = '0.7.7';
    44
    55function simplerwc_get_sdk_uri()
     
    2121    switch (get_option('simpler_environment')) {
    2222        case 'development':
    23             return 'https://localhost:4003/v1/refunds';
     23            return 'http://merchant-api.simpler.test/api/v1/refunds';
    2424        case 'sandbox':
    2525            return 'https://merchant.staging.simpler.so/api/v1/refunds';
     
    3333    switch (get_option('simpler_environment')) {
    3434        case 'development':
    35             return 'https://localhost:4003/v1/integrations/status';
     35            return 'http://merchant-api.simpler.test/api/v1/integrations/status';
    3636        case 'sandbox':
    3737            return 'https://merchant.staging.simpler.so/api/v1/integrations/status';
  • simpler-checkout/tags/0.7.7/simpler.php

    r2980496 r3009471  
    88 * 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.
    99 * Tags: woocommerce, checkout, payments, conversion rate
    10  * Version: 0.7.6
     10 * Version: 0.7.7
    1111 * Requires at least: 5.1
    1212 * Tested up to: 6.3.1
  • simpler-checkout/tags/0.7.7/vendor/autoload.php

    r2980496 r3009471  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInit5e11b8fedcc547300b02e0b9084e2c12::getLoader();
     7return ComposerAutoloaderInit54184cac7c4d89fb1088302c5c373494::getLoader();
  • simpler-checkout/tags/0.7.7/vendor/composer/autoload_real.php

    r2980496 r3009471  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit5e11b8fedcc547300b02e0b9084e2c12
     5class ComposerAutoloaderInit54184cac7c4d89fb1088302c5c373494
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInit5e11b8fedcc547300b02e0b9084e2c12', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInit54184cac7c4d89fb1088302c5c373494', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
    29         spl_autoload_unregister(array('ComposerAutoloaderInit5e11b8fedcc547300b02e0b9084e2c12', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInit54184cac7c4d89fb1088302c5c373494', 'loadClassLoader'));
    3030
    3131        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     
    3333            require __DIR__ . '/autoload_static.php';
    3434
    35             call_user_func(\Composer\Autoload\ComposerStaticInit5e11b8fedcc547300b02e0b9084e2c12::getInitializer($loader));
     35            call_user_func(\Composer\Autoload\ComposerStaticInit54184cac7c4d89fb1088302c5c373494::getInitializer($loader));
    3636        } else {
    3737            $map = require __DIR__ . '/autoload_namespaces.php';
  • simpler-checkout/tags/0.7.7/vendor/composer/autoload_static.php

    r2980496 r3009471  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit5e11b8fedcc547300b02e0b9084e2c12
     7class ComposerStaticInit54184cac7c4d89fb1088302c5c373494
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    8484    {
    8585        return \Closure::bind(function () use ($loader) {
    86             $loader->prefixLengthsPsr4 = ComposerStaticInit5e11b8fedcc547300b02e0b9084e2c12::$prefixLengthsPsr4;
    87             $loader->prefixDirsPsr4 = ComposerStaticInit5e11b8fedcc547300b02e0b9084e2c12::$prefixDirsPsr4;
    88             $loader->classMap = ComposerStaticInit5e11b8fedcc547300b02e0b9084e2c12::$classMap;
     86            $loader->prefixLengthsPsr4 = ComposerStaticInit54184cac7c4d89fb1088302c5c373494::$prefixLengthsPsr4;
     87            $loader->prefixDirsPsr4 = ComposerStaticInit54184cac7c4d89fb1088302c5c373494::$prefixDirsPsr4;
     88            $loader->classMap = ComposerStaticInit54184cac7c4d89fb1088302c5c373494::$classMap;
    8989
    9090        }, null, ClassLoader::class);
  • simpler-checkout/tags/0.7.7/vendor/composer/installed.php

    r2980496 r3009471  
    11<?php return array(
    22    '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',
    55        'type' => 'wordpress-plugin',
    66        'install_path' => __DIR__ . '/../../',
    77        'aliases' => array(),
    8         'reference' => '6a429d9ed73ad03b0514f372e40bd0760235b535',
     8        'reference' => '725649f6395aababba993e9b189ed1a134bcfa35',
    99        'name' => 'simpler-checkout/woo',
    1010        'dev' => false,
     
    1212    'versions' => array(
    1313        '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',
    1616            'type' => 'wordpress-plugin',
    1717            'install_path' => __DIR__ . '/../../',
    1818            'aliases' => array(),
    19             'reference' => '6a429d9ed73ad03b0514f372e40bd0760235b535',
     19            'reference' => '725649f6395aababba993e9b189ed1a134bcfa35',
    2020            'dev_requirement' => false,
    2121        ),
  • simpler-checkout/trunk/README.txt

    r2980496 r3009471  
    55Tested up to: 6.1
    66Requires PHP: 7.0
    7 Stable tag: 0.7.6
     7Stable tag: 0.7.7
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    3535
    3636== Changelog ==
     37
     38== 0.7.8
     39Feat: preset coupon applied to woo cart to simpler checkout form
     40
     41== 0.7.7
     42Feat: introduce `simplerwc_should_render_product_button` and `simplerwc_should_render_cart_button` filters for granular control of rendering logic
     43Feat: introduce `simplerwc_button_get_product_attibutes` and `simplerwc_get_cart_item_data` filters for managing cart item attributes
     44Compat: [iThemeland Free Gifts](https://ithemelandco.com/plugins/free-gifts-for-woocommerce/)
    3745
    3846== 0.7.6
  • simpler-checkout/trunk/includes/Services/CartHelper.php

    r2785748 r3009471  
    3434                $item->get_quantity(),
    3535                NULL,
    36                 $item->get_attributes_array()
     36                $item->get_attributes_array(),
     37                apply_filters('simplerwc_get_cart_item_data', [], $item)
    3738            );
    3839        }
     
    4344        }
    4445
    45         do_action('simplerwc_after_add_to_cart');
     46        do_action('simplerwc_after_add_to_cart', $productAdded, $item);
    4647    }
    4748
  • simpler-checkout/trunk/includes/Services/QuotationService.php

    r2980496 r3009471  
    1212use Simpler\Exceptions\UnshippableCartException;
    1313use Simpler\Exceptions\UnshippableLocationException;
    14 use Simpler\Models\{Fee, Money, PaymentMethod, ProductAttribute, Quotation, QuotationRequest, QuotedProduct};
     14use Simpler\Models\{Fee, Money, ProductAttribute, Quotation, QuotationRequest, QuotedProduct};
    1515
    1616class QuotationService
  • simpler-checkout/trunk/includes/button.php

    r2906969 r3009471  
    6464    }
    6565
    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    }
    6769}
    6870
     
    7880    }
    7981
    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    }
    8185}
    8286
     
    9296
    9397    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    };
    95101}
    96102
     
    110116    }
    111117
    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    }
    113121}
    114122
     
    128136    }
    129137
    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    }
    131141}
    132142
     
    146156    }
    147157
    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    }
    149161}
    150162
     
    193205{
    194206    return esc_html(base64_encode(json_encode([
    195         'cart' => $cart,
     207        'cart' => $cart['items'],
     208        'coupon' => $cart['coupon'] ?? NULL,
    196209        'locale' => get_locale(),
    197210        'currency' => get_woocommerce_currency(),
     
    202215{
    203216    return [
    204         simplerwc_get_product_attributes($product)
     217        'items' => [simplerwc_get_product_attributes($product)]
    205218    ];
    206219}
     
    208221function simplerwc_prepare_cart($cart)
    209222{
    210     $ret = [];
     223    $coupons = $cart->get_applied_coupons();
     224    $ret = [
     225        'coupon' => reset($coupons) ?? NULL,
     226        'items' => []
     227    ];
    211228    foreach ($cart->get_cart_contents() as $cart_item) {
    212229        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)) {
    213234            continue;
    214235        }
     
    224245                $bundled_items[$idx]['quantity'] = $item['quantity'] / $cart_item['quantity'];
    225246            }
    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));
    227248        } else {
    228             array_push($ret, simplerwc_get_cart_item_attributes($cart_item));
     249            array_push($ret['items'], simplerwc_get_cart_item_attributes($cart_item));
    229250        }
    230251    }
     
    267288        'sold_individually'  => $product->is_sold_individually(),
    268289        'purchasable'        => $product->is_purchasable(),
    269         'attributes'         => []
     290        'attributes'         => apply_filters('simplerwc_button_get_product_attributes', [], $product)
    270291    ];
    271292    if (is_a($product, 'WC_Product_Variable')) {
  • simpler-checkout/trunk/includes/compat.php

    r2980496 r3009471  
    6969    }
    7070    // COD isn't enabled for any shipping method
    71     if ( ! ($cod = $availablePaymentMethods['cod'])->enable_for_methods) {
     71    if (!($cod = $availablePaymentMethods['cod'])->enable_for_methods) {
    7272        return $paymentMethods;
    7373    }
    7474    // 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)) {
    7676        return $paymentMethods;
    7777    }
     
    9999function simplerwc_compat_wc_smart_cod_order(array $closures, OrderRequest $orderRequest): array
    100100{
    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')
    104105    ) {
    105106        return $closures;
     
    120121}
    121122
    122 add_filter('simplerwc_order_fees', 'simplerwc_compat_wc_smart_cod_order', 10 , 2);
     123add_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/
     126function 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
     136function 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
     144add_action('simplerwc_after_add_to_cart', 'simplerwc_compat_ithemeland_free_gifts_add_to_cart', 10, 0);
     145add_filter('simplerwc_button_should_ignore_cart_item', 'simplerwc_compat_ithemeland_free_gifts_ignore', 10, 2);
  • simpler-checkout/trunk/includes/constants.php

    r2980496 r3009471  
    11<?php
    22
    3 const SIMPLERWC_VERSION = '0.7.6';
     3const SIMPLERWC_VERSION = '0.7.7';
    44
    55function simplerwc_get_sdk_uri()
     
    2121    switch (get_option('simpler_environment')) {
    2222        case 'development':
    23             return 'https://localhost:4003/v1/refunds';
     23            return 'http://merchant-api.simpler.test/api/v1/refunds';
    2424        case 'sandbox':
    2525            return 'https://merchant.staging.simpler.so/api/v1/refunds';
     
    3333    switch (get_option('simpler_environment')) {
    3434        case 'development':
    35             return 'https://localhost:4003/v1/integrations/status';
     35            return 'http://merchant-api.simpler.test/api/v1/integrations/status';
    3636        case 'sandbox':
    3737            return 'https://merchant.staging.simpler.so/api/v1/integrations/status';
  • simpler-checkout/trunk/simpler.php

    r2980496 r3009471  
    88 * 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.
    99 * Tags: woocommerce, checkout, payments, conversion rate
    10  * Version: 0.7.6
     10 * Version: 0.7.7
    1111 * Requires at least: 5.1
    1212 * Tested up to: 6.3.1
  • simpler-checkout/trunk/vendor/autoload.php

    r2980496 r3009471  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInit5e11b8fedcc547300b02e0b9084e2c12::getLoader();
     7return ComposerAutoloaderInit54184cac7c4d89fb1088302c5c373494::getLoader();
  • simpler-checkout/trunk/vendor/composer/autoload_real.php

    r2980496 r3009471  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit5e11b8fedcc547300b02e0b9084e2c12
     5class ComposerAutoloaderInit54184cac7c4d89fb1088302c5c373494
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInit5e11b8fedcc547300b02e0b9084e2c12', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInit54184cac7c4d89fb1088302c5c373494', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
    29         spl_autoload_unregister(array('ComposerAutoloaderInit5e11b8fedcc547300b02e0b9084e2c12', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInit54184cac7c4d89fb1088302c5c373494', 'loadClassLoader'));
    3030
    3131        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     
    3333            require __DIR__ . '/autoload_static.php';
    3434
    35             call_user_func(\Composer\Autoload\ComposerStaticInit5e11b8fedcc547300b02e0b9084e2c12::getInitializer($loader));
     35            call_user_func(\Composer\Autoload\ComposerStaticInit54184cac7c4d89fb1088302c5c373494::getInitializer($loader));
    3636        } else {
    3737            $map = require __DIR__ . '/autoload_namespaces.php';
  • simpler-checkout/trunk/vendor/composer/autoload_static.php

    r2980496 r3009471  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit5e11b8fedcc547300b02e0b9084e2c12
     7class ComposerStaticInit54184cac7c4d89fb1088302c5c373494
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    8484    {
    8585        return \Closure::bind(function () use ($loader) {
    86             $loader->prefixLengthsPsr4 = ComposerStaticInit5e11b8fedcc547300b02e0b9084e2c12::$prefixLengthsPsr4;
    87             $loader->prefixDirsPsr4 = ComposerStaticInit5e11b8fedcc547300b02e0b9084e2c12::$prefixDirsPsr4;
    88             $loader->classMap = ComposerStaticInit5e11b8fedcc547300b02e0b9084e2c12::$classMap;
     86            $loader->prefixLengthsPsr4 = ComposerStaticInit54184cac7c4d89fb1088302c5c373494::$prefixLengthsPsr4;
     87            $loader->prefixDirsPsr4 = ComposerStaticInit54184cac7c4d89fb1088302c5c373494::$prefixDirsPsr4;
     88            $loader->classMap = ComposerStaticInit54184cac7c4d89fb1088302c5c373494::$classMap;
    8989
    9090        }, null, ClassLoader::class);
  • simpler-checkout/trunk/vendor/composer/installed.php

    r2980496 r3009471  
    11<?php return array(
    22    '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',
    55        'type' => 'wordpress-plugin',
    66        'install_path' => __DIR__ . '/../../',
    77        'aliases' => array(),
    8         'reference' => '6a429d9ed73ad03b0514f372e40bd0760235b535',
     8        'reference' => '725649f6395aababba993e9b189ed1a134bcfa35',
    99        'name' => 'simpler-checkout/woo',
    1010        'dev' => false,
     
    1212    'versions' => array(
    1313        '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',
    1616            'type' => 'wordpress-plugin',
    1717            'install_path' => __DIR__ . '/../../',
    1818            'aliases' => array(),
    19             'reference' => '6a429d9ed73ad03b0514f372e40bd0760235b535',
     19            'reference' => '725649f6395aababba993e9b189ed1a134bcfa35',
    2020            'dev_requirement' => false,
    2121        ),
Note: See TracChangeset for help on using the changeset viewer.