Changeset 3144388
- Timestamp:
- 08/30/2024 03:35:14 PM (18 months ago)
- Location:
- currency-switcher-woocommerce/trunk
- Files:
-
- 3 edited
-
currency-switcher-woocommerce.php (modified) (4 diffs)
-
includes/class-alg-wc-currency-switcher.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
currency-switcher-woocommerce/trunk/currency-switcher-woocommerce.php
r3143821 r3144388 4 4 Plugin URI: https://wpwham.com/products/currency-switcher-for-woocommerce/ 5 5 Description: Currency Switcher for WooCommerce. 6 Version: 2.16. 06 Version: 2.16.1 7 7 Author: WP Wham 8 8 Author URI: https://wpwham.com … … 35 35 36 36 if ( ! defined( 'WPWHAM_CURRENCY_SWITCHER_VERSION' ) ) { 37 define( 'WPWHAM_CURRENCY_SWITCHER_VERSION', '2.16. 0' );37 define( 'WPWHAM_CURRENCY_SWITCHER_VERSION', '2.16.1' ); 38 38 } 39 39 if ( ! defined( 'WPWHAM_CURRENCY_SWITCHER_DBVERSION' ) ) { … … 57 57 * 58 58 * @class Alg_WC_Currency_Switcher 59 * @version 2.16. 059 * @version 2.16.1 60 60 * @since 1.0.0 61 61 */ … … 71 71 * @since 1.0.0 72 72 */ 73 public $version = '2.16. 0';73 public $version = '2.16.1'; 74 74 75 75 /** -
currency-switcher-woocommerce/trunk/includes/class-alg-wc-currency-switcher.php
r3143821 r3144388 251 251 * create_order_admin_currency_meta_box. 252 252 * 253 * @version 2.16. 0253 * @version 2.16.1 254 254 * @since 2.8.6 255 255 */ 256 256 function create_order_admin_currency_meta_box() { 257 $order_id = isset( $_GET['post'] ) ? (int) $_GET['post'] : (int) $_GET['id'];258 257 $plugin_currencies = alg_get_enabled_currencies(); 259 258 $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 } 264 268 } 265 269 $html = ''; -
currency-switcher-woocommerce/trunk/readme.txt
r3143825 r3144388 4 4 Requires at least: 4.4 5 5 Tested up to: 6.6 6 Stable tag: 2.16. 06 Stable tag: 2.16.1 7 7 License: GNU General Public License v3.0 8 8 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 113 113 114 114 == Changelog == 115 116 = 2.16.1 - 2024-08-30 = 117 * FIX: PHP error on admin "Add New Order" page. 115 118 116 119 = 2.16.0 - 2024-08-29 =
Note: See TracChangeset
for help on using the changeset viewer.