Plugin Directory

Changeset 3223348


Ignore:
Timestamp:
01/16/2025 05:09:55 AM (12 months ago)
Author:
omise
Message:

Update to version 6.0.5 from GitHub

Location:
omise
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • omise/tags/6.0.5/CHANGELOG.md

    r3222104 r3223348  
    11# CHANGELOG
     2
     3## [v6.0.5 _(Jan 15, 2024)_](https://github.com/omise/omise-woocommerce/releases/tag/v6.0.5)
     4- Fix the issue of TrueMoney wallet not showing in payment options. (PR: [#500](https://github.com/omise/omise-woocommerce/pull/500))
    25
    36## [v6.0.4 _(Jan 13, 2024)_](https://github.com/omise/omise-woocommerce/releases/tag/v6.0.4)
  • omise/tags/6.0.5/includes/class-omise-capabilities.php

    r3186329 r3223348  
    9898            return false;
    9999        }
    100 
     100        $ajaxActions = ['update_order_review', 'checkout'];
     101        if (wp_doing_ajax() && in_array($_GET['wc-ajax'], $ajaxActions)) {
     102            return true;
     103        }
     104       
    101105        $endpoints = ['checkout', 'batch', 'cart', 'cart/select-shipping-rate'];
    102106
     
    105109                $len = strlen($wp->request);
    106110                if (strpos($wp->request, $endpoint) === $len - strlen($endpoint)) {
     111                    return true;
     112                }
     113            } else {
     114                $request_uri = $_SERVER['REQUEST_URI'];
     115                $home_url = home_url();
     116
     117                $request_uri = strtok($request_uri, '?');
     118                $home_url_path = rtrim(parse_url($home_url, PHP_URL_PATH), '/');
     119                $path = trim(str_replace($home_url_path, '', $request_uri), '/');
     120
     121                $len = strlen($path);
     122                if (strpos($path, $endpoint) === $len - strlen($endpoint)) {
    107123                    return true;
    108124                }
  • omise/tags/6.0.5/omise-woocommerce.php

    r3222104 r3223348  
    55 * Plugin URI:  https://www.omise.co/woocommerce
    66 * Description: Opn Payments is a WordPress plugin designed specifically for WooCommerce. The plugin adds support for Opn Payments Payment Gateway's payment methods to WooCommerce.
    7  * Version:     6.0.4
     7 * Version:     6.0.5
    88 * Author:      Opn Payments and contributors
    99 * Author URI:  https://github.com/omise/omise-woocommerce/graphs/contributors
     
    2424     * @var string
    2525     */
    26     public $version = '6.0.4';
     26    public $version = '6.0.5';
    2727
    2828    /**
  • omise/tags/6.0.5/readme.txt

    r3222104 r3223348  
    44Requires at least: 4.3.1
    55Tested up to: 6.6.2
    6 Stable tag: 6.0.4
     6Stable tag: 6.0.5
    77License: MIT
    88License URI: https://opensource.org/licenses/MIT
     
    3434
    3535== Changelog ==
     36
     37= 6.0.5 =
     38
     39- Fix the issue of TrueMoney wallet not showing in payment options. (PR: [#500](https://github.com/omise/omise-woocommerce/pull/500))
    3640
    3741= 6.0.4 =
  • omise/tags/6.0.5/tests/unit/includes/class-omise-capabilities-test.php

    r3182037 r3223348  
    115115     * @covers Omise_Capabilities
    116116     */
    117     public function test_ajax_call_to_store_api_calls_omise_capability_api($request, $query_vars, $expected)
     117    public function test_ajax_call_to_store_api_calls_omise_capability_api($request, $query_vars, $server_request_uri, $expected)
    118118    {
    119         if ($request || $query_vars) {
     119        if ($request || $query_vars || $server_request_uri) {
    120120            $wp = new stdClass();
    121121            $wp->request = $request;
    122122            $wp->query_vars = $query_vars;
    123123            $GLOBALS['wp'] = $wp;
     124        }
     125        Brain\Monkey\Functions\expect('home_url')
     126            ->andReturn('/');
     127        Brain\Monkey\Functions\expect('wp_doing_ajax')
     128            ->andReturn(false);
     129
     130        $_SERVER['REQUEST_URI'] = '/';
     131        if ($server_request_uri) {
     132            $_SERVER['REQUEST_URI'] = $server_request_uri;
    124133        }
    125134
     
    132141    {
    133142        return [
    134             [null, null, false], // empty to test empty wp
    135             ['wp-json/wc/store/v1/batch', [], true],
    136             ['wp-json/wc/store/v1/batch', ['rest_route' => '/wc/store/v1/batch'], true],
    137             ['', ['rest_route' => '/wc/store/v1/batch'], true],
    138             ['', '', false]
     143            [null, null, null, false], // empty to test empty wp
     144            ['wp-json/wc/store/v1/batch', [], null, true],
     145            ['wp-json/wc/store/v1/batch', ['rest_route' => '/wc/store/v1/batch'], null, true],
     146            ['', ['rest_route' => '/wc/store/v1/batch'], null, true],
     147            ['', '', '/other/checkout', true],
     148            ['', '', '/checkout/other', false],
     149            ['', '', '/checkout?ewe=323', true],
    139150        ];
    140151    }
  • omise/trunk/CHANGELOG.md

    r3222104 r3223348  
    11# CHANGELOG
     2
     3## [v6.0.5 _(Jan 15, 2024)_](https://github.com/omise/omise-woocommerce/releases/tag/v6.0.5)
     4- Fix the issue of TrueMoney wallet not showing in payment options. (PR: [#500](https://github.com/omise/omise-woocommerce/pull/500))
    25
    36## [v6.0.4 _(Jan 13, 2024)_](https://github.com/omise/omise-woocommerce/releases/tag/v6.0.4)
  • omise/trunk/includes/class-omise-capabilities.php

    r3186329 r3223348  
    9898            return false;
    9999        }
    100 
     100        $ajaxActions = ['update_order_review', 'checkout'];
     101        if (wp_doing_ajax() && in_array($_GET['wc-ajax'], $ajaxActions)) {
     102            return true;
     103        }
     104       
    101105        $endpoints = ['checkout', 'batch', 'cart', 'cart/select-shipping-rate'];
    102106
     
    105109                $len = strlen($wp->request);
    106110                if (strpos($wp->request, $endpoint) === $len - strlen($endpoint)) {
     111                    return true;
     112                }
     113            } else {
     114                $request_uri = $_SERVER['REQUEST_URI'];
     115                $home_url = home_url();
     116
     117                $request_uri = strtok($request_uri, '?');
     118                $home_url_path = rtrim(parse_url($home_url, PHP_URL_PATH), '/');
     119                $path = trim(str_replace($home_url_path, '', $request_uri), '/');
     120
     121                $len = strlen($path);
     122                if (strpos($path, $endpoint) === $len - strlen($endpoint)) {
    107123                    return true;
    108124                }
  • omise/trunk/omise-woocommerce.php

    r3222104 r3223348  
    55 * Plugin URI:  https://www.omise.co/woocommerce
    66 * Description: Opn Payments is a WordPress plugin designed specifically for WooCommerce. The plugin adds support for Opn Payments Payment Gateway's payment methods to WooCommerce.
    7  * Version:     6.0.4
     7 * Version:     6.0.5
    88 * Author:      Opn Payments and contributors
    99 * Author URI:  https://github.com/omise/omise-woocommerce/graphs/contributors
     
    2424     * @var string
    2525     */
    26     public $version = '6.0.4';
     26    public $version = '6.0.5';
    2727
    2828    /**
  • omise/trunk/readme.txt

    r3222104 r3223348  
    44Requires at least: 4.3.1
    55Tested up to: 6.6.2
    6 Stable tag: 6.0.4
     6Stable tag: 6.0.5
    77License: MIT
    88License URI: https://opensource.org/licenses/MIT
     
    3434
    3535== Changelog ==
     36
     37= 6.0.5 =
     38
     39- Fix the issue of TrueMoney wallet not showing in payment options. (PR: [#500](https://github.com/omise/omise-woocommerce/pull/500))
    3640
    3741= 6.0.4 =
  • omise/trunk/tests/unit/includes/class-omise-capabilities-test.php

    r3182037 r3223348  
    115115     * @covers Omise_Capabilities
    116116     */
    117     public function test_ajax_call_to_store_api_calls_omise_capability_api($request, $query_vars, $expected)
     117    public function test_ajax_call_to_store_api_calls_omise_capability_api($request, $query_vars, $server_request_uri, $expected)
    118118    {
    119         if ($request || $query_vars) {
     119        if ($request || $query_vars || $server_request_uri) {
    120120            $wp = new stdClass();
    121121            $wp->request = $request;
    122122            $wp->query_vars = $query_vars;
    123123            $GLOBALS['wp'] = $wp;
     124        }
     125        Brain\Monkey\Functions\expect('home_url')
     126            ->andReturn('/');
     127        Brain\Monkey\Functions\expect('wp_doing_ajax')
     128            ->andReturn(false);
     129
     130        $_SERVER['REQUEST_URI'] = '/';
     131        if ($server_request_uri) {
     132            $_SERVER['REQUEST_URI'] = $server_request_uri;
    124133        }
    125134
     
    132141    {
    133142        return [
    134             [null, null, false], // empty to test empty wp
    135             ['wp-json/wc/store/v1/batch', [], true],
    136             ['wp-json/wc/store/v1/batch', ['rest_route' => '/wc/store/v1/batch'], true],
    137             ['', ['rest_route' => '/wc/store/v1/batch'], true],
    138             ['', '', false]
     143            [null, null, null, false], // empty to test empty wp
     144            ['wp-json/wc/store/v1/batch', [], null, true],
     145            ['wp-json/wc/store/v1/batch', ['rest_route' => '/wc/store/v1/batch'], null, true],
     146            ['', ['rest_route' => '/wc/store/v1/batch'], null, true],
     147            ['', '', '/other/checkout', true],
     148            ['', '', '/checkout/other', false],
     149            ['', '', '/checkout?ewe=323', true],
    139150        ];
    140151    }
Note: See TracChangeset for help on using the changeset viewer.