Plugin Directory

Changeset 3691008


Ignore:
Timestamp:
09/11/2026 07:49:04 AM (2 months ago)
Author:
ozowpayments
Message:

Release version 1.3.7

Location:
wc-ozow-gateway
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wc-ozow-gateway/tags/1.3.7/build/index-asset.php

    r3547557 r3691008  
    88return array(
    99        'dependencies' => array( 'wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n' ),
    10         'version'      => '1.3.6',
     10        'version'      => '1.3.7',
    1111);
  • wc-ozow-gateway/tags/1.3.7/changelog.txt

    r3547486 r3691008  
    5151* Dev – Tested with WordPress 6.9.4 and WooCommerce 10.7.0.
    5252* Dev – Performed regression testing to ensure stable payment functionality.
     53
     54= 1.3.7 - 2026-09-09 =
     55* Added – Support for international billing and shipping addresses.
     56* Fix – Resolved payment errors when customers use non-South-African billing or shipping addresses.
     57* Fix – Updated CountryCode handling to use the merchant’s store country instead of the customer’s billing country.
     58* Changed – Restricted Ozow availability to stores configured with South Africa (ZA) as the store country and South African Rand (ZAR) as the store currency.
     59* Fix – Updated resend payment link functionality to use the merchant’s store country and follow the same availability rules.
     60* Dev – No database schema changes. Existing payment request, HashCheck generation, and logging functionality remain unchanged.
  • wc-ozow-gateway/tags/1.3.7/classes/class-wc-gateway-ozow.php

    r3547486 r3691008  
    143143
    144144                // Setup available countries.
    145                 $this->available_countries = array( 'ZA' );
     145                $this->available_countries = array();
    146146
    147147                // Setup available currency codes.
    148                 $this->available_currencies = array( 'ZAR' );
     148                $this->available_currencies = array();
    149149                $this->init_settings();
    150150                $this->ozowpay_init_form_fields();
    … …  
    175175
    176176        /**
    177          * Comparing woocommerce current currency with ZAR
     177         * Check whether the store is configured for South Africa and ZAR.
     178         *
     179         * @return bool
    178180         */
    179181        private function ozowpay_is_valid_for_use() {
    180                 return get_woocommerce_currency() === 'ZAR';
     182                $store_country  = strtoupper( (string) WC()->countries->get_base_country() );
     183                $store_currency = strtoupper( (string) get_woocommerce_currency() );
     184
     185                return 'ZA' === $store_country && 'ZAR' === $store_currency;
     186        }
     187
     188        /**
     189         * Ensure the gateway uses the merchant's configured country/currency only.
     190         *
     191         * @return bool
     192         */
     193        public function is_valid_for_use() {
     194                return $this->ozowpay_is_valid_for_use();
    181195        }
    182196
    … …  
    248262                        <?php
    249263                } else {
    250                         echo esc_html__( 'Gateway Disabled', 'wc-ozow-gateway' ) . '<div class="inline error"><p><strong>' . esc_html__( 'Ozow currently only supports ZAR as a currency.', 'wc-ozow-gateway' ) . '</strong></p></div>';
     264                        echo esc_html__( 'Gateway Disabled', 'wc-ozow-gateway' ) . '<div class="inline error"><p><strong>' . esc_html__( 'Ozow currently only supports stores in South Africa using ZAR.', 'wc-ozow-gateway' ) . '</strong></p></div>';
    251265                }
    252266        }
    … …  
    262276                $order_total                     = $order->get_total();
    263277                $currency_code                   = get_woocommerce_currency();
    264                 $country_code                    = $order->billing_country;
     278                $country_code                    = WC()->countries->get_base_country();
    265279                $site_code                       = $this->site_code;
    266280                $order_key                       = $order->order_key;
    267281                $private_key                     = $this->private_key;
    268                 $plugin_version                  = 'Plugin-V1.3.6';
     282                $plugin_version                  = 'Plugin-V1.3.7';
    269283                $wordpress_version               = 'WP-' . $this->ozowpay_get_wordepress_version();
    270284                $php_version                     = 'PHP-' . phpversion();
    … …  
    278292                $args                            = array(
    279293                        'SiteCode'             => $site_code,
    280                         'CountryCode'          => empty( $country_code ) ? 'ZA' : $country_code,
     294                        'CountryCode'          => $country_code,
    281295                        'CurrencyCode'         => $currency_code,
    282296                        'Amount'               => $amount,
  • wc-ozow-gateway/tags/1.3.7/includes/ozowpay-wc-gateway-resend-payment-link-function.php

    r3547486 r3691008  
    140140        $private_key         = $payment_gateway->get_private_key();
    141141        $api_key             = $payment_gateway->get_api_key();
    142         $country_code        = $order->get_billing_country();
    143         $currency_code       = $order->get_currency();
     142        $country_code        = WC()->countries->get_base_country();
     143        $currency_code       = get_woocommerce_currency();
    144144        $amount              = $order->get_total();
    145145        $order_id            = $order->get_id();
    146146        $order_key           = $order->get_order_key();
    147         $optional_5          = 'WP-' . $GLOBALS['wp_version'] . ' PHP-' . phpversion() . ' Plugin-V1.3.6 WC-' . WC_VERSION;
     147        $optional_5          = 'WP-' . $GLOBALS['wp_version'] . ' PHP-' . phpversion() . ' Plugin-V1.3.7 WC-' . WC_VERSION;
    148148        $customer_first_name = $order->get_billing_first_name();
    149149        $customer_last_name  = $order->get_billing_last_name();
    … …  
    160160        $request_args = array(
    161161                'SiteCode'             => $site_code,
    162                 'CountryCode'          => empty( $country_code ) ? 'ZA' : $country_code,
     162                'CountryCode'          => $country_code,
    163163                'CurrencyCode'         => $currency_code,
    164164                'Amount'               => $amount,
  • wc-ozow-gateway/tags/1.3.7/readme.txt

    r3547486 r3691008  
    33Tags: woocommerce, payment request, online refund
    44Requires at least: 6.6
    5 Tested up to: 6.9.4
     5Tested up to: 7.1
    66Requires PHP: 7.4 or later
    7 Stable tag: 1.3.6
     7Stable tag: 1.3.7
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
    … …  
    118118* Dev – Tested with WordPress 6.9.4 and WooCommerce 10.7.0.
    119119* Dev – Performed regression testing to ensure stable payment functionality.
     120
     121= 1.3.7 - 2026-09-09 =
     122* Added – Support for international billing and shipping addresses.
     123* Fix – Resolved payment errors when customers use non-South-African billing or shipping addresses.
     124* Fix – Updated CountryCode handling to use the merchant’s store country instead of the customer’s billing country.
     125* Changed – Restricted Ozow availability to stores configured with South Africa (ZA) as the store country and South African Rand (ZAR) as the store currency.
     126* Fix – Updated resend payment link functionality to use the merchant’s store country and follow the same availability rules.
     127* Dev – No database schema changes. Existing payment request, HashCheck generation, and logging functionality remain unchanged.
  • wc-ozow-gateway/tags/1.3.7/woocommerce-gateway-ozow.php

    r3547486 r3691008  
    1111 * License: GPLv3
    1212 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
    13  * Version: 1.3.6
     13 * Version: 1.3.7
    1414 * Requires at least: 6.6
    15  * Tested up to: 6.9.4
    16  * WC tested up to: 10.7.0
    17  * WC requires at least: 7.2
     15 * Tested up to: 7.1
     16 * WC tested up to: 11.1.0
     17 * WC requires at least: 9.8.0
    1818 * Requires PHP: 7.4 or later
    1919 * @package Ozow Gateway for WooCommerce
    … …  
    2424}
    2525
    26 define( 'WC_GATEWAY_OZOW_VERSION', '1.3.6' ); // WRCS: DEFINED_VERSION.
     26define( 'WC_GATEWAY_OZOW_VERSION', '1.3.7' ); // WRCS: DEFINED_VERSION.
    2727define( 'WC_GATEWAY_OZOW_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );
    2828define( 'WC_GATEWAY_OZOW_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
  • wc-ozow-gateway/trunk/build/index-asset.php

    r3547557 r3691008  
    88return array(
    99        'dependencies' => array( 'wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n' ),
    10         'version'      => '1.3.6',
     10        'version'      => '1.3.7',
    1111);
  • wc-ozow-gateway/trunk/changelog.txt

    r3547486 r3691008  
    5151* Dev – Tested with WordPress 6.9.4 and WooCommerce 10.7.0.
    5252* Dev – Performed regression testing to ensure stable payment functionality.
     53
     54= 1.3.7 - 2026-09-09 =
     55* Added – Support for international billing and shipping addresses.
     56* Fix – Resolved payment errors when customers use non-South-African billing or shipping addresses.
     57* Fix – Updated CountryCode handling to use the merchant’s store country instead of the customer’s billing country.
     58* Changed – Restricted Ozow availability to stores configured with South Africa (ZA) as the store country and South African Rand (ZAR) as the store currency.
     59* Fix – Updated resend payment link functionality to use the merchant’s store country and follow the same availability rules.
     60* Dev – No database schema changes. Existing payment request, HashCheck generation, and logging functionality remain unchanged.
  • wc-ozow-gateway/trunk/classes/class-wc-gateway-ozow.php

    r3547486 r3691008  
    143143
    144144                // Setup available countries.
    145                 $this->available_countries = array( 'ZA' );
     145                $this->available_countries = array();
    146146
    147147                // Setup available currency codes.
    148                 $this->available_currencies = array( 'ZAR' );
     148                $this->available_currencies = array();
    149149                $this->init_settings();
    150150                $this->ozowpay_init_form_fields();
    … …  
    175175
    176176        /**
    177          * Comparing woocommerce current currency with ZAR
     177         * Check whether the store is configured for South Africa and ZAR.
     178         *
     179         * @return bool
    178180         */
    179181        private function ozowpay_is_valid_for_use() {
    180                 return get_woocommerce_currency() === 'ZAR';
     182                $store_country  = strtoupper( (string) WC()->countries->get_base_country() );
     183                $store_currency = strtoupper( (string) get_woocommerce_currency() );
     184
     185                return 'ZA' === $store_country && 'ZAR' === $store_currency;
     186        }
     187
     188        /**
     189         * Ensure the gateway uses the merchant's configured country/currency only.
     190         *
     191         * @return bool
     192         */
     193        public function is_valid_for_use() {
     194                return $this->ozowpay_is_valid_for_use();
    181195        }
    182196
    … …  
    248262                        <?php
    249263                } else {
    250                         echo esc_html__( 'Gateway Disabled', 'wc-ozow-gateway' ) . '<div class="inline error"><p><strong>' . esc_html__( 'Ozow currently only supports ZAR as a currency.', 'wc-ozow-gateway' ) . '</strong></p></div>';
     264                        echo esc_html__( 'Gateway Disabled', 'wc-ozow-gateway' ) . '<div class="inline error"><p><strong>' . esc_html__( 'Ozow currently only supports stores in South Africa using ZAR.', 'wc-ozow-gateway' ) . '</strong></p></div>';
    251265                }
    252266        }
    … …  
    262276                $order_total                     = $order->get_total();
    263277                $currency_code                   = get_woocommerce_currency();
    264                 $country_code                    = $order->billing_country;
     278                $country_code                    = WC()->countries->get_base_country();
    265279                $site_code                       = $this->site_code;
    266280                $order_key                       = $order->order_key;
    267281                $private_key                     = $this->private_key;
    268                 $plugin_version                  = 'Plugin-V1.3.6';
     282                $plugin_version                  = 'Plugin-V1.3.7';
    269283                $wordpress_version               = 'WP-' . $this->ozowpay_get_wordepress_version();
    270284                $php_version                     = 'PHP-' . phpversion();
    … …  
    278292                $args                            = array(
    279293                        'SiteCode'             => $site_code,
    280                         'CountryCode'          => empty( $country_code ) ? 'ZA' : $country_code,
     294                        'CountryCode'          => $country_code,
    281295                        'CurrencyCode'         => $currency_code,
    282296                        'Amount'               => $amount,
  • wc-ozow-gateway/trunk/includes/ozowpay-wc-gateway-resend-payment-link-function.php

    r3547486 r3691008  
    140140        $private_key         = $payment_gateway->get_private_key();
    141141        $api_key             = $payment_gateway->get_api_key();
    142         $country_code        = $order->get_billing_country();
    143         $currency_code       = $order->get_currency();
     142        $country_code        = WC()->countries->get_base_country();
     143        $currency_code       = get_woocommerce_currency();
    144144        $amount              = $order->get_total();
    145145        $order_id            = $order->get_id();
    146146        $order_key           = $order->get_order_key();
    147         $optional_5          = 'WP-' . $GLOBALS['wp_version'] . ' PHP-' . phpversion() . ' Plugin-V1.3.6 WC-' . WC_VERSION;
     147        $optional_5          = 'WP-' . $GLOBALS['wp_version'] . ' PHP-' . phpversion() . ' Plugin-V1.3.7 WC-' . WC_VERSION;
    148148        $customer_first_name = $order->get_billing_first_name();
    149149        $customer_last_name  = $order->get_billing_last_name();
    … …  
    160160        $request_args = array(
    161161                'SiteCode'             => $site_code,
    162                 'CountryCode'          => empty( $country_code ) ? 'ZA' : $country_code,
     162                'CountryCode'          => $country_code,
    163163                'CurrencyCode'         => $currency_code,
    164164                'Amount'               => $amount,
  • wc-ozow-gateway/trunk/readme.txt

    r3547486 r3691008  
    33Tags: woocommerce, payment request, online refund
    44Requires at least: 6.6
    5 Tested up to: 6.9.4
     5Tested up to: 7.1
    66Requires PHP: 7.4 or later
    7 Stable tag: 1.3.6
     7Stable tag: 1.3.7
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
    … …  
    118118* Dev – Tested with WordPress 6.9.4 and WooCommerce 10.7.0.
    119119* Dev – Performed regression testing to ensure stable payment functionality.
     120
     121= 1.3.7 - 2026-09-09 =
     122* Added – Support for international billing and shipping addresses.
     123* Fix – Resolved payment errors when customers use non-South-African billing or shipping addresses.
     124* Fix – Updated CountryCode handling to use the merchant’s store country instead of the customer’s billing country.
     125* Changed – Restricted Ozow availability to stores configured with South Africa (ZA) as the store country and South African Rand (ZAR) as the store currency.
     126* Fix – Updated resend payment link functionality to use the merchant’s store country and follow the same availability rules.
     127* Dev – No database schema changes. Existing payment request, HashCheck generation, and logging functionality remain unchanged.
  • wc-ozow-gateway/trunk/woocommerce-gateway-ozow.php

    r3547486 r3691008  
    1111 * License: GPLv3
    1212 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
    13  * Version: 1.3.6
     13 * Version: 1.3.7
    1414 * Requires at least: 6.6
    15  * Tested up to: 6.9.4
    16  * WC tested up to: 10.7.0
    17  * WC requires at least: 7.2
     15 * Tested up to: 7.1
     16 * WC tested up to: 11.1.0
     17 * WC requires at least: 9.8.0
    1818 * Requires PHP: 7.4 or later
    1919 * @package Ozow Gateway for WooCommerce
    … …  
    2424}
    2525
    26 define( 'WC_GATEWAY_OZOW_VERSION', '1.3.6' ); // WRCS: DEFINED_VERSION.
     26define( 'WC_GATEWAY_OZOW_VERSION', '1.3.7' ); // WRCS: DEFINED_VERSION.
    2727define( 'WC_GATEWAY_OZOW_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );
    2828define( 'WC_GATEWAY_OZOW_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
Note: See TracChangeset for help on using the changeset viewer.