Plugin Directory

Changeset 2996251


Ignore:
Timestamp:
11/15/2023 09:30:25 AM (2 years ago)
Author:
omise
Message:

Update to version 5.6.0 from GitHub

Location:
omise
Files:
6 added
44 edited
1 copied

Legend:

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

    r2987898 r2996251  
    11# CHANGELOG
     2
     3### [v5.6.0 _(Nov 15, 2023)_](https://github.com/omise/omise-woocommerce/releases/tag/v5.6.0)
     4- Support Google fonts other than Poppins. (PR [#416](https://github.com/omise/omise-woocommerce/pull/416))
    25
    36### [v5.5.1 _(Nov 2, 2023)_](https://github.com/omise/omise-woocommerce/releases/tag/v5.5.1)
  • omise/tags/5.6.0/assets/javascripts/card-form-customization.js

    r2892466 r2996251  
    5959}
    6060
     61function handleFontChange() {
     62  const fontName = document.getElementById('omise_sf_font_name');
     63
     64  if (fontName.value === OMISE_CUSTOM_FONT_OTHER) {
     65    document.getElementById('omise_sf_custom_font_name').style.display = null
     66  }
     67
     68  fontName.addEventListener('change', (event) => {
     69    const customFontName = document.getElementById('omise_sf_custom_font_name');
     70    const inputCustomFont = customFontName.querySelector('input')
     71
     72    if (event.target.value === OMISE_CUSTOM_FONT_OTHER) {
     73      customFontName.style.display = null;
     74      inputCustomFont.required = true;
     75    } else {
     76      customFontName.style.display = 'none';
     77      inputCustomFont.value = '';
     78      inputCustomFont.required = false;
     79    }
     80  });
     81}
     82
    6183function initOmiseCardForm() {
    6284  const customCardFormTheme = CARD_FORM_THEME ?? 'light';
     
    92114setDesignFormValues();
    93115handleColorInputChanges();
     116handleFontChange();
  • omise/tags/5.6.0/assets/javascripts/omise-embedded-card.js

    r2949923 r2996251  
    2626  element.style.height = iframeElementHeight + 'px'
    2727
     28  let fontName = font.name
     29  const isCustomFontSet = font.name.toLowerCase().trim() === OMISE_CUSTOM_FONT_OTHER.toLowerCase()
     30  const isCustomFontEmpty = font.custom_name.trim() === ''
     31
     32  if (isCustomFontSet && !isCustomFontEmpty) {
     33    fontName = font.custom_name.trim()
     34  }
     35
    2836  OmiseCard.configure({
    2937    publicKey: publicKey,
     
    3543    customCardFormBrandIcons: brandIcons ?? null,
    3644    style: {
    37       fontFamily: font.name,
     45      fontFamily: fontName,
    3846      fontSize: font.size,
    3947      input: {
  • omise/tags/5.6.0/composer.json

    r2946870 r2996251  
    66    "require-dev": {
    77        "phpunit/phpunit": "^5.7 || ^9.5",
    8         "mockery/mockery": "^1.6"
     8        "mockery/mockery": "^1.6",
     9        "brain/monkey": "^2.6"
    910    },
    1011    "scripts": {
  • omise/tags/5.6.0/includes/admin/class-omise-page-card-form-customization.php

    r2892466 r2996251  
    2828                'name' => 'Poppins',
    2929                'size' => 16,
     30                'custom_name' => ''
    3031            ],
    3132            'input' => [
     
    5253                'name' => 'Poppins',
    5354                'size' => 16,
     55                'custom_name' => ''
    5456            ],
    5557            'input' => [
     
    111113            }
    112114        }
     115
    113116        update_option(self::PAGE_NAME, $options);
    114117        $this->add_message('message', "Update has been saved!");
  • omise/tags/5.6.0/includes/admin/views/omise-page-card-form-customization.php

    r2892466 r2996251  
    55  $cardIcons = $omiseCardGateway->get_card_icons();
    66  $publicKey = Omise()->settings()->public_key();
     7  $customFontOther = 'Other';
    78?>
    89
     
    2526        <td class="text-bold" style="width: 250px;">Font Name</td>
    2627        <td>
    27           <select class="select-input" name="font[name]">
     28          <select id="omise_sf_font_name" class="select-input" name="font[name]">
    2829            <option value="Poppins">Poppins</option>
    29             <option value="Circular" selected>Circular</option>
    30           </select>
    31           <div class="description">Match font used in form with your selected font</div>
     30            <option value="<?php echo $customFontOther ?>"><?php echo $customFontOther ?></option>
     31          </select>
     32        </td>
     33      </tr>
     34
     35      <tr id="omise_sf_custom_font_name" style="display: none;">
     36        <td class="text-bold" style="width: 250px;"></td>
     37        <td>
     38          <input type="text" class="select-input" placeholder="Font Name" name="font[custom_name]" />
     39          <div class="description">Specify other font name (note: only Google Fonts supported)</div>
    3240        </td>
    3341      </tr>
     
    190198  window.CARD_BRAND_ICONS = JSON.parse(`<?php echo json_encode($cardIcons) ?>`);
    191199  window.LOCALE = `<?php echo get_locale(); ?>`;
     200  window.OMISE_CUSTOM_FONT_OTHER = `<?php echo $customFontOther ?>`;
    192201</script>
    193202<script src="<?php echo $assetUrl . '/javascripts/omise-embedded-card.js'; ?>"></script>
  • omise/tags/5.6.0/includes/admin/views/omise-page-settings.php

    r2979883 r2996251  
    140140                                    echo sprintf(
    141141                                        wp_kses(
    142                                             __( 'Unless dynamic webhooks are enabled, you must add the URL below as a new endpoint on your <a href="%s">Opn Payments dashboard</a> (HTTPS only).', 'omise' ),
     142                                            __( 'Unless dynamic webhooks are enabled, you must add the URL above as a new endpoint on your <a href="%s">Opn Payments dashboard</a> (HTTPS only).', 'omise' ),
    143143                                            [
    144144                                                'a' => ['href' => []],
  • omise/tags/5.6.0/includes/gateway/class-omise-payment-creditcard.php

    r2892466 r2996251  
    1616        $this->method_title       = __( 'Opn Payments Credit / Debit Card', 'omise' );
    1717        $this->method_description = wp_kses(
    18             __( 'Accept payment through <strong>Credit / Debit Card</strong> via Opn Payments payment gateway.', 'omise' ),
     18            __( 'Accept payment through <strong>Credit / Debit Card</strong> via Opn Payments.', 'omise' ),
    1919            array(
    2020                'strong' => array()
     
    149149                    'default'     => Omise_Card_Image::get_amex_default_display(),
    150150                    'description' => wp_kses(
    151                         __( 'This only controls the icons displayed on the checkout page.<br />It is not related to card processing on Omise payment gateway.', 'omise' ),
     151                        __( 'This only controls the icons displayed on the checkout page.<br />It is not related to card processing on Opn Payments.', 'omise' ),
    152152                        array( 'br' => array() )
    153153                    )
  • omise/tags/5.6.0/languages/omise-ja.po

    r2892466 r2996251  
    128128
    129129#: includes/gateway/class-omise-payment-creditcard.php:23
    130 msgid "Accept payment through <strong>Credit / Debit Card</strong> via Opn Payments payment gateway."
     130msgid "Accept payment through <strong>Credit / Debit Card</strong> via Opn Payments."
    131131msgstr "Opn Payments決済ゲートウェイを経由して<strong>クレジットカード/デビットカード</strong>決済を受け付けます。"
    132132
     
    176176
    177177#: includes/gateway/class-omise-payment-creditcard.php:134
    178 msgid "This only controls the icons displayed on the checkout page.<br />It is not related to card processing on Opn Payments payment gateway."
     178msgid "This only controls the icons displayed on the checkout page.<br />It is not related to card processing on Opn Payments."
    179179msgstr "ご提供可能なカードブランドのアイコンを決済画面に表示できます。<br/>本項目の選択内容は、カード処理システムには影響いたしません。"
    180180
  • omise/tags/5.6.0/languages/omise.pot

    r2892466 r2996251  
    127127
    128128#: includes/gateway/class-omise-payment-creditcard.php:23
    129 msgid "Accept payment through <strong>Credit / Debit Card</strong> via Opn Payments payment gateway."
     129msgid "Accept payment through <strong>Credit / Debit Card</strong> via Opn Payments."
    130130msgstr "Opn Payments決済ゲートウェイを経由して<strong>クレジットカード/デビットカード</strong>決済を受け付けます。"
    131131
     
    175175
    176176#: includes/gateway/class-omise-payment-creditcard.php:134
    177 msgid "This only controls the icons displayed on the checkout page.<br />It is not related to card processing on Opn Payments payment gateway."
     177msgid "This only controls the icons displayed on the checkout page.<br />It is not related to card processing on Opn Payments."
    178178msgstr "ご提供可能なカードブランドのアイコンを決済画面に表示できます。<br/>本項目の選択内容は、カード処理システムには影響いたしません。"
    179179
  • omise/tags/5.6.0/omise-woocommerce.php

    r2987898 r2996251  
    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.5.1
     7 * Version:     5.6.0
    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.5.1';
     25    public $version = '5.6.0';
    2626
    2727    /**
  • omise/tags/5.6.0/readme.txt

    r2987898 r2996251  
    33Tags: opn payments, payment, payment gateway, woocommerce plugin, omise, opn, installment, internet banking, alipay, paynow, truemoney wallet, woocommerce payment
    44Requires at least: 4.3.1
    5 Tested up to: 6.3.2
    6 Stable tag: 5.5.1
     5Tested up to: 6.4.0
     6Stable tag: 5.6.0
    77License: MIT
    88License URI: https://opensource.org/licenses/MIT
     
    3434
    3535== Changelog ==
     36
     37= 5.6.0 =
     38
     39- Support Google fonts other than Poppins. (PR [#416](https://github.com/omise/omise-woocommerce/pull/416))
    3640
    3741= 5.5.1 =
  • omise/tags/5.6.0/templates/myaccount/my-card.php

    r2892466 r2996251  
    5757        window.CARD_BRAND_ICONS = JSON.parse(`<?php echo json_encode($viewData['cardIcons']) ?>`);
    5858        window.LOCALE = `<?php echo get_locale(); ?>`;
     59        window.OMISE_CUSTOM_FONT_OTHER = 'Other';
    5960    </script>
    6061<?php endif; ?>
  • omise/tags/5.6.0/templates/payment/form.php

    r2892466 r2996251  
    6161        window.LOCALE = `<?php echo get_locale(); ?>`;
    6262        window.HIDE_REMEMBER_CARD = `<?php echo $hideRememberCard ?>` == 'yes' ? true : false;
     63        window.OMISE_CUSTOM_FONT_OTHER = 'Other';
    6364    </script>
    6465<?php endif; ?>
  • omise/tags/5.6.0/tests/unit/includes/gateway/abstract-omise-payment-base-card-test.php

    r2979883 r2996251  
    4141            }
    4242        };
     43    }
     44
     45    /**
     46     * close mockery after tests are done
     47     */
     48    public function tearDown(): void
     49    {
     50        Mockery::close();
    4351    }
    4452
  • omise/tags/5.6.0/tests/unit/includes/gateway/abstract-omise-payment-offline-test.php

    r2979883 r2996251  
    99        parent::setUp();
    1010        Mockery::mock('alias:Omise_Payment')->makePartial();
    11         require_once __DIR__ . '/../../../../includes/gateway/abstract-omise-payment-offline.php';
    1211    }
    1312}
  • omise/tags/5.6.0/tests/unit/includes/gateway/bootstrap-test-setup.php

    r2979883 r2996251  
    22
    33use PHPUnit\Framework\TestCase;
     4use Brain;
    45
    56abstract class Bootstrap_Test_Setup extends TestCase
     
    910    public function setUp(): void
    1011    {
    11         // mocking WP built-in functions
    12         if (!function_exists('wp_kses')) {
    13             function wp_kses() {}
    14         }
     12        Brain\Monkey\setUp();
     13        Brain\Monkey\Functions\stubs( [
     14            'wp_kses' => null,
     15            'add_action' => null,
     16        ] );
     17    }
    1518
    16         if (!function_exists('add_action')) {
    17             function add_action() {}
    18         }
     19    /**
     20     * close mockery after tests are done
     21     */
     22    public function tearDown(): void
     23    {
     24        Brain\Monkey\tearDown();
     25        Mockery::close();
    1926    }
    2027
     
    5461
    5562    /**
    56      * close mockery after tests are done
    57      */
    58     public function tearDown(): void
    59     {
    60         Mockery::close();
    61     }
    62 
    63     /**
    6463     * @runInSeparateProcess
    6564     */
  • omise/tags/5.6.0/tests/unit/includes/gateway/class-omise-offsite-test.php

    r2979883 r2996251  
    2323        // destroy object and clear memory
    2424        unset($offsite);
    25     }
    26 
    27     /**
    28      * close mockery after tests are done
    29      */
    30     public function tearDown(): void
    31     {
    32         parent::tearDown();
    33         Mockery::close();
    3425    }
    3526
  • omise/tags/5.6.0/tests/unit/includes/gateway/class-omise-payment-internetbanking-test.php

    r2979883 r2996251  
    99        $this->sourceType = 'fpx';
    1010        parent::setUp();
    11         // require_once __DIR__ . '/../../../../includes/backends/class-omise-backend-fpx.php';
    1211        require_once __DIR__ . '/../../../../includes/gateway/class-omise-payment-internetbanking.php';
    1312    }
  • omise/tags/5.6.0/tests/unit/includes/gateway/class-omise-payment-konbini-test.php

    r2979883 r2996251  
    88    public function setUp(): void
    99    {
     10        parent::setUp();
    1011        // Mocking the parent class
    1112        $offline = Mockery::mock('overload:Omise_Payment_Offline');
  • omise/tags/5.6.0/tests/unit/includes/gateway/class-omise-payment-ocbc-digital-test.php

    r2979883 r2996251  
    1919            function plugins_url() {
    2020                return "http://localhost";
    21             }
    22         }
    23 
    24         if (!function_exists('apply_filters')) {
    25             function apply_filters() {
    26                 return "http://localhost/image.png";
    2721            }
    2822        }
     
    8175    {
    8276        $result = $this->obj->get_icon();
    83         $this->assertEquals("http://localhost/image.png", $result);
     77        $this->assertEquals(
     78            "<img src='/ocbc-digital.png' class='Omise-Image' style='width: 60px; max-height: 30px;' alt='OCBC Digital' />",
     79            $result
     80        );
    8481    }
    8582
  • omise/tags/5.6.0/tests/unit/includes/gateway/class-omise-payment-promptpay-test.php

    r2979883 r2996251  
    11<?php
    2 
    3 use Mockery\Mock;
    42
    53class Omise_Payment_Promptpay_Test extends Omise_Payment_Offline_Test
     
    1513    public function setUp(): void
    1614    {
     15        parent::setUp();
    1716        function wc_timezone_offset() {}
    1817        function wp_create_nonce() {}
  • omise/trunk/CHANGELOG.md

    r2987898 r2996251  
    11# CHANGELOG
     2
     3### [v5.6.0 _(Nov 15, 2023)_](https://github.com/omise/omise-woocommerce/releases/tag/v5.6.0)
     4- Support Google fonts other than Poppins. (PR [#416](https://github.com/omise/omise-woocommerce/pull/416))
    25
    36### [v5.5.1 _(Nov 2, 2023)_](https://github.com/omise/omise-woocommerce/releases/tag/v5.5.1)
  • omise/trunk/assets/javascripts/card-form-customization.js

    r2892466 r2996251  
    5959}
    6060
     61function handleFontChange() {
     62  const fontName = document.getElementById('omise_sf_font_name');
     63
     64  if (fontName.value === OMISE_CUSTOM_FONT_OTHER) {
     65    document.getElementById('omise_sf_custom_font_name').style.display = null
     66  }
     67
     68  fontName.addEventListener('change', (event) => {
     69    const customFontName = document.getElementById('omise_sf_custom_font_name');
     70    const inputCustomFont = customFontName.querySelector('input')
     71
     72    if (event.target.value === OMISE_CUSTOM_FONT_OTHER) {
     73      customFontName.style.display = null;
     74      inputCustomFont.required = true;
     75    } else {
     76      customFontName.style.display = 'none';
     77      inputCustomFont.value = '';
     78      inputCustomFont.required = false;
     79    }
     80  });
     81}
     82
    6183function initOmiseCardForm() {
    6284  const customCardFormTheme = CARD_FORM_THEME ?? 'light';
     
    92114setDesignFormValues();
    93115handleColorInputChanges();
     116handleFontChange();
  • omise/trunk/assets/javascripts/omise-embedded-card.js

    r2949923 r2996251  
    2626  element.style.height = iframeElementHeight + 'px'
    2727
     28  let fontName = font.name
     29  const isCustomFontSet = font.name.toLowerCase().trim() === OMISE_CUSTOM_FONT_OTHER.toLowerCase()
     30  const isCustomFontEmpty = font.custom_name.trim() === ''
     31
     32  if (isCustomFontSet && !isCustomFontEmpty) {
     33    fontName = font.custom_name.trim()
     34  }
     35
    2836  OmiseCard.configure({
    2937    publicKey: publicKey,
     
    3543    customCardFormBrandIcons: brandIcons ?? null,
    3644    style: {
    37       fontFamily: font.name,
     45      fontFamily: fontName,
    3846      fontSize: font.size,
    3947      input: {
  • omise/trunk/composer.json

    r2946870 r2996251  
    66    "require-dev": {
    77        "phpunit/phpunit": "^5.7 || ^9.5",
    8         "mockery/mockery": "^1.6"
     8        "mockery/mockery": "^1.6",
     9        "brain/monkey": "^2.6"
    910    },
    1011    "scripts": {
  • omise/trunk/includes/admin/class-omise-page-card-form-customization.php

    r2892466 r2996251  
    2828                'name' => 'Poppins',
    2929                'size' => 16,
     30                'custom_name' => ''
    3031            ],
    3132            'input' => [
     
    5253                'name' => 'Poppins',
    5354                'size' => 16,
     55                'custom_name' => ''
    5456            ],
    5557            'input' => [
     
    111113            }
    112114        }
     115
    113116        update_option(self::PAGE_NAME, $options);
    114117        $this->add_message('message', "Update has been saved!");
  • omise/trunk/includes/admin/views/omise-page-card-form-customization.php

    r2892466 r2996251  
    55  $cardIcons = $omiseCardGateway->get_card_icons();
    66  $publicKey = Omise()->settings()->public_key();
     7  $customFontOther = 'Other';
    78?>
    89
     
    2526        <td class="text-bold" style="width: 250px;">Font Name</td>
    2627        <td>
    27           <select class="select-input" name="font[name]">
     28          <select id="omise_sf_font_name" class="select-input" name="font[name]">
    2829            <option value="Poppins">Poppins</option>
    29             <option value="Circular" selected>Circular</option>
    30           </select>
    31           <div class="description">Match font used in form with your selected font</div>
     30            <option value="<?php echo $customFontOther ?>"><?php echo $customFontOther ?></option>
     31          </select>
     32        </td>
     33      </tr>
     34
     35      <tr id="omise_sf_custom_font_name" style="display: none;">
     36        <td class="text-bold" style="width: 250px;"></td>
     37        <td>
     38          <input type="text" class="select-input" placeholder="Font Name" name="font[custom_name]" />
     39          <div class="description">Specify other font name (note: only Google Fonts supported)</div>
    3240        </td>
    3341      </tr>
     
    190198  window.CARD_BRAND_ICONS = JSON.parse(`<?php echo json_encode($cardIcons) ?>`);
    191199  window.LOCALE = `<?php echo get_locale(); ?>`;
     200  window.OMISE_CUSTOM_FONT_OTHER = `<?php echo $customFontOther ?>`;
    192201</script>
    193202<script src="<?php echo $assetUrl . '/javascripts/omise-embedded-card.js'; ?>"></script>
  • omise/trunk/includes/admin/views/omise-page-settings.php

    r2979883 r2996251  
    140140                                    echo sprintf(
    141141                                        wp_kses(
    142                                             __( 'Unless dynamic webhooks are enabled, you must add the URL below as a new endpoint on your <a href="%s">Opn Payments dashboard</a> (HTTPS only).', 'omise' ),
     142                                            __( 'Unless dynamic webhooks are enabled, you must add the URL above as a new endpoint on your <a href="%s">Opn Payments dashboard</a> (HTTPS only).', 'omise' ),
    143143                                            [
    144144                                                'a' => ['href' => []],
  • omise/trunk/includes/gateway/class-omise-payment-creditcard.php

    r2892466 r2996251  
    1616        $this->method_title       = __( 'Opn Payments Credit / Debit Card', 'omise' );
    1717        $this->method_description = wp_kses(
    18             __( 'Accept payment through <strong>Credit / Debit Card</strong> via Opn Payments payment gateway.', 'omise' ),
     18            __( 'Accept payment through <strong>Credit / Debit Card</strong> via Opn Payments.', 'omise' ),
    1919            array(
    2020                'strong' => array()
     
    149149                    'default'     => Omise_Card_Image::get_amex_default_display(),
    150150                    'description' => wp_kses(
    151                         __( 'This only controls the icons displayed on the checkout page.<br />It is not related to card processing on Omise payment gateway.', 'omise' ),
     151                        __( 'This only controls the icons displayed on the checkout page.<br />It is not related to card processing on Opn Payments.', 'omise' ),
    152152                        array( 'br' => array() )
    153153                    )
  • omise/trunk/languages/omise-ja.po

    r2892466 r2996251  
    128128
    129129#: includes/gateway/class-omise-payment-creditcard.php:23
    130 msgid "Accept payment through <strong>Credit / Debit Card</strong> via Opn Payments payment gateway."
     130msgid "Accept payment through <strong>Credit / Debit Card</strong> via Opn Payments."
    131131msgstr "Opn Payments決済ゲートウェイを経由して<strong>クレジットカード/デビットカード</strong>決済を受け付けます。"
    132132
     
    176176
    177177#: includes/gateway/class-omise-payment-creditcard.php:134
    178 msgid "This only controls the icons displayed on the checkout page.<br />It is not related to card processing on Opn Payments payment gateway."
     178msgid "This only controls the icons displayed on the checkout page.<br />It is not related to card processing on Opn Payments."
    179179msgstr "ご提供可能なカードブランドのアイコンを決済画面に表示できます。<br/>本項目の選択内容は、カード処理システムには影響いたしません。"
    180180
  • omise/trunk/languages/omise.pot

    r2892466 r2996251  
    127127
    128128#: includes/gateway/class-omise-payment-creditcard.php:23
    129 msgid "Accept payment through <strong>Credit / Debit Card</strong> via Opn Payments payment gateway."
     129msgid "Accept payment through <strong>Credit / Debit Card</strong> via Opn Payments."
    130130msgstr "Opn Payments決済ゲートウェイを経由して<strong>クレジットカード/デビットカード</strong>決済を受け付けます。"
    131131
     
    175175
    176176#: includes/gateway/class-omise-payment-creditcard.php:134
    177 msgid "This only controls the icons displayed on the checkout page.<br />It is not related to card processing on Opn Payments payment gateway."
     177msgid "This only controls the icons displayed on the checkout page.<br />It is not related to card processing on Opn Payments."
    178178msgstr "ご提供可能なカードブランドのアイコンを決済画面に表示できます。<br/>本項目の選択内容は、カード処理システムには影響いたしません。"
    179179
  • omise/trunk/omise-woocommerce.php

    r2987898 r2996251  
    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.5.1
     7 * Version:     5.6.0
    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.5.1';
     25    public $version = '5.6.0';
    2626
    2727    /**
  • omise/trunk/readme.txt

    r2987898 r2996251  
    33Tags: opn payments, payment, payment gateway, woocommerce plugin, omise, opn, installment, internet banking, alipay, paynow, truemoney wallet, woocommerce payment
    44Requires at least: 4.3.1
    5 Tested up to: 6.3.2
    6 Stable tag: 5.5.1
     5Tested up to: 6.4.0
     6Stable tag: 5.6.0
    77License: MIT
    88License URI: https://opensource.org/licenses/MIT
     
    3434
    3535== Changelog ==
     36
     37= 5.6.0 =
     38
     39- Support Google fonts other than Poppins. (PR [#416](https://github.com/omise/omise-woocommerce/pull/416))
    3640
    3741= 5.5.1 =
  • omise/trunk/templates/myaccount/my-card.php

    r2892466 r2996251  
    5757        window.CARD_BRAND_ICONS = JSON.parse(`<?php echo json_encode($viewData['cardIcons']) ?>`);
    5858        window.LOCALE = `<?php echo get_locale(); ?>`;
     59        window.OMISE_CUSTOM_FONT_OTHER = 'Other';
    5960    </script>
    6061<?php endif; ?>
  • omise/trunk/templates/payment/form.php

    r2892466 r2996251  
    6161        window.LOCALE = `<?php echo get_locale(); ?>`;
    6262        window.HIDE_REMEMBER_CARD = `<?php echo $hideRememberCard ?>` == 'yes' ? true : false;
     63        window.OMISE_CUSTOM_FONT_OTHER = 'Other';
    6364    </script>
    6465<?php endif; ?>
  • omise/trunk/tests/unit/includes/gateway/abstract-omise-payment-base-card-test.php

    r2979883 r2996251  
    4141            }
    4242        };
     43    }
     44
     45    /**
     46     * close mockery after tests are done
     47     */
     48    public function tearDown(): void
     49    {
     50        Mockery::close();
    4351    }
    4452
  • omise/trunk/tests/unit/includes/gateway/abstract-omise-payment-offline-test.php

    r2979883 r2996251  
    99        parent::setUp();
    1010        Mockery::mock('alias:Omise_Payment')->makePartial();
    11         require_once __DIR__ . '/../../../../includes/gateway/abstract-omise-payment-offline.php';
    1211    }
    1312}
  • omise/trunk/tests/unit/includes/gateway/bootstrap-test-setup.php

    r2979883 r2996251  
    22
    33use PHPUnit\Framework\TestCase;
     4use Brain;
    45
    56abstract class Bootstrap_Test_Setup extends TestCase
     
    910    public function setUp(): void
    1011    {
    11         // mocking WP built-in functions
    12         if (!function_exists('wp_kses')) {
    13             function wp_kses() {}
    14         }
     12        Brain\Monkey\setUp();
     13        Brain\Monkey\Functions\stubs( [
     14            'wp_kses' => null,
     15            'add_action' => null,
     16        ] );
     17    }
    1518
    16         if (!function_exists('add_action')) {
    17             function add_action() {}
    18         }
     19    /**
     20     * close mockery after tests are done
     21     */
     22    public function tearDown(): void
     23    {
     24        Brain\Monkey\tearDown();
     25        Mockery::close();
    1926    }
    2027
     
    5461
    5562    /**
    56      * close mockery after tests are done
    57      */
    58     public function tearDown(): void
    59     {
    60         Mockery::close();
    61     }
    62 
    63     /**
    6463     * @runInSeparateProcess
    6564     */
  • omise/trunk/tests/unit/includes/gateway/class-omise-offsite-test.php

    r2979883 r2996251  
    2323        // destroy object and clear memory
    2424        unset($offsite);
    25     }
    26 
    27     /**
    28      * close mockery after tests are done
    29      */
    30     public function tearDown(): void
    31     {
    32         parent::tearDown();
    33         Mockery::close();
    3425    }
    3526
  • omise/trunk/tests/unit/includes/gateway/class-omise-payment-internetbanking-test.php

    r2979883 r2996251  
    99        $this->sourceType = 'fpx';
    1010        parent::setUp();
    11         // require_once __DIR__ . '/../../../../includes/backends/class-omise-backend-fpx.php';
    1211        require_once __DIR__ . '/../../../../includes/gateway/class-omise-payment-internetbanking.php';
    1312    }
  • omise/trunk/tests/unit/includes/gateway/class-omise-payment-konbini-test.php

    r2979883 r2996251  
    88    public function setUp(): void
    99    {
     10        parent::setUp();
    1011        // Mocking the parent class
    1112        $offline = Mockery::mock('overload:Omise_Payment_Offline');
  • omise/trunk/tests/unit/includes/gateway/class-omise-payment-ocbc-digital-test.php

    r2979883 r2996251  
    1919            function plugins_url() {
    2020                return "http://localhost";
    21             }
    22         }
    23 
    24         if (!function_exists('apply_filters')) {
    25             function apply_filters() {
    26                 return "http://localhost/image.png";
    2721            }
    2822        }
     
    8175    {
    8276        $result = $this->obj->get_icon();
    83         $this->assertEquals("http://localhost/image.png", $result);
     77        $this->assertEquals(
     78            "<img src='/ocbc-digital.png' class='Omise-Image' style='width: 60px; max-height: 30px;' alt='OCBC Digital' />",
     79            $result
     80        );
    8481    }
    8582
  • omise/trunk/tests/unit/includes/gateway/class-omise-payment-promptpay-test.php

    r2979883 r2996251  
    11<?php
    2 
    3 use Mockery\Mock;
    42
    53class Omise_Payment_Promptpay_Test extends Omise_Payment_Offline_Test
     
    1513    public function setUp(): void
    1614    {
     15        parent::setUp();
    1716        function wc_timezone_offset() {}
    1817        function wp_create_nonce() {}
Note: See TracChangeset for help on using the changeset viewer.