Changeset 2962817
- Timestamp:
- 09/05/2023 07:06:03 AM (2 years ago)
- Location:
- omise
- Files:
-
- 2 added
- 14 edited
- 1 copied
-
tags/5.3.1 (copied) (copied from omise/trunk)
-
tags/5.3.1/CHANGELOG.md (modified) (1 diff)
-
tags/5.3.1/includes/class-omise-capabilities.php (modified) (2 diffs)
-
tags/5.3.1/omise-woocommerce.php (modified) (2 diffs)
-
tags/5.3.1/readme.txt (modified) (2 diffs)
-
tags/5.3.1/tests/unit/includes/backends/class-omise-backend-installment-test.php (modified) (1 diff)
-
tags/5.3.1/tests/unit/includes/class-omise-capabilities-test.php (added)
-
tags/5.3.1/tests/unit/includes/gateway/class-omise-offsite-test.php (modified) (1 diff)
-
tags/5.3.1/tests/unit/omise-woocommerce-test.php (modified) (1 diff)
-
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/backends/class-omise-backend-installment-test.php (modified) (1 diff)
-
trunk/tests/unit/includes/class-omise-capabilities-test.php (added)
-
trunk/tests/unit/includes/gateway/class-omise-offsite-test.php (modified) (1 diff)
-
trunk/tests/unit/omise-woocommerce-test.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
omise/tags/5.3.1/CHANGELOG.md
r2957621 r2962817 1 1 # CHANGELOG 2 3 ### [v5.3.1 _(Sep 05, 2023)_](https://github.com/omise/omise-woocommerce/releases/tag/v5.3.1) 4 - Fixed capabilities api calling on every pages. (PR [#398](https://github.com/omise/omise-woocommerce/pull/398)) 2 5 3 6 ### [v5.3.0 _(Aug 23, 2023)_](https://github.com/omise/omise-woocommerce/releases/tag/v5.3.0) -
omise/tags/5.3.1/includes/class-omise-capabilities.php
r2912289 r2962817 36 36 public static function retrieve($pKey = null, $sKey = null) 37 37 { 38 if ( !self::shouldCallApi() ) { 39 return null; 40 } 41 38 42 $keys = self::getKeys($pKey, $sKey); 39 43 … … 68 72 return self::$instance; 69 73 } 74 75 /** 76 * @return boolean 77 */ 78 public static function shouldCallApi() { 79 $omiseSettingPages = [ 'omise' ]; 80 $currentAdminPage = isset( $_GET[ 'page' ] ) ? $_GET[ 'page' ] : ''; 81 // If page is omise setting page from admin panel. 82 $isOmiseSettingPage = is_admin() && in_array( $currentAdminPage, $omiseSettingPages ); 83 84 // If page is checkout page but not thank you page. 85 // By default thank you page is also part of checkout pages 86 // and we do not need to call capabilities on thank you page. 87 // If endpoint url is `order-received`, it mean thank you page. 88 $isPaymentPage = is_checkout() && !is_wc_endpoint_url( 'order-received' ); 89 90 return $isPaymentPage || $isOmiseSettingPage; 91 } 92 70 93 71 94 /** -
omise/tags/5.3.1/omise-woocommerce.php
r2957621 r2962817 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: 5.3. 07 * Version: 5.3.1 8 8 * Author: Opn Payments and contributors 9 9 * Author URI: https://github.com/omise/omise-woocommerce/graphs/contributors … … 23 23 * @var string 24 24 */ 25 public $version = '5.3. 0';25 public $version = '5.3.1'; 26 26 27 27 /** -
omise/tags/5.3.1/readme.txt
r2957621 r2962817 4 4 Requires at least: 4.3.1 5 5 Tested up to: 6.0.2 6 Stable tag: 5.3. 06 Stable tag: 5.3.1 7 7 License: MIT 8 8 License URI: https://opensource.org/licenses/MIT … … 34 34 35 35 == Changelog == 36 37 = 5.3.1 = 38 39 - Fixed capabilities api calling on every pages. (PR [#398](https://github.com/omise/omise-woocommerce/pull/398)) 36 40 37 41 = 5.3.0 = -
omise/tags/5.3.1/tests/unit/includes/backends/class-omise-backend-installment-test.php
r2852769 r2962817 248 248 } 249 249 } 250 251 /**252 * Mock Omise_Capabilities class.253 * NOTE: This might not be an ideal way to mock a class,254 * feel free to enhance the test or the core code.255 *256 * @see includes/class-omise-capabilities257 */258 class Omise_Capabilities259 {260 /**261 * @var self262 */263 protected static $the_instance = null;264 265 public static function retrieve()266 {267 self::$the_instance = self::$the_instance ?: new self();268 return self::$the_instance;269 }270 271 public function is_zero_interest()272 {273 return false;274 }275 } -
omise/tags/5.3.1/tests/unit/includes/gateway/class-omise-offsite-test.php
r2957621 r2962817 2 2 3 3 use PHPunit\Framework\TestCase; 4 use Mockery;5 4 6 5 abstract class Offsite_Test extends TestCase -
omise/tags/5.3.1/tests/unit/omise-woocommerce-test.php
r2946870 r2962817 1 1 <?php 2 2 3 use Omise;4 use Mockery;5 3 use PHPUnit\Framework\TestCase; 6 4 -
omise/trunk/CHANGELOG.md
r2957621 r2962817 1 1 # CHANGELOG 2 3 ### [v5.3.1 _(Sep 05, 2023)_](https://github.com/omise/omise-woocommerce/releases/tag/v5.3.1) 4 - Fixed capabilities api calling on every pages. (PR [#398](https://github.com/omise/omise-woocommerce/pull/398)) 2 5 3 6 ### [v5.3.0 _(Aug 23, 2023)_](https://github.com/omise/omise-woocommerce/releases/tag/v5.3.0) -
omise/trunk/includes/class-omise-capabilities.php
r2912289 r2962817 36 36 public static function retrieve($pKey = null, $sKey = null) 37 37 { 38 if ( !self::shouldCallApi() ) { 39 return null; 40 } 41 38 42 $keys = self::getKeys($pKey, $sKey); 39 43 … … 68 72 return self::$instance; 69 73 } 74 75 /** 76 * @return boolean 77 */ 78 public static function shouldCallApi() { 79 $omiseSettingPages = [ 'omise' ]; 80 $currentAdminPage = isset( $_GET[ 'page' ] ) ? $_GET[ 'page' ] : ''; 81 // If page is omise setting page from admin panel. 82 $isOmiseSettingPage = is_admin() && in_array( $currentAdminPage, $omiseSettingPages ); 83 84 // If page is checkout page but not thank you page. 85 // By default thank you page is also part of checkout pages 86 // and we do not need to call capabilities on thank you page. 87 // If endpoint url is `order-received`, it mean thank you page. 88 $isPaymentPage = is_checkout() && !is_wc_endpoint_url( 'order-received' ); 89 90 return $isPaymentPage || $isOmiseSettingPage; 91 } 92 70 93 71 94 /** -
omise/trunk/omise-woocommerce.php
r2957621 r2962817 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: 5.3. 07 * Version: 5.3.1 8 8 * Author: Opn Payments and contributors 9 9 * Author URI: https://github.com/omise/omise-woocommerce/graphs/contributors … … 23 23 * @var string 24 24 */ 25 public $version = '5.3. 0';25 public $version = '5.3.1'; 26 26 27 27 /** -
omise/trunk/readme.txt
r2957621 r2962817 4 4 Requires at least: 4.3.1 5 5 Tested up to: 6.0.2 6 Stable tag: 5.3. 06 Stable tag: 5.3.1 7 7 License: MIT 8 8 License URI: https://opensource.org/licenses/MIT … … 34 34 35 35 == Changelog == 36 37 = 5.3.1 = 38 39 - Fixed capabilities api calling on every pages. (PR [#398](https://github.com/omise/omise-woocommerce/pull/398)) 36 40 37 41 = 5.3.0 = -
omise/trunk/tests/unit/includes/backends/class-omise-backend-installment-test.php
r2852769 r2962817 248 248 } 249 249 } 250 251 /**252 * Mock Omise_Capabilities class.253 * NOTE: This might not be an ideal way to mock a class,254 * feel free to enhance the test or the core code.255 *256 * @see includes/class-omise-capabilities257 */258 class Omise_Capabilities259 {260 /**261 * @var self262 */263 protected static $the_instance = null;264 265 public static function retrieve()266 {267 self::$the_instance = self::$the_instance ?: new self();268 return self::$the_instance;269 }270 271 public function is_zero_interest()272 {273 return false;274 }275 } -
omise/trunk/tests/unit/includes/gateway/class-omise-offsite-test.php
r2957621 r2962817 2 2 3 3 use PHPunit\Framework\TestCase; 4 use Mockery;5 4 6 5 abstract class Offsite_Test extends TestCase -
omise/trunk/tests/unit/omise-woocommerce-test.php
r2946870 r2962817 1 1 <?php 2 2 3 use Omise;4 use Mockery;5 3 use PHPUnit\Framework\TestCase; 6 4
Note: See TracChangeset
for help on using the changeset viewer.