Changeset 3223348
- Timestamp:
- 01/16/2025 05:09:55 AM (12 months ago)
- Location:
- omise
- Files:
-
- 10 edited
- 1 copied
-
tags/6.0.5 (copied) (copied from omise/trunk)
-
tags/6.0.5/CHANGELOG.md (modified) (1 diff)
-
tags/6.0.5/includes/class-omise-capabilities.php (modified) (2 diffs)
-
tags/6.0.5/omise-woocommerce.php (modified) (2 diffs)
-
tags/6.0.5/readme.txt (modified) (2 diffs)
-
tags/6.0.5/tests/unit/includes/class-omise-capabilities-test.php (modified) (2 diffs)
-
trunk/CHANGELOG.md (modified) (1 diff)
-
trunk/includes/class-omise-capabilities.php (modified) (2 diffs)
-
trunk/omise-woocommerce.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/tests/unit/includes/class-omise-capabilities-test.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
omise/tags/6.0.5/CHANGELOG.md
r3222104 r3223348 1 1 # 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)) 2 5 3 6 ## [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 98 98 return false; 99 99 } 100 100 $ajaxActions = ['update_order_review', 'checkout']; 101 if (wp_doing_ajax() && in_array($_GET['wc-ajax'], $ajaxActions)) { 102 return true; 103 } 104 101 105 $endpoints = ['checkout', 'batch', 'cart', 'cart/select-shipping-rate']; 102 106 … … 105 109 $len = strlen($wp->request); 106 110 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)) { 107 123 return true; 108 124 } -
omise/tags/6.0.5/omise-woocommerce.php
r3222104 r3223348 5 5 * Plugin URI: https://www.omise.co/woocommerce 6 6 * 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. 47 * Version: 6.0.5 8 8 * Author: Opn Payments and contributors 9 9 * Author URI: https://github.com/omise/omise-woocommerce/graphs/contributors … … 24 24 * @var string 25 25 */ 26 public $version = '6.0. 4';26 public $version = '6.0.5'; 27 27 28 28 /** -
omise/tags/6.0.5/readme.txt
r3222104 r3223348 4 4 Requires at least: 4.3.1 5 5 Tested up to: 6.6.2 6 Stable tag: 6.0. 46 Stable tag: 6.0.5 7 7 License: MIT 8 8 License URI: https://opensource.org/licenses/MIT … … 34 34 35 35 == 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)) 36 40 37 41 = 6.0.4 = -
omise/tags/6.0.5/tests/unit/includes/class-omise-capabilities-test.php
r3182037 r3223348 115 115 * @covers Omise_Capabilities 116 116 */ 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) 118 118 { 119 if ($request || $query_vars ) {119 if ($request || $query_vars || $server_request_uri) { 120 120 $wp = new stdClass(); 121 121 $wp->request = $request; 122 122 $wp->query_vars = $query_vars; 123 123 $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; 124 133 } 125 134 … … 132 141 { 133 142 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], 139 150 ]; 140 151 } -
omise/trunk/CHANGELOG.md
r3222104 r3223348 1 1 # 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)) 2 5 3 6 ## [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 98 98 return false; 99 99 } 100 100 $ajaxActions = ['update_order_review', 'checkout']; 101 if (wp_doing_ajax() && in_array($_GET['wc-ajax'], $ajaxActions)) { 102 return true; 103 } 104 101 105 $endpoints = ['checkout', 'batch', 'cart', 'cart/select-shipping-rate']; 102 106 … … 105 109 $len = strlen($wp->request); 106 110 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)) { 107 123 return true; 108 124 } -
omise/trunk/omise-woocommerce.php
r3222104 r3223348 5 5 * Plugin URI: https://www.omise.co/woocommerce 6 6 * 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. 47 * Version: 6.0.5 8 8 * Author: Opn Payments and contributors 9 9 * Author URI: https://github.com/omise/omise-woocommerce/graphs/contributors … … 24 24 * @var string 25 25 */ 26 public $version = '6.0. 4';26 public $version = '6.0.5'; 27 27 28 28 /** -
omise/trunk/readme.txt
r3222104 r3223348 4 4 Requires at least: 4.3.1 5 5 Tested up to: 6.6.2 6 Stable tag: 6.0. 46 Stable tag: 6.0.5 7 7 License: MIT 8 8 License URI: https://opensource.org/licenses/MIT … … 34 34 35 35 == 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)) 36 40 37 41 = 6.0.4 = -
omise/trunk/tests/unit/includes/class-omise-capabilities-test.php
r3182037 r3223348 115 115 * @covers Omise_Capabilities 116 116 */ 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) 118 118 { 119 if ($request || $query_vars ) {119 if ($request || $query_vars || $server_request_uri) { 120 120 $wp = new stdClass(); 121 121 $wp->request = $request; 122 122 $wp->query_vars = $query_vars; 123 123 $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; 124 133 } 125 134 … … 132 141 { 133 142 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], 139 150 ]; 140 151 }
Note: See TracChangeset
for help on using the changeset viewer.