Plugin Directory

Changeset 3041307


Ignore:
Timestamp:
02/26/2024 01:33:21 PM (2 years ago)
Author:
simplercheckout
Message:

Version 0.7.9

Location:
simpler-checkout
Files:
2 added
22 edited
1 copied

Legend:

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

    r3017013 r3041307  
    55Tested up to: 6.1
    66Requires PHP: 7.0
    7 Stable tag: 0.7.8
     7Stable tag: 0.7.9
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    3535
    3636== Changelog ==
     37
     38== 0.7.9
     39Compat: [Pay for Payment for WooCommerce](https://wordpress.org/plugins/woocommerce-pay-for-payment/)
    3740
    3841== 0.7.8
  • simpler-checkout/tags/0.7.9/includes/Http/Controllers/OrderController.php

    r2972503 r3041307  
    8383        $response = [
    8484            'user_id'  => strval($user_id),
    85             'order_id' => strval($order->get_id())
     85            'order_id' => strval(apply_filters('simplerwc_order_id', $order->get_id(), $order))
    8686        ];
    8787
  • simpler-checkout/tags/0.7.9/includes/compat.php

    r3009471 r3041307  
    6464        return $paymentMethods;
    6565    }
     66
     67    $cod = $availablePaymentMethods['cod'];
     68
    6669    // COD is disabled
    6770    if ($availablePaymentMethods['cod']->enabled != 'yes') {
    6871        return $paymentMethods;
    6972    }
    70     // COD isn't enabled for any shipping method
    71     if (!($cod = $availablePaymentMethods['cod'])->enable_for_methods) {
     73    // COD isn't enabled for quote's shipping method (e.g. local pickup or BoxNow)
     74    if (count($cod->enable_for_methods) > 0 && !in_array($quotation->get_shipping_rate()->get_method_id(), $cod->enable_for_methods)) {
    7275        return $paymentMethods;
    7376    }
    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)) {
    76         return $paymentMethods;
     77
     78    $codCost = 0;
     79    if (class_exists('Wc_Smart_Cod_Admin')) {
     80        $codCost = $cod->settings['extra_fee'];
     81    } else if (class_exists('Pay4Pay')) {
     82        $codCost = $cod->settings['pay4pay_charges_fixed'];
    7783    }
     84
     85    $codCost = apply_filters('simplerwc_cod_cost_cents', $codCost);
    7886
    7987    $paymentMethods[] = new PaymentMethod(
     
    8189        $cod->title,
    8290        PaymentMethod::COD,
    83         Money::to_cents(class_exists('Wc_Smart_Cod_Admin') ? $cod->settings['extra_fee'] : 0),
     91        Money::to_cents($codCost),
    8492        null,
    8593        null
  • simpler-checkout/tags/0.7.9/includes/constants.php

    r3017013 r3041307  
    11<?php
    22
    3 const SIMPLERWC_VERSION = '0.7.8';
     3const SIMPLERWC_VERSION = '0.7.9';
    44
    55function simplerwc_get_sdk_uri()
  • simpler-checkout/tags/0.7.9/simpler.php

    r3017013 r3041307  
    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.8
     10 * Version: 0.7.9
    1111 * Requires at least: 5.1
    1212 * Tested up to: 6.3.1
     
    4848    require_once SIMPLERWC_PATH . 'includes/button.php';
    4949    require_once SIMPLERWC_PATH . 'includes/routes.php';
     50    require_once SIMPLERWC_PATH . 'includes/gateway.php';
    5051    require_once SIMPLERWC_PATH . 'includes/compat.php';
    5152} else {
  • simpler-checkout/tags/0.7.9/vendor/autoload.php

    r3017013 r3041307  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInitd401820ac76f35dd6dcc878560fa08dd::getLoader();
     7return ComposerAutoloaderInite536ee5e74ebd4bf5dfec3d9d7bf6f05::getLoader();
  • simpler-checkout/tags/0.7.9/vendor/composer/ClassLoader.php

    r2627368 r3041307  
    150150    /**
    151151     * @return string[] Array of classname => path
    152      * @psalm-var array<string, string>
     152     * @psalm-return array<string, string>
    153153     */
    154154    public function getClassMap()
  • simpler-checkout/tags/0.7.9/vendor/composer/InstalledVersions.php

    r2627368 r3041307  
    327327                    $installed[] = self::$installedByVendor[$vendorDir];
    328328                } elseif (is_file($vendorDir.'/composer/installed.php')) {
    329                     $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
     329                    /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
     330                    $required = require $vendorDir.'/composer/installed.php';
     331                    $installed[] = self::$installedByVendor[$vendorDir] = $required;
    330332                    if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    331333                        self::$installed = $installed[count($installed) - 1];
     
    339341            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
    340342            if (substr(__DIR__, -8, 1) !== 'C') {
    341                 self::$installed = require __DIR__ . '/installed.php';
     343                /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
     344                $required = require __DIR__ . '/installed.php';
     345                self::$installed = $required;
    342346            } else {
    343347                self::$installed = array();
    344348            }
    345349        }
    346         $installed[] = self::$installed;
     350
     351        if (self::$installed !== array()) {
     352            $installed[] = self::$installed;
     353        }
    347354
    348355        return $installed;
  • simpler-checkout/tags/0.7.9/vendor/composer/autoload_real.php

    r3017013 r3041307  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInitd401820ac76f35dd6dcc878560fa08dd
     5class ComposerAutoloaderInite536ee5e74ebd4bf5dfec3d9d7bf6f05
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInitd401820ac76f35dd6dcc878560fa08dd', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInite536ee5e74ebd4bf5dfec3d9d7bf6f05', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
    29         spl_autoload_unregister(array('ComposerAutoloaderInitd401820ac76f35dd6dcc878560fa08dd', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInite536ee5e74ebd4bf5dfec3d9d7bf6f05', '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\ComposerStaticInitd401820ac76f35dd6dcc878560fa08dd::getInitializer($loader));
     35            call_user_func(\Composer\Autoload\ComposerStaticInite536ee5e74ebd4bf5dfec3d9d7bf6f05::getInitializer($loader));
    3636        } else {
    3737            $map = require __DIR__ . '/autoload_namespaces.php';
  • simpler-checkout/tags/0.7.9/vendor/composer/autoload_static.php

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

    r3017013 r3041307  
    11<?php return array(
    22    'root' => array(
    3         'pretty_version' => '0.7.8',
    4         'version' => '0.7.8.0',
     3        'pretty_version' => '0.7.9',
     4        'version' => '0.7.9.0',
    55        'type' => 'wordpress-plugin',
    66        'install_path' => __DIR__ . '/../../',
    77        'aliases' => array(),
    8         'reference' => '775181b0f019363fc21e09d3b1455efabd1b83b9',
     8        'reference' => '90ecb79f3bb224afe6a15ba7ea09220d70265277',
    99        'name' => 'simpler-checkout/woo',
    1010        'dev' => false,
     
    1212    'versions' => array(
    1313        'simpler-checkout/woo' => array(
    14             'pretty_version' => '0.7.8',
    15             'version' => '0.7.8.0',
     14            'pretty_version' => '0.7.9',
     15            'version' => '0.7.9.0',
    1616            'type' => 'wordpress-plugin',
    1717            'install_path' => __DIR__ . '/../../',
    1818            'aliases' => array(),
    19             'reference' => '775181b0f019363fc21e09d3b1455efabd1b83b9',
     19            'reference' => '90ecb79f3bb224afe6a15ba7ea09220d70265277',
    2020            'dev_requirement' => false,
    2121        ),
  • simpler-checkout/trunk/README.txt

    r3017013 r3041307  
    55Tested up to: 6.1
    66Requires PHP: 7.0
    7 Stable tag: 0.7.8
     7Stable tag: 0.7.9
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    3535
    3636== Changelog ==
     37
     38== 0.7.9
     39Compat: [Pay for Payment for WooCommerce](https://wordpress.org/plugins/woocommerce-pay-for-payment/)
    3740
    3841== 0.7.8
  • simpler-checkout/trunk/includes/Http/Controllers/OrderController.php

    r2972503 r3041307  
    8383        $response = [
    8484            'user_id'  => strval($user_id),
    85             'order_id' => strval($order->get_id())
     85            'order_id' => strval(apply_filters('simplerwc_order_id', $order->get_id(), $order))
    8686        ];
    8787
  • simpler-checkout/trunk/includes/compat.php

    r3009471 r3041307  
    6464        return $paymentMethods;
    6565    }
     66
     67    $cod = $availablePaymentMethods['cod'];
     68
    6669    // COD is disabled
    6770    if ($availablePaymentMethods['cod']->enabled != 'yes') {
    6871        return $paymentMethods;
    6972    }
    70     // COD isn't enabled for any shipping method
    71     if (!($cod = $availablePaymentMethods['cod'])->enable_for_methods) {
     73    // COD isn't enabled for quote's shipping method (e.g. local pickup or BoxNow)
     74    if (count($cod->enable_for_methods) > 0 && !in_array($quotation->get_shipping_rate()->get_method_id(), $cod->enable_for_methods)) {
    7275        return $paymentMethods;
    7376    }
    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)) {
    76         return $paymentMethods;
     77
     78    $codCost = 0;
     79    if (class_exists('Wc_Smart_Cod_Admin')) {
     80        $codCost = $cod->settings['extra_fee'];
     81    } else if (class_exists('Pay4Pay')) {
     82        $codCost = $cod->settings['pay4pay_charges_fixed'];
    7783    }
     84
     85    $codCost = apply_filters('simplerwc_cod_cost_cents', $codCost);
    7886
    7987    $paymentMethods[] = new PaymentMethod(
     
    8189        $cod->title,
    8290        PaymentMethod::COD,
    83         Money::to_cents(class_exists('Wc_Smart_Cod_Admin') ? $cod->settings['extra_fee'] : 0),
     91        Money::to_cents($codCost),
    8492        null,
    8593        null
  • simpler-checkout/trunk/includes/constants.php

    r3017013 r3041307  
    11<?php
    22
    3 const SIMPLERWC_VERSION = '0.7.8';
     3const SIMPLERWC_VERSION = '0.7.9';
    44
    55function simplerwc_get_sdk_uri()
  • simpler-checkout/trunk/simpler.php

    r3017013 r3041307  
    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.8
     10 * Version: 0.7.9
    1111 * Requires at least: 5.1
    1212 * Tested up to: 6.3.1
     
    4848    require_once SIMPLERWC_PATH . 'includes/button.php';
    4949    require_once SIMPLERWC_PATH . 'includes/routes.php';
     50    require_once SIMPLERWC_PATH . 'includes/gateway.php';
    5051    require_once SIMPLERWC_PATH . 'includes/compat.php';
    5152} else {
  • simpler-checkout/trunk/vendor/autoload.php

    r3017013 r3041307  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInitd401820ac76f35dd6dcc878560fa08dd::getLoader();
     7return ComposerAutoloaderInite536ee5e74ebd4bf5dfec3d9d7bf6f05::getLoader();
  • simpler-checkout/trunk/vendor/composer/ClassLoader.php

    r2627368 r3041307  
    150150    /**
    151151     * @return string[] Array of classname => path
    152      * @psalm-var array<string, string>
     152     * @psalm-return array<string, string>
    153153     */
    154154    public function getClassMap()
  • simpler-checkout/trunk/vendor/composer/InstalledVersions.php

    r2627368 r3041307  
    327327                    $installed[] = self::$installedByVendor[$vendorDir];
    328328                } elseif (is_file($vendorDir.'/composer/installed.php')) {
    329                     $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
     329                    /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
     330                    $required = require $vendorDir.'/composer/installed.php';
     331                    $installed[] = self::$installedByVendor[$vendorDir] = $required;
    330332                    if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    331333                        self::$installed = $installed[count($installed) - 1];
     
    339341            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
    340342            if (substr(__DIR__, -8, 1) !== 'C') {
    341                 self::$installed = require __DIR__ . '/installed.php';
     343                /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
     344                $required = require __DIR__ . '/installed.php';
     345                self::$installed = $required;
    342346            } else {
    343347                self::$installed = array();
    344348            }
    345349        }
    346         $installed[] = self::$installed;
     350
     351        if (self::$installed !== array()) {
     352            $installed[] = self::$installed;
     353        }
    347354
    348355        return $installed;
  • simpler-checkout/trunk/vendor/composer/autoload_real.php

    r3017013 r3041307  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInitd401820ac76f35dd6dcc878560fa08dd
     5class ComposerAutoloaderInite536ee5e74ebd4bf5dfec3d9d7bf6f05
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInitd401820ac76f35dd6dcc878560fa08dd', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInite536ee5e74ebd4bf5dfec3d9d7bf6f05', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
    29         spl_autoload_unregister(array('ComposerAutoloaderInitd401820ac76f35dd6dcc878560fa08dd', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInite536ee5e74ebd4bf5dfec3d9d7bf6f05', '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\ComposerStaticInitd401820ac76f35dd6dcc878560fa08dd::getInitializer($loader));
     35            call_user_func(\Composer\Autoload\ComposerStaticInite536ee5e74ebd4bf5dfec3d9d7bf6f05::getInitializer($loader));
    3636        } else {
    3737            $map = require __DIR__ . '/autoload_namespaces.php';
  • simpler-checkout/trunk/vendor/composer/autoload_static.php

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

    r3017013 r3041307  
    11<?php return array(
    22    'root' => array(
    3         'pretty_version' => '0.7.8',
    4         'version' => '0.7.8.0',
     3        'pretty_version' => '0.7.9',
     4        'version' => '0.7.9.0',
    55        'type' => 'wordpress-plugin',
    66        'install_path' => __DIR__ . '/../../',
    77        'aliases' => array(),
    8         'reference' => '775181b0f019363fc21e09d3b1455efabd1b83b9',
     8        'reference' => '90ecb79f3bb224afe6a15ba7ea09220d70265277',
    99        'name' => 'simpler-checkout/woo',
    1010        'dev' => false,
     
    1212    'versions' => array(
    1313        'simpler-checkout/woo' => array(
    14             'pretty_version' => '0.7.8',
    15             'version' => '0.7.8.0',
     14            'pretty_version' => '0.7.9',
     15            'version' => '0.7.9.0',
    1616            'type' => 'wordpress-plugin',
    1717            'install_path' => __DIR__ . '/../../',
    1818            'aliases' => array(),
    19             'reference' => '775181b0f019363fc21e09d3b1455efabd1b83b9',
     19            'reference' => '90ecb79f3bb224afe6a15ba7ea09220d70265277',
    2020            'dev_requirement' => false,
    2121        ),
Note: See TracChangeset for help on using the changeset viewer.