Plugin Directory

Changeset 2996902


Ignore:
Timestamp:
11/16/2023 09:16:46 AM (2 years ago)
Author:
omise
Message:

Update to version 5.6.1 from GitHub

Location:
omise
Files:
10 edited
1 copied

Legend:

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

    r2996251 r2996902  
    11# 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))
    25
    36### [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  
    8989            $formDesign = $this->get_default_design_setting();
    9090        }
     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
    9199        return $formDesign;
    92100    }
  • omise/tags/5.6.1/omise-woocommerce.php

    r2996251 r2996902  
    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:     5.6.0
     7 * Version:     5.6.1
    88 * Author:      Opn Payments and contributors
    99 * Author URI:  https://github.com/omise/omise-woocommerce/graphs/contributors
     
    2323     * @var string
    2424     */
    25     public $version = '5.6.0';
     25    public $version = '5.6.1';
    2626
    2727    /**
  • omise/tags/5.6.1/readme.txt

    r2996251 r2996902  
    44Requires at least: 4.3.1
    55Tested up to: 6.4.0
    6 Stable tag: 5.6.0
     6Stable tag: 5.6.1
    77License: MIT
    88License URI: https://opensource.org/licenses/MIT
     
    3434
    3535== Changelog ==
     36
     37= 5.6.1 =
     38
     39- Fixed a custom font name bug. (PR [#419](https://github.com/omise/omise-woocommerce/pull/419))
    3640
    3741= 5.6.0 =
  • omise/tags/5.6.1/tests/unit/includes/admin/class-omise-page-card-form-customization-test.php

    r2996251 r2996902  
    1010    public function setUp(): void
    1111    {
    12         // mocking WP built-in functions
    13         if (!function_exists('get_option')) {
    14             function get_option() {}
    15         }
    16 
     12        Brain\Monkey\setUp();
    1713        Mockery::mock('alias:Omise_Admin_Page');
    1814        require_once __DIR__ . '/../../../../includes/admin/class-omise-page-card-form-customization.php';
     
    2117    public function tearDown(): void
    2218    {
     19        Brain\Monkey\tearDown();
    2320        Mockery::close();
    2421    }
     
    9592
    9693    /**
     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    /**
    97136     * Call protected/private method of a class.
    98137     *
  • omise/trunk/CHANGELOG.md

    r2996251 r2996902  
    11# 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))
    25
    36### [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  
    8989            $formDesign = $this->get_default_design_setting();
    9090        }
     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
    9199        return $formDesign;
    92100    }
  • omise/trunk/omise-woocommerce.php

    r2996251 r2996902  
    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:     5.6.0
     7 * Version:     5.6.1
    88 * Author:      Opn Payments and contributors
    99 * Author URI:  https://github.com/omise/omise-woocommerce/graphs/contributors
     
    2323     * @var string
    2424     */
    25     public $version = '5.6.0';
     25    public $version = '5.6.1';
    2626
    2727    /**
  • omise/trunk/readme.txt

    r2996251 r2996902  
    44Requires at least: 4.3.1
    55Tested up to: 6.4.0
    6 Stable tag: 5.6.0
     6Stable tag: 5.6.1
    77License: MIT
    88License URI: https://opensource.org/licenses/MIT
     
    3434
    3535== Changelog ==
     36
     37= 5.6.1 =
     38
     39- Fixed a custom font name bug. (PR [#419](https://github.com/omise/omise-woocommerce/pull/419))
    3640
    3741= 5.6.0 =
  • omise/trunk/tests/unit/includes/admin/class-omise-page-card-form-customization-test.php

    r2996251 r2996902  
    1010    public function setUp(): void
    1111    {
    12         // mocking WP built-in functions
    13         if (!function_exists('get_option')) {
    14             function get_option() {}
    15         }
    16 
     12        Brain\Monkey\setUp();
    1713        Mockery::mock('alias:Omise_Admin_Page');
    1814        require_once __DIR__ . '/../../../../includes/admin/class-omise-page-card-form-customization.php';
     
    2117    public function tearDown(): void
    2218    {
     19        Brain\Monkey\tearDown();
    2320        Mockery::close();
    2421    }
     
    9592
    9693    /**
     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    /**
    97136     * Call protected/private method of a class.
    98137     *
Note: See TracChangeset for help on using the changeset viewer.