WooCommerce - Version 3.9.0

Version Description

  • 2020-01-21 =

  • Enhancement - Added a "Show" button next to the password field on the login fields. #24915

  • Enhancement - New WooCommerce Onboarding experience (shows to only 10% of new users). #24991

  • Enhancement - Introduced Payment Gateway API to support "pay button". #25000

  • Enhancement - Includes WooCommerce Blocks 2.5.3, introducing an "All Products" block, a new block listing products using client side rendering (requires WordPress 5.3), and more. #25181

  • Tweak - Updated PayPal standard "Thank you" page message to comply with PayPal Guidelines. #24756

  • Tweak - Account for non-EU countries that collect VAT and rename tax to VAT on the frontend. #24999

  • Tweak - Cache checkout fragments and update DOM on change only. #24227

  • Tweak - Eliminate extra update order AJAX request on checkout page load. #24271

  • Tweak - Prevent billing address from being updated on shipping update. #24374

  • Tweak - Added a tooltip in the "Coupon expity date" field. #24749

  • Tweak - Make phone numbers clickable in emails. #24786

  • Tweak - Prevent PHP warnings in tracker if order doesn't have a created date yet. #24846

  • Tweak - Capitalize "T" in "Move to Trash" phrase on order page in wp-admin to be consistent with product and coupon pages. #24867

  • Tweak - Changed wp_cache invalidation from using increment to using microtime. #24961

  • Tweak - Made the usage tracking link on the setup wizard more transparent. #25026

  • Tweak - Fixed menu highlight of My Account page when browsing "Add payment method" page. #25041

  • Tweak - Prevent creating products before registering related post types and taxonomies. #25049

  • Tweak - Include processing orders in tracker data when opted in. #25071

  • Tweak - Centralize check for default themes to fix Storefront appearance in the Setup Wizard. #25216

  • Tweak - Adds a WordPress version check before recommending the WooCommerce Admin plugin during setup. #25260

  • Fix - Added license key support recent changes from MaxMind GeoLite2. #25378

  • Fix - Honor tax rounding preference in edit item and refund flows. #24208

  • Fix - Prevent incorrect number of decimal points in prices. #24281

  • Fix - Fixed initial support for Gutenberg's Experimental Legacy Widget block. #24292

  • Fix - Fix overriding of query when using orderby on archives with a static homepage. #24683

  • Fix - Use of wp_unslash() function when escaping admin settings values. #24793

  • Fix - Do not set the tracking cookie when doing ajax requests. #24798

  • Fix - Display button to delete images from product galleries in the admin when using a mobile device. #24840

  • Fix - Fixed order note's date format. #24843

  • Fix - Refactored WC_Order_Factory::get_order() to remove function deprecated in PHP 7.0. #24852

  • Fix - Fixed product stock status changes on Bulk Edit save when "Enable stock management" is disabled. #24876

  • Fix - Fixed default country code fallback in wc_get_customer_default_location(). #24884

  • Fix - Fixed misleading message for Shipping options in cart. #24914

  • Fix - Customizer not loading when viewing from WordPress.com. #24935

  • Fix - Prevent notice when a variable product has no images. #24986

  • Fix - Adjusted the slug generation for duplicated variable products to prevent performance degradation when using templates. #25064

  • Fix - Added appropriate minification to photoswipe.css. #25074

  • Fix - Corrected the sorting behavior for the "products" shortcode when manually sorting products. #25084

  • Fix - Fixed invalid backlinks for in-app purchases. #25098

  • Fix - Corrected the media element player initialization for product variation descriptions. #25103

  • Fix - Enable WooCommerce.com Site API on installations not using permalink. #25131

  • Fix - WooCommerce.com Site API now returns success if the plugin was previously installed. #25140

  • Fix - WooCommerce.com Site API checks to move_product case to make sure result array contains folder_exists item and doesn't return a warning. #25160

  • Fix - Ensure that categories containing only private products are selectable in the product exporter. #25132

  • Fix - Prevent variable product parents from being added to orders. #25162

  • Fix - Use sorting settings as a default to product shortcodes. #25180

  • Fix - Applied setup wizard CSS fixes to the respective WP versions. #25197

  • Fix - Fixed "account erasure request" URL in WordPress 5.3. #25208

  • Fix - Ensure all cache get removed on webhook deletion. #25164

  • Fix - Adjusted the checkout email validation regex to be more accurate. #25251

  • Template - Introduced woocommerce_product_related_products_heading filter. #25059

  • Template - Introduced woocommerce_before_lost_password_confirmation_message and woocommerce_after_lost_password_confirmation_message hooks. #25096

  • REST API - Fixed date_created and date_created_gmt for customers v2. #25181

  • REST API - Fixed Restored "Total post count" section on System Status endpoint v2 and v3. #25181

  • REST API - Filter empty objects from results before loop. #25181

  • Dev - Introduce new PHP 7.0 minimum requirement.

  • Dev - Introduce new WordPress 5.0 minimum requirement.

  • Dev - Check for max discount to be "-ve" to prevent overwriting refunded fee amount. #24341

  • Dev - Add unload event to the checkout page to prevent reloading during checkout after placing an order. #24609

  • Dev - Only toggle form field description if element exists. #24752

  • Dev - Introduced woocommerce_{$export_type}_export_delimiter filter to change separator string while exporting CSV files. #24759

  • Dev - Introduced woocommerce_after_order_refund_item_name hook. #24760

  • Dev - Introduced woocommerce_kses_notice_allowed_tags filter. #24849

  • Dev - Introduced woocommerce_shipping_not_enabled_on_cart_html filter. #24914

  • Dev - Introduced woocommerce_show_invalid_variations_notice filter. #24934

  • Dev - Introduced woocommerce_upsells_order filter. #25017

  • Dev - Introduced woocommerce_before_settings_{current_tab} and woocommerce_after_settings_{current_tab} hooks. #25028

  • Dev - Included third parameter $order to woocommerce_order_get_formatted_billing_address and woocommerce_order_get_formatted_shipping_address filters. #24870

  • Dev - Pass the $clear_persistent_cart variable to the woocommerce_before_cart_emptied and woocommerce_cart_emptied actions. #24930

  • Dev - Made variables in assets/css/_variables.scss default. #24822

  • Dev - Refactor to use the same rounding logic in orders and cart. #24828

  • Dev - Add order note immediately after status change before the `woocommerce_order_status_changed action. #24879

  • Dev - Added support for custom attributes in wc_placeholder_img(). #24937

  • Dev - Added initial support for inline notices on checkout. #25001

  • Dev - Introduced wc_get_product_object() helper. #25031

  • Dev - Pass the correct $this->updated_props variable to the woocommerce_coupon_object_updated_props action's second paramater. #25077

  • Dev - Remove a few calls to func_get_args() and call_user_func_array() with the spread operator for better code legibility and performance gains. #25101

  • Dev - New woocommerce_valid_order_statuses_for_payment hook that triggers when an order is paid. Use this new hook instead of woocommerce_order_status_changed or *woocommerce_order_status_{old_status}}to{new_status}` to trigger code for payment completion. #25158

  • Dev - Ability to exclude certain product types from product search calls. #25162

  • Dev - Raise exception when WC_Product_Variation is instantiated with an ID that belongs to an object that is not a variation. #25178

  • Localization - Add subdivisions of Laos. #24765

  • Localization - Fixed translatable string in WooCommerce's libraries. #24892 #24894

  • Localization - Fixed translatable string comments for translators. #24928

  • Localization - Add postcode validation for Slovenia. #25174

See changelog for all versions.

=

Download this release

Release Info

Developer claudiosanches
Plugin Icon 128x128 WooCommerce
Version 3.9.0
Comparing to
See all releases

Code changes from version 3.9.0-rc.4 to 3.9.0

i18n/languages/woocommerce.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the WooCommerce package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WooCommerce 3.9.0-rc.4\n"
6
  "Report-Msgid-Bugs-To: https://github.com/woocommerce/woocommerce/issues\n"
7
- "POT-Creation-Date: 2020-01-20 23:06:14+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
2
  # This file is distributed under the same license as the WooCommerce package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WooCommerce 3.9.0\n"
6
  "Report-Msgid-Bugs-To: https://github.com/woocommerce/woocommerce/issues\n"
7
+ "POT-Creation-Date: 2020-01-22 00:25:45+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
includes/integrations/maxmind-geolocation/class-wc-integration-maxmind-database-service.php CHANGED
@@ -139,18 +139,23 @@ class WC_Integration_MaxMind_Database_Service {
139
  * Fetches the ISO country code associated with an IP address.
140
  *
141
  * @param string $ip_address The IP address to find the country code for.
142
- * @return string|null The country code for the IP address, or null if none was found.
143
  */
144
  public function get_iso_country_code_for_ip( $ip_address ) {
145
- $country_code = null;
146
 
147
  if ( ! class_exists( 'MaxMind\Db\Reader' ) ) {
148
  wc_get_logger()->notice( __( 'Missing MaxMind Reader library!', 'woocommerce' ), array( 'source' => 'maxmind-geolocation' ) );
149
  return $country_code;
150
  }
151
 
 
 
 
 
 
152
  try {
153
- $reader = new MaxMind\Db\Reader( $this->get_database_path() );
154
  $data = $reader->get( $ip_address );
155
 
156
  if ( isset( $data['country']['iso_code'] ) ) {
139
  * Fetches the ISO country code associated with an IP address.
140
  *
141
  * @param string $ip_address The IP address to find the country code for.
142
+ * @return string The country code for the IP address, or empty if not found.
143
  */
144
  public function get_iso_country_code_for_ip( $ip_address ) {
145
+ $country_code = '';
146
 
147
  if ( ! class_exists( 'MaxMind\Db\Reader' ) ) {
148
  wc_get_logger()->notice( __( 'Missing MaxMind Reader library!', 'woocommerce' ), array( 'source' => 'maxmind-geolocation' ) );
149
  return $country_code;
150
  }
151
 
152
+ $database_path = $this->get_database_path();
153
+ if ( ! file_exists( $database_path ) ) {
154
+ return $country_code;
155
+ }
156
+
157
  try {
158
+ $reader = new MaxMind\Db\Reader( $database_path );
159
  $data = $reader->get( $ip_address );
160
 
161
  if ( isset( $data['country']['iso_code'] ) ) {
includes/integrations/maxmind-geolocation/class-wc-integration-maxmind-geolocation.php CHANGED
@@ -221,7 +221,7 @@ class WC_Integration_MaxMind_Geolocation extends WC_Integration {
221
  $country_code = $this->database_service->get_iso_country_code_for_ip( $ip_address );
222
 
223
  return array(
224
- 'country' => $country_code ? $country_code : '',
225
  'state' => '',
226
  'city' => '',
227
  'postcode' => '',
221
  $country_code = $this->database_service->get_iso_country_code_for_ip( $ip_address );
222
 
223
  return array(
224
+ 'country' => $country_code,
225
  'state' => '',
226
  'city' => '',
227
  'postcode' => '',
includes/wc-core-functions.php CHANGED
@@ -1118,7 +1118,7 @@ function wc_get_base_location() {
1118
  * @return array
1119
  */
1120
  function wc_get_customer_default_location() {
1121
- $set_default_location_to = get_option( 'woocommerce_default_customer_address', 'geolocation' );
1122
  $default_location = '' === $set_default_location_to ? '' : get_option( 'woocommerce_default_country', '' );
1123
  $location = wc_format_country_state_string( apply_filters( 'woocommerce_customer_default_location', $default_location ) );
1124
 
1118
  * @return array
1119
  */
1120
  function wc_get_customer_default_location() {
1121
+ $set_default_location_to = get_option( 'woocommerce_default_customer_address', 'base' );
1122
  $default_location = '' === $set_default_location_to ? '' : get_option( 'woocommerce_default_country', '' );
1123
  $location = wc_format_country_state_string( apply_filters( 'woocommerce_customer_default_location', $default_location ) );
1124
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: ecommerce, e-commerce, store, sales, sell, shop, cart, checkout, downloada
4
  Requires at least: 5.0
5
  Tested up to: 5.3
6
  Requires PHP: 7.0
7
- Stable tag: 3.8.1
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -179,7 +179,7 @@ INTERESTED IN DEVELOPMENT?
179
 
180
  == Changelog ==
181
 
182
- = 3.9.0 - 2020-01-07 =
183
 
184
  * Enhancement - Added a "Show" button next to the password field on the login fields. #24915
185
  * Enhancement - New WooCommerce Onboarding experience (shows to only 10% of new users). #24991
4
  Requires at least: 5.0
5
  Tested up to: 5.3
6
  Requires PHP: 7.0
7
+ Stable tag: 3.9.0
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
179
 
180
  == Changelog ==
181
 
182
+ = 3.9.0 - 2020-01-21 =
183
 
184
  * Enhancement - Added a "Show" button next to the password field on the login fields. #24915
185
  * Enhancement - New WooCommerce Onboarding experience (shows to only 10% of new users). #24991
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitbf436d452d3aae2c025f4839876b8fef::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInite65c8b99eb41e6fddd4d4c81def99bab::getLoader();
vendor/autoload_packages.php CHANGED
@@ -122,7 +122,7 @@ if ( ! function_exists( __NAMESPACE__ . '\autoloader' ) ) {
122
  /**
123
  * Prepare all the classes for autoloading.
124
  */
125
- function enqueue_packages_00bfd910a24dec2a3cccd8cd56b333c6() {
126
  $class_map = require_once dirname( __FILE__ ) . '/composer/autoload_classmap_package.php';
127
  foreach ( $class_map as $class_name => $class_info ) {
128
  enqueue_package_class( $class_name, $class_info['version'], $class_info['path'] );
@@ -141,4 +141,4 @@ function enqueue_packages_00bfd910a24dec2a3cccd8cd56b333c6() {
141
  }
142
  }
143
  }
144
- enqueue_packages_00bfd910a24dec2a3cccd8cd56b333c6();
122
  /**
123
  * Prepare all the classes for autoloading.
124
  */
125
+ function enqueue_packages_139149d450409b35d5f260c000ef52c8() {
126
  $class_map = require_once dirname( __FILE__ ) . '/composer/autoload_classmap_package.php';
127
  foreach ( $class_map as $class_name => $class_info ) {
128
  enqueue_package_class( $class_name, $class_info['version'], $class_info['path'] );
141
  }
142
  }
143
  }
144
+ enqueue_packages_139149d450409b35d5f260c000ef52c8();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitbf436d452d3aae2c025f4839876b8fef
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInitbf436d452d3aae2c025f4839876b8fef
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitbf436d452d3aae2c025f4839876b8fef', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitbf436d452d3aae2c025f4839876b8fef', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInitbf436d452d3aae2c025f4839876b8fef::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInite65c8b99eb41e6fddd4d4c81def99bab
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInite65c8b99eb41e6fddd4d4c81def99bab', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInite65c8b99eb41e6fddd4d4c81def99bab', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInite65c8b99eb41e6fddd4d4c81def99bab::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInitbf436d452d3aae2c025f4839876b8fef
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'M' =>
@@ -152,9 +152,9 @@ class ComposerStaticInitbf436d452d3aae2c025f4839876b8fef
152
  public static function getInitializer(ClassLoader $loader)
153
  {
154
  return \Closure::bind(function () use ($loader) {
155
- $loader->prefixLengthsPsr4 = ComposerStaticInitbf436d452d3aae2c025f4839876b8fef::$prefixLengthsPsr4;
156
- $loader->prefixDirsPsr4 = ComposerStaticInitbf436d452d3aae2c025f4839876b8fef::$prefixDirsPsr4;
157
- $loader->classMap = ComposerStaticInitbf436d452d3aae2c025f4839876b8fef::$classMap;
158
 
159
  }, null, ClassLoader::class);
160
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInite65c8b99eb41e6fddd4d4c81def99bab
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'M' =>
152
  public static function getInitializer(ClassLoader $loader)
153
  {
154
  return \Closure::bind(function () use ($loader) {
155
+ $loader->prefixLengthsPsr4 = ComposerStaticInite65c8b99eb41e6fddd4d4c81def99bab::$prefixLengthsPsr4;
156
+ $loader->prefixDirsPsr4 = ComposerStaticInite65c8b99eb41e6fddd4d4c81def99bab::$prefixDirsPsr4;
157
+ $loader->classMap = ComposerStaticInite65c8b99eb41e6fddd4d4c81def99bab::$classMap;
158
 
159
  }, null, ClassLoader::class);
160
  }
woocommerce.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WooCommerce
4
  * Plugin URI: https://woocommerce.com/
5
  * Description: An eCommerce toolkit that helps you sell anything. Beautifully.
6
- * Version: 3.9.0-rc.4
7
  * Author: Automattic
8
  * Author URI: https://woocommerce.com
9
  * Text Domain: woocommerce
3
  * Plugin Name: WooCommerce
4
  * Plugin URI: https://woocommerce.com/
5
  * Description: An eCommerce toolkit that helps you sell anything. Beautifully.
6
+ * Version: 3.9.0
7
  * Author: Automattic
8
  * Author URI: https://woocommerce.com
9
  * Text Domain: woocommerce