Plugin Directory

Changeset 3144388


Ignore:
Timestamp:
08/30/2024 03:35:14 PM (18 months ago)
Author:
wpwham
Message:

Version 2.16.1 update

Location:
currency-switcher-woocommerce/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • currency-switcher-woocommerce/trunk/currency-switcher-woocommerce.php

    r3143821 r3144388  
    44Plugin URI: https://wpwham.com/products/currency-switcher-for-woocommerce/
    55Description: Currency Switcher for WooCommerce.
    6 Version: 2.16.0
     6Version: 2.16.1
    77Author: WP Wham
    88Author URI: https://wpwham.com
     
    3535
    3636if ( ! defined( 'WPWHAM_CURRENCY_SWITCHER_VERSION' ) ) {
    37     define( 'WPWHAM_CURRENCY_SWITCHER_VERSION', '2.16.0' );
     37    define( 'WPWHAM_CURRENCY_SWITCHER_VERSION', '2.16.1' );
    3838}
    3939if ( ! defined( 'WPWHAM_CURRENCY_SWITCHER_DBVERSION' ) ) {
     
    5757 *
    5858 * @class   Alg_WC_Currency_Switcher
    59  * @version 2.16.0
     59 * @version 2.16.1
    6060 * @since   1.0.0
    6161 */
     
    7171     * @since 1.0.0
    7272     */
    73     public $version = '2.16.0';
     73    public $version = '2.16.1';
    7474
    7575    /**
  • currency-switcher-woocommerce/trunk/includes/class-alg-wc-currency-switcher.php

    r3143821 r3144388  
    251251     * create_order_admin_currency_meta_box.
    252252     *
    253      * @version 2.16.0
     253     * @version 2.16.1
    254254     * @since   2.8.6
    255255     */
    256256    function create_order_admin_currency_meta_box() {
    257         $order_id          = isset( $_GET['post'] ) ? (int) $_GET['post'] : (int) $_GET['id'];
    258257        $plugin_currencies = alg_get_enabled_currencies();
    259258        $currencies        = get_woocommerce_currencies();
    260         $order             = wc_get_order( $order_id );
    261         $order_currency    = $order->get_currency();
    262         if ( ! in_array( $order_currency, $plugin_currencies ) ) {
    263             $plugin_currencies[] = $order_currency;
     259        if ( isset( $_GET['action'] ) && $_GET['action'] === 'new' ) {
     260            $order_currency = ''; // if creating a new order, we won't have a value yet
     261        } else {
     262            $order_id       = isset( $_GET['post'] ) ? (int) $_GET['post'] : (int) $_GET['id'];
     263            $order          = wc_get_order( $order_id );
     264            $order_currency = $order->get_currency();
     265            if ( ! in_array( $order_currency, $plugin_currencies ) ) {
     266                $plugin_currencies[] = $order_currency;
     267            }
    264268        }
    265269        $html = '';
  • currency-switcher-woocommerce/trunk/readme.txt

    r3143825 r3144388  
    44Requires at least: 4.4
    55Tested up to: 6.6
    6 Stable tag: 2.16.0
     6Stable tag: 2.16.1
    77License: GNU General Public License v3.0
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    113113
    114114== Changelog ==
     115
     116= 2.16.1 - 2024-08-30 =
     117* FIX: PHP error on admin "Add New Order" page.
    115118
    116119= 2.16.0 - 2024-08-29 =
Note: See TracChangeset for help on using the changeset viewer.