Changeset 2996902
- Timestamp:
- 11/16/2023 09:16:46 AM (2 years ago)
- Location:
- omise
- Files:
-
- 10 edited
- 1 copied
-
tags/5.6.1 (copied) (copied from omise/trunk)
-
tags/5.6.1/CHANGELOG.md (modified) (1 diff)
-
tags/5.6.1/includes/admin/class-omise-page-card-form-customization.php (modified) (1 diff)
-
tags/5.6.1/omise-woocommerce.php (modified) (2 diffs)
-
tags/5.6.1/readme.txt (modified) (2 diffs)
-
tags/5.6.1/tests/unit/includes/admin/class-omise-page-card-form-customization-test.php (modified) (3 diffs)
-
trunk/CHANGELOG.md (modified) (1 diff)
-
trunk/includes/admin/class-omise-page-card-form-customization.php (modified) (1 diff)
-
trunk/omise-woocommerce.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/tests/unit/includes/admin/class-omise-page-card-form-customization-test.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
omise/tags/5.6.1/CHANGELOG.md
r2996251 r2996902 1 1 # CHANGELOG 2 3 ### [v5.6.1 _(Nov 16, 2023)_](https://github.com/omise/omise-woocommerce/releases/tag/v5.6.1) 4 - Fixed a custom font name bug. (PR [#419](https://github.com/omise/omise-woocommerce/pull/419)) 2 5 3 6 ### [v5.6.0 _(Nov 15, 2023)_](https://github.com/omise/omise-woocommerce/releases/tag/v5.6.0) -
omise/tags/5.6.1/includes/admin/class-omise-page-card-form-customization.php
r2996251 r2996902 89 89 $formDesign = $this->get_default_design_setting(); 90 90 } 91 92 // Old saved settings might not have the newer fields. Make sure 93 // we add the missing field 94 // TODO: Find a better way to handle this 95 if (!in_array('custom_name', $formDesign['font'])) { 96 $formDesign['font']['custom_name'] = ''; 97 } 98 91 99 return $formDesign; 92 100 } -
omise/tags/5.6.1/omise-woocommerce.php
r2996251 r2996902 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.6. 07 * Version: 5.6.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.6. 0';25 public $version = '5.6.1'; 26 26 27 27 /** -
omise/tags/5.6.1/readme.txt
r2996251 r2996902 4 4 Requires at least: 4.3.1 5 5 Tested up to: 6.4.0 6 Stable tag: 5.6. 06 Stable tag: 5.6.1 7 7 License: MIT 8 8 License URI: https://opensource.org/licenses/MIT … … 34 34 35 35 == Changelog == 36 37 = 5.6.1 = 38 39 - Fixed a custom font name bug. (PR [#419](https://github.com/omise/omise-woocommerce/pull/419)) 36 40 37 41 = 5.6.0 = -
omise/tags/5.6.1/tests/unit/includes/admin/class-omise-page-card-form-customization-test.php
r2996251 r2996902 10 10 public function setUp(): void 11 11 { 12 // mocking WP built-in functions 13 if (!function_exists('get_option')) { 14 function get_option() {} 15 } 16 12 Brain\Monkey\setUp(); 17 13 Mockery::mock('alias:Omise_Admin_Page'); 18 14 require_once __DIR__ . '/../../../../includes/admin/class-omise-page-card-form-customization.php'; … … 21 17 public function tearDown(): void 22 18 { 19 Brain\Monkey\tearDown(); 23 20 Mockery::close(); 24 21 } … … 95 92 96 93 /** 94 * Test for merchants using secure form prior to v5.6.0 95 * Make sure it includes custom_name 96 * @test 97 */ 98 public function testGetDesignSettingIncludesCustomName() 99 { 100 // settings of merchant's secure form prior to v5.6.0 101 $savedSettings = [ 102 'font' => [ 103 'name' => 'Poppins', 104 'size' => 16, 105 ], 106 'input' => [ 107 'height' => '44px', 108 'border_radius' => '4px', 109 'border_color' => '#475266', 110 'active_border_color' => '#475266', 111 'background_color' => '#131926', 112 'label_color' => '#E6EAF2', 113 'text_color' => '#ffffff', 114 'placeholder_color' => '#DBDBDB', 115 ], 116 'checkbox' => [ 117 'text_color' => '#E6EAF2', 118 'theme_color' => '#1451CC', 119 ] 120 ]; 121 122 Brain\Monkey\Functions\stubs( [ 123 'get_option' => $savedSettings, 124 ] ); 125 126 $obj = Omise_Page_Card_From_Customization::get_instance(); 127 $designValues = $obj->get_design_setting(); 128 129 $expected = $savedSettings; 130 $expected['font']['custom_name'] = ''; 131 $this->assertEqualsCanonicalizing($expected, $designValues); 132 $this->assertArrayHasKey('custom_name', $designValues['font']); 133 } 134 135 /** 97 136 * Call protected/private method of a class. 98 137 * -
omise/trunk/CHANGELOG.md
r2996251 r2996902 1 1 # CHANGELOG 2 3 ### [v5.6.1 _(Nov 16, 2023)_](https://github.com/omise/omise-woocommerce/releases/tag/v5.6.1) 4 - Fixed a custom font name bug. (PR [#419](https://github.com/omise/omise-woocommerce/pull/419)) 2 5 3 6 ### [v5.6.0 _(Nov 15, 2023)_](https://github.com/omise/omise-woocommerce/releases/tag/v5.6.0) -
omise/trunk/includes/admin/class-omise-page-card-form-customization.php
r2996251 r2996902 89 89 $formDesign = $this->get_default_design_setting(); 90 90 } 91 92 // Old saved settings might not have the newer fields. Make sure 93 // we add the missing field 94 // TODO: Find a better way to handle this 95 if (!in_array('custom_name', $formDesign['font'])) { 96 $formDesign['font']['custom_name'] = ''; 97 } 98 91 99 return $formDesign; 92 100 } -
omise/trunk/omise-woocommerce.php
r2996251 r2996902 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.6. 07 * Version: 5.6.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.6. 0';25 public $version = '5.6.1'; 26 26 27 27 /** -
omise/trunk/readme.txt
r2996251 r2996902 4 4 Requires at least: 4.3.1 5 5 Tested up to: 6.4.0 6 Stable tag: 5.6. 06 Stable tag: 5.6.1 7 7 License: MIT 8 8 License URI: https://opensource.org/licenses/MIT … … 34 34 35 35 == Changelog == 36 37 = 5.6.1 = 38 39 - Fixed a custom font name bug. (PR [#419](https://github.com/omise/omise-woocommerce/pull/419)) 36 40 37 41 = 5.6.0 = -
omise/trunk/tests/unit/includes/admin/class-omise-page-card-form-customization-test.php
r2996251 r2996902 10 10 public function setUp(): void 11 11 { 12 // mocking WP built-in functions 13 if (!function_exists('get_option')) { 14 function get_option() {} 15 } 16 12 Brain\Monkey\setUp(); 17 13 Mockery::mock('alias:Omise_Admin_Page'); 18 14 require_once __DIR__ . '/../../../../includes/admin/class-omise-page-card-form-customization.php'; … … 21 17 public function tearDown(): void 22 18 { 19 Brain\Monkey\tearDown(); 23 20 Mockery::close(); 24 21 } … … 95 92 96 93 /** 94 * Test for merchants using secure form prior to v5.6.0 95 * Make sure it includes custom_name 96 * @test 97 */ 98 public function testGetDesignSettingIncludesCustomName() 99 { 100 // settings of merchant's secure form prior to v5.6.0 101 $savedSettings = [ 102 'font' => [ 103 'name' => 'Poppins', 104 'size' => 16, 105 ], 106 'input' => [ 107 'height' => '44px', 108 'border_radius' => '4px', 109 'border_color' => '#475266', 110 'active_border_color' => '#475266', 111 'background_color' => '#131926', 112 'label_color' => '#E6EAF2', 113 'text_color' => '#ffffff', 114 'placeholder_color' => '#DBDBDB', 115 ], 116 'checkbox' => [ 117 'text_color' => '#E6EAF2', 118 'theme_color' => '#1451CC', 119 ] 120 ]; 121 122 Brain\Monkey\Functions\stubs( [ 123 'get_option' => $savedSettings, 124 ] ); 125 126 $obj = Omise_Page_Card_From_Customization::get_instance(); 127 $designValues = $obj->get_design_setting(); 128 129 $expected = $savedSettings; 130 $expected['font']['custom_name'] = ''; 131 $this->assertEqualsCanonicalizing($expected, $designValues); 132 $this->assertArrayHasKey('custom_name', $designValues['font']); 133 } 134 135 /** 97 136 * Call protected/private method of a class. 98 137 *
Note: See TracChangeset
for help on using the changeset viewer.