Merge remote-tracking branch 'woothemes/master'

This commit is contained in:
Job 2016-07-22 12:40:20 +02:00
commit 0de14bbc89
21 changed files with 182 additions and 195 deletions

File diff suppressed because one or more lines are too long

View File

@ -2424,19 +2424,17 @@ table.wc-shipping-zones, table.wc-shipping-zone-methods, table.wc-shipping-class
padding-right: 32px;
li {
display: inline;
margin: 0 0 0 0;
margin: 0;
}
li:before {
content: ", ";
}
li:last-child:before, li:first-child:before {
li:first-child:before,
li:nth-child(2):before {
content: "";
}
li:last-child {
display: block;
}
li:first-child {
margin: 0 !important;
display: block;
}
li.wc-shipping-zone-methods-add-row {
position: absolute;
@ -2537,7 +2535,7 @@ table.wc-shipping-zones, table.wc-shipping-zone-methods, table.wc-shipping-class
}
input[type="checkbox"] {
width: auto;
min-width: 0;
min-width: 16px;
}
}
td, th {

View File

@ -209,6 +209,10 @@
$method_list.find( '.wc-shipping-zone-method' ).remove();
if ( _.size( shipping_methods ) ) {
shipping_methods = _.sortBy( shipping_methods, function( method ) {
return parseInt( method.method_order, 10 );
} );
_.each( shipping_methods, function( shipping_method, instance_id ) {
var class_name = 'method_disabled';
@ -216,10 +220,10 @@
class_name = 'method_enabled';
}
$method_list.prepend( '<li class="wc-shipping-zone-method"><a href="admin.php?page=wc-settings&amp;tab=shipping&amp;instance_id=' + instance_id + '" class="' + class_name + '">' + shipping_method.title + '</a></li>' );
$method_list.append( '<li class="wc-shipping-zone-method"><a href="admin.php?page=wc-settings&amp;tab=shipping&amp;instance_id=' + instance_id + '" class="' + class_name + '">' + shipping_method.title + '</a></li>' );
} );
} else {
$method_list.prepend( '<li class="wc-shipping-zone-method">' + data.strings.no_shipping_methods_offered + '</li>' );
$method_list.append( '<li class="wc-shipping-zone-method">' + data.strings.no_shipping_methods_offered + '</li>' );
}
},
onSubmit: function( event ) {

File diff suppressed because one or more lines are too long

51
i18n/states/NG.php Normal file
View File

@ -0,0 +1,51 @@
<?php
/**
* Nigerian provinces
*
* @author hoshomoh
* @category i18n
* @package WooCommerce/i18n
* @version 2.7.0
*/
global $states;
$states['NG'] = array(
'AB' => __( 'Abia', 'woocommerce' ),
'FC' => __( 'Abuja', 'woocommerce' ),
'AD' => __( 'Adamawa', 'woocommerce' ),
'AK' => __( 'Akwa Ibom', 'woocommerce' ),
'AN' => __( 'Anambra', 'woocommerce' ),
'BA' => __( 'Bauchi', 'woocommerce' ),
'BY' => __( 'Bayelsa', 'woocommerce' ),
'BE' => __( 'Benue', 'woocommerce' ),
'BO' => __( 'Borno', 'woocommerce' ),
'CR' => __( 'Cross River', 'woocommerce' ),
'DE' => __( 'Delta', 'woocommerce' ),
'EB' => __( 'Ebonyi', 'woocommerce' ),
'ED' => __( 'Edo', 'woocommerce' ),
'EK' => __( 'Ekiti', 'woocommerce' ),
'EN' => __( 'Enugu', 'woocommerce' ),
'GO' => __( 'Gombe', 'woocommerce' ),
'IM' => __( 'Imo', 'woocommerce' ),
'JI' => __( 'Jigawa', 'woocommerce' ),
'KD' => __( 'Kaduna', 'woocommerce' ),
'KN' => __( 'Kano', 'woocommerce' ),
'KT' => __( 'Katsina', 'woocommerce' ),
'KE' => __( 'Kebbi', 'woocommerce' ),
'KO' => __( 'Kogi', 'woocommerce' ),
'KW' => __( 'Kwara', 'woocommerce' ),
'LA' => __( 'Lagos', 'woocommerce' ),
'NA' => __( 'Nasarawa', 'woocommerce' ),
'NI' => __( 'Niger', 'woocommerce' ),
'OG' => __( 'Ogun', 'woocommerce' ),
'ON' => __( 'Ondo', 'woocommerce' ),
'OS' => __( 'Osun', 'woocommerce' ),
'OY' => __( 'Oyo', 'woocommerce' ),
'PL' => __( 'Plateau', 'woocommerce' ),
'RI' => __( 'Rivers', 'woocommerce' ),
'SO' => __( 'Sokoto', 'woocommerce' ),
'TA' => __( 'Taraba', 'woocommerce' ),
'YO' => __( 'Yobe', 'woocommerce' ),
'ZA' => __( 'Zamfara', 'woocommerce' ),
);

View File

@ -608,20 +608,7 @@ class WC_Product {
* @return bool
*/
public function is_in_stock() {
$status = $this->stock_status === 'instock';
/**
* Sanity check to ensure stock qty is not lower than 0 but still listed
* instock.
*
* Check is not required for products on backorder since they can be
* instock regardless of actual stock quantity.
*/
if ( $this->managing_stock() && ! $this->backorders_allowed() && $this->get_total_stock() <= get_option( 'woocommerce_notify_no_stock_amount' ) ) {
$status = false;
}
return apply_filters( 'woocommerce_product_is_in_stock', $status );
return apply_filters( 'woocommerce_product_is_in_stock', $this->stock_status === 'instock', $this );
}
/**

View File

@ -120,6 +120,7 @@ if ( wc_tax_enabled() ) {
<button type="button" class="button bulk-delete-items"><?php _e( 'Delete selected row(s)', 'woocommerce' ); ?></button>
<button type="button" class="button bulk-decrease-stock"><?php _e( 'Reduce stock', 'woocommerce' ); ?></button>
<button type="button" class="button bulk-increase-stock"><?php _e( 'Increase stock', 'woocommerce' ); ?></button>
<?php do_action( 'woocommerce_admin_order_item_bulk_actions', $order ); ?>
</div>
<div class="wc-order-data-row wc-order-totals-items wc-order-items-editable">
<?php

View File

@ -301,7 +301,7 @@ class WC_Settings_Products extends WC_Settings_Page {
array(
'title' => __( 'Low Stock Threshold', 'woocommerce' ),
'desc' => '',
'desc' => __( 'When product stock reaches this amount you will be notified via email.', 'woocommerce' ),
'id' => 'woocommerce_notify_low_stock_amount',
'css' => 'width:50px;',
'type' => 'number',
@ -310,12 +310,13 @@ class WC_Settings_Products extends WC_Settings_Page {
'step' => 1
),
'default' => '2',
'autoload' => false
'autoload' => false,
'desc_tip' => true,
),
array(
'title' => __( 'Out Of Stock Threshold', 'woocommerce' ),
'desc' => '',
'desc' => __( 'When product stock reaches this amount the stock status will change to "out of stock" and you will be notified via email. This setting does not affect existing "in stock" products.', 'woocommerce' ),
'id' => 'woocommerce_notify_no_stock_amount',
'css' => 'width:50px;',
'type' => 'number',
@ -323,7 +324,8 @@ class WC_Settings_Products extends WC_Settings_Page {
'min' => 0,
'step' => 1
),
'default' => '0'
'default' => '0',
'desc_tip' => true,
),
array(

View File

@ -39,9 +39,11 @@ if ( ! defined( 'ABSPATH' ) ) {
<td class="wc-shipping-zone-region"><?php esc_html_e( 'This zone is used for shipping addresses that aren&lsquo;t included in any other shipping zone. Adding shipping methods to this zone is optional.', 'woocommerce' ); ?></td>
<td class="wc-shipping-zone-methods">
<ul>
<li class="wc-shipping-zone-methods-add-row"><a href="#" class="add_shipping_method tips" data-tip="<?php esc_attr_e( 'Add shipping method', 'woocommerce' ); ?>" data-disabled-tip="<?php esc_attr_e( 'Save changes to continue adding shipping methods to this zone', 'woocommerce' ); ?>"><?php _e( 'Add shipping method', 'woocommerce' ); ?></a></li>
<?php
$worldwide = new WC_Shipping_Zone( 0 );
$methods = $worldwide->get_shipping_methods();
uasort( $methods, 'wc_shipping_zone_method_order_uasort_comparison' );
if ( ! empty( $methods ) ) {
foreach ( $methods as $method ) {
@ -52,7 +54,6 @@ if ( ! defined( 'ABSPATH' ) ) {
echo '<li class="wc-shipping-zone-method">' . __( 'No shipping methods offered to this zone.', 'woocommerce' ) . '</li>';
}
?>
<li class="wc-shipping-zone-methods-add-row"><a href="#" class="add_shipping_method tips" data-tip="<?php esc_attr_e( 'Add shipping method', 'woocommerce' ); ?>" data-disabled-tip="<?php esc_attr_e( 'Save changes to continue adding shipping methods to this zone', 'woocommerce' ); ?>"><?php _e( 'Add shipping method', 'woocommerce' ); ?></a></li>
</ul>
</td>
</tr>

View File

@ -346,6 +346,18 @@ global $wpdb;
<td class="help"><?php echo wc_help_tip( __( 'The version of WooCommerce that the database is formatted for. This should be the same as your WooCommerce Version.', 'woocommerce' ) ); ?></td>
<td><?php echo esc_html( get_option( 'woocommerce_db_version' ) ); ?></td>
</tr>
<tr>
<td data-export-label="WC Database Prefix"><?php _e( 'Database Prefix', 'woocommerce' ); ?></td>
<td class="help">&nbsp;</td>
<td><?php
if ( strlen( $wpdb->prefix ) > 20 ) {
echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( __( '%s - We recommend using a prefix with less than 20 characters. See: %s', 'woocommerce' ), esc_html( $wpdb->prefix ), '<a href="https://docs.woocommerce.com/document/completed-order-email-doesnt-contain-download-links/#section-2" target="_blank">' . __( 'How to update your database table prefix', 'woocommerce' ) . '</a>' ) . '</mark>';
} else {
echo '<mark class="yes">' . esc_html( $wpdb->prefix ) . '</mark>';
}
?>
</td>
</tr>
<tr>
<?php
$tables = array(

View File

@ -1804,9 +1804,8 @@ class WC_API_Products extends WC_API_Resource {
* @throws WC_API_Exception
*/
public function upload_product_image( $image_url ) {
$file_name = basename( current( explode( '?', $image_url ) ) );
$wp_filetype = wp_check_filetype( $file_name, null );
$parsed_url = @parse_url( $image_url );
$file_name = basename( current( explode( '?', $image_url ) ) );
$parsed_url = @parse_url( $image_url );
// Check parsed URL
if ( ! $parsed_url || ! is_array( $parsed_url ) ) {
@ -1828,6 +1827,8 @@ class WC_API_Products extends WC_API_Resource {
}
// Ensure we have a file name and type
$wp_filetype = wp_check_filetype( $file_name, wc_rest_allowed_image_mime_types() );
if ( ! $wp_filetype['type'] ) {
$headers = wp_remote_retrieve_headers( $response );
if ( isset( $headers['content-disposition'] ) && strstr( $headers['content-disposition'], 'filename=' ) ) {
@ -1838,6 +1839,13 @@ class WC_API_Products extends WC_API_Resource {
$file_name = 'image.' . str_replace( 'image/', '', $headers['content-type'] );
}
unset( $headers );
// Recheck filetype
$wp_filetype = wp_check_filetype( $file_name, wc_rest_allowed_image_mime_types() );
if ( ! $wp_filetype['type'] ) {
throw new WC_API_Exception( 'woocommerce_api_invalid_product_image', __( 'Invalid image type.', 'woocommerce' ), 400 );
}
}
// Upload the file

View File

@ -2360,9 +2360,8 @@ class WC_API_Products extends WC_API_Resource {
* @return int|WP_Error Attachment id
*/
protected function upload_image_from_url( $image_url, $upload_for = 'product_image' ) {
$file_name = basename( current( explode( '?', $image_url ) ) );
$wp_filetype = wp_check_filetype( $file_name, null );
$parsed_url = @parse_url( $image_url );
$file_name = basename( current( explode( '?', $image_url ) ) );
$parsed_url = @parse_url( $image_url );
// Check parsed URL.
if ( ! $parsed_url || ! is_array( $parsed_url ) ) {
@ -2384,6 +2383,8 @@ class WC_API_Products extends WC_API_Resource {
}
// Ensure we have a file name and type.
$wp_filetype = wp_check_filetype( $file_name, wc_rest_allowed_image_mime_types() );
if ( ! $wp_filetype['type'] ) {
$headers = wp_remote_retrieve_headers( $response );
if ( isset( $headers['content-disposition'] ) && strstr( $headers['content-disposition'], 'filename=' ) ) {
@ -2394,6 +2395,13 @@ class WC_API_Products extends WC_API_Resource {
$file_name = 'image.' . str_replace( 'image/', '', $headers['content-type'] );
}
unset( $headers );
// Recheck filetype
$wp_filetype = wp_check_filetype( $file_name, wc_rest_allowed_image_mime_types() );
if ( ! $wp_filetype['type'] ) {
throw new WC_API_Exception( 'woocommerce_api_invalid_' . $upload_for, __( 'Invalid image type.', 'woocommerce' ), 400 );
}
}
// Upload the file.

View File

@ -423,20 +423,7 @@ class WC_Product_Variation extends WC_Product {
* @return bool
*/
public function is_in_stock() {
$status = $this->stock_status === 'instock';
/**
* Sanity check to ensure stock qty is not lower than 0 but still listed
* instock.
*
* Check is not required for products on backorder since they can be
* instock regardless of actual stock quantity.
*/
if ( true === $this->managing_stock() && ! $this->backorders_allowed() && $this->get_stock_quantity() <= get_option( 'woocommerce_notify_no_stock_amount' ) ) {
$status = false;
}
return apply_filters( 'woocommerce_variation_is_in_stock', $status );
return apply_filters( 'woocommerce_variation_is_in_stock', $this->stock_status === 'instock', $this );
}
/**

View File

@ -235,7 +235,7 @@ class WC_Shipping_Zone extends WC_Data {
public function get_shipping_methods( $enabled_only = false ) {
global $wpdb;
$raw_methods_sql = $enabled_only ? "SELECT method_id, method_order, instance_id, is_enabled FROM {$wpdb->prefix}woocommerce_shipping_zone_methods WHERE zone_id = %d AND is_enabled = 1 order by method_order ASC;" : "SELECT method_id, method_order, instance_id, is_enabled FROM {$wpdb->prefix}woocommerce_shipping_zone_methods WHERE zone_id = %d order by method_order ASC;";
$raw_methods_sql = $enabled_only ? "SELECT method_id, method_order, instance_id, is_enabled FROM {$wpdb->prefix}woocommerce_shipping_zone_methods WHERE zone_id = %d AND is_enabled = 1;" : "SELECT method_id, method_order, instance_id, is_enabled FROM {$wpdb->prefix}woocommerce_shipping_zone_methods WHERE zone_id = %d;";
$raw_methods = $wpdb->get_results( $wpdb->prepare( $raw_methods_sql, $this->get_zone_id() ) );
$wc_shipping = WC_Shipping::instance();
$allowed_classes = $wc_shipping->get_shipping_method_class_names();

View File

@ -1992,6 +1992,22 @@ class WC_CLI_Product extends WC_CLI_Command {
return $taxonomy;
}
/**
* Returns image mime types users are allowed to upload via the API.
* @since 2.6.4
* @return array
*/
private function allowed_image_mime_types() {
return apply_filters( 'woocommerce_cli_allowed_image_mime_types', array(
'jpg|jpeg|jpe' => 'image/jpeg',
'gif' => 'image/gif',
'png' => 'image/png',
'bmp' => 'image/bmp',
'tiff|tif' => 'image/tiff',
'ico' => 'image/x-icon',
) );
}
/**
* Upload image from URL
*
@ -2002,7 +2018,6 @@ class WC_CLI_Product extends WC_CLI_Command {
*/
private function upload_product_image( $image_url ) {
$file_name = basename( current( explode( '?', $image_url ) ) );
$wp_filetype = wp_check_filetype( $file_name, null );
$parsed_url = @parse_url( $image_url );
// Check parsed URL
@ -2025,6 +2040,8 @@ class WC_CLI_Product extends WC_CLI_Command {
}
// Ensure we have a file name and type
$wp_filetype = wp_check_filetype( $file_name, $this->allowed_image_mime_types() );
if ( ! $wp_filetype['type'] ) {
$headers = wp_remote_retrieve_headers( $response );
if ( isset( $headers['content-disposition'] ) && strstr( $headers['content-disposition'], 'filename=' ) ) {
@ -2035,6 +2052,13 @@ class WC_CLI_Product extends WC_CLI_Command {
$file_name = 'image.' . str_replace( 'image/', '', $headers['content-type'] );
}
unset( $headers );
// Recheck filetype
$wp_filetype = wp_check_filetype( $file_name, $this->allowed_image_mime_types() );
if ( ! $wp_filetype['type'] ) {
throw new WC_CLI_Exception( 'woocommerce_cli_invalid_image_type', __( 'Invalid image type.', 'woocommerce' ) );
}
}
// Upload the file.

View File

@ -51,10 +51,11 @@ class WC_Gateway_COD extends WC_Payment_Gateway {
public function init_form_fields() {
$shipping_methods = array();
if ( is_admin() )
if ( is_admin() ) {
foreach ( WC()->shipping()->load_shipping_methods() as $method ) {
$shipping_methods[ $method->id ] = $method->get_title();
$shipping_methods[ $method->id ] = $method->get_method_title();
}
}
$this->form_fields = array(
'enabled' => array(

View File

@ -410,5 +410,5 @@ function wc_checkout_is_https() {
function wc_post_content_has_shortcode( $tag = '' ) {
global $post;
return is_a( $post, 'WP_Post' ) && has_shortcode( $post->post_content, $tag );
return is_singular() && is_a( $post, 'WP_Post' ) && has_shortcode( $post->post_content, $tag );
}

View File

@ -1354,6 +1354,18 @@ function wc_product_attribute_uasort_comparison( $a, $b ) {
return ( $a['position'] < $b['position'] ) ? -1 : 1;
}
/**
* Used to sort shipping zone methods with uasort.
* @since 2.7.0
*/
function wc_shipping_zone_method_order_uasort_comparison( $a, $b ) {
if ( $a->method_order === $b->method_order ) {
return 0;
}
return ( $a->method_order < $b->method_order ) ? -1 : 1;
}
/**
* Get rounding precision.
*

View File

@ -39,6 +39,22 @@ function wc_rest_prepare_date_response( $date ) {
return mysql_to_rfc3339( $date );
}
/**
* Returns image mime types users are allowed to upload via the API.
* @since 2.6.4
* @return array
*/
function wc_rest_allowed_image_mime_types() {
return apply_filters( 'woocommerce_rest_allowed_image_mime_types', array(
'jpg|jpeg|jpe' => 'image/jpeg',
'gif' => 'image/gif',
'png' => 'image/png',
'bmp' => 'image/bmp',
'tiff|tif' => 'image/tiff',
'ico' => 'image/x-icon',
) );
}
/**
* Upload image from URL.
*
@ -47,9 +63,8 @@ function wc_rest_prepare_date_response( $date ) {
* @return array|WP_Error Attachment data or error message.
*/
function wc_rest_upload_image_from_url( $image_url ) {
$file_name = basename( current( explode( '?', $image_url ) ) );
$wp_filetype = wp_check_filetype( $file_name, null );
$parsed_url = @parse_url( $image_url );
$file_name = basename( current( explode( '?', $image_url ) ) );
$parsed_url = @parse_url( $image_url );
// Check parsed URL.
if ( ! $parsed_url || ! is_array( $parsed_url ) ) {
@ -71,6 +86,8 @@ function wc_rest_upload_image_from_url( $image_url ) {
}
// Ensure we have a file name and type.
$wp_filetype = wp_check_filetype( $file_name, wc_rest_allowed_image_mime_types() );
if ( ! $wp_filetype['type'] ) {
$headers = wp_remote_retrieve_headers( $response );
if ( isset( $headers['content-disposition'] ) && strstr( $headers['content-disposition'], 'filename=' ) ) {
@ -81,6 +98,13 @@ function wc_rest_upload_image_from_url( $image_url ) {
$file_name = 'image.' . str_replace( 'image/', '', $headers['content-type'] );
}
unset( $headers );
// Recheck filetype
$wp_filetype = wp_check_filetype( $file_name, wc_rest_allowed_image_mime_types() );
if ( ! $wp_filetype['type'] ) {
return new WP_Error( 'woocommerce_rest_invalid_image_type', __( 'Invalid image type.', 'woocommerce' ), array( 'status' => 400 ) );
}
}
// Upload the file.

View File

@ -158,142 +158,9 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
== Changelog ==
= 2.6.3 - 19/07/16 =
* Fix - Security - Escape captions in product-thumbnail and product-image templates (template versions have been bumped).
* Fix - Fixed how we calculate shipping tax rates when using more than one tax class.
* Fix - When duplicating product variations, set title, name, and guid.
* Fix - Normalized 'read more' buttons.
* Fix - Add to cart notices for grouped products.
* Fix - Do not sanitize passwords in the settings API.
* Fix - Handle shipping zone location range conversion during update (dashes to ...).
* Fix - Always remove commas while processing flat rate costs.
* Fix - Ensures account page layout is only applied to desktop-sized displays.
* Fix - When getting layered nav counts, take search parameters into consideration.
* Fix - Free shipping show/hide javascript.
* Fix - Strip hash characters when exporting reports.
* Fix - Use permission id to revoke access to downloads to prevent removing wrong rows.
* Fix - When duplicating product variations, set title, name, and guid.
* Fix - Set more appropriate default rounding precision based on currency decimal places.
* Fix - Fix message styles for empty carts.
* Fix - Fixed the load of the WC_Email_Customer_On_Hold_Order class.
* Fix - Don't perform cart update on search submit.
* Dev - API - Added support for WP REST API with custom URL prefixes.
* Dev - API - Delete variations when deleting a variable product.
* Dev - API - Fixed how we check for product types.
* Dev - Added woocommerce_cart_id filter.
* Dev - Add shortcode name param to shortcode_atts function calls.
* Dev - Post custom data when fetching a variation via ajax.
* Dev - Include child prices in grouped_price_html filter.
* Dev - Allow filtering of variation stock quantity.
* Dev - Added $_product argument to 'woocommerce_restock_refunded_item' hook.
* Dev - Added a filter hook for the wc_ajax endpoint url.
* Tweak - Include account page link in new customer account emails.
* Tweak - Updated all URLs from WooThemes.com to WooCommerce.com.
* Tweak - Cache the result of WC_Comments::wp_count_comments() in a transient (improves performance).
= 2.6.2 - 30/06/16 =
* Fix - Set max index length on woocommerce_payment_tokenmeta table for utf8mb4 support.
* Fix - is_available check for legacy shipping methods.
* Fix - wc_add_to_cart_message() when non-array is passed.
* Fix - Maximum coupon check should allow the 'maximum' value.
* Fix - Product coupon logic to avoid applying non-applicable coupons.
* Fix - Potential notices when leaving out 'default' field for shipping instances.
* Fix - wp_cache_flush after term meta migration/update.
* Fix - wc_add_to_cart_message() when non-array is passed.
* Fix - woocommerce_redirect_single_search_result type check was incorrect.
* Fix - Javascript show/hide of option in free shipping method.
* Fix - Convert ellipsis to three periods when saving postcodes.
* Fix - Prevent get_terms returning duplicates.
* Fix - Removed non-existent country (Netherlands Antilles) from https://en.wikipedia.org/wiki/ISO_3166-1.
* Fix - Grouped product range display when child is free.
* Fix - Remove discount when checking free shipping min amount.
* Fix - Prevent blocking the same element multiple times on cart page.
* Fix - Don't sync ratings right after a new comment to prevent rating sync whilst rating meta does not exist yet.
* Fix - Fix product RSS feeds when using shop base.
* Fix - woocommerce_local_pickup_methods comparison by stripping instance IDs before the check.
* Fix - During password resets, use cookie to store reset key and user login to avoid them being exposed in the URL/referer headers.
* Dev - API - Fixed variable product stock at product level.
* Dev - CLI - Introduces `woocommerce_cli_get_product_variable_types` filter.
* Dev - Allow notices to be grouped on checkout after certain events.
* Dev - API - Allows save images by ID with product variations.
* Tweak - Made customer pay link display if order needs_payment() rather than checking pending status.
* Tweak - Zones - Wording clarifications.
* Tweak - Zones - Match zones with postcodes but no country.
* Tweak - Zones - Match zones with no regions as 'everywhere'.
* Tweak - Added view_admin_dashboard cap for disabling the admin access restriction in custom roles.
* Tweak - Revised stock display based on feedback to hide 'in stock' message if stock management is off and only show available on backorder if notifying customer.
* Tweak - Allow external product SKUs.
* Tweak - PT (Portugal) and JP (Japan) postcode formats.
* Tweak - Sort products from the `[product_category]` shortcode by menu order.
* Tweak - Improve wc_orders_count() performance by running a query to count only posts of the given status.
* Tweak - To allow my account page tabs to be disabled without code, you can now set the endpoint value to a blank string.
= 2.6.1 - 16/06/16 =
* Fix - Added missing localized format for line taxes in orders screen to prevent total miscalculation in manual orders.
* Fix - Improved the hour and time fields validation pattern on the orders screen.
* Fix - PayPal does not allow free products, but paid shipping. Workaround by sending shipping as a line item if it is the only cost.
* Fix - SKUs prop on products shortcode.
* Fix - Layered nav counts when term_id does not match term_taxonomy_id (before splitting).
* Fix - Fixed referer links from cart messages in WP 4.4.
* Fix - Fix the showing/hiding of panels when terms do not exist by using wc_get_product_types() for retrieving product types.
* Dev - content-product.php and content-product_cat.php contained the wrong version.
* Dev - Show "matching zone" notice on the frontend when shipping debug mode is on.
* Dev - Restored missing WC_Settings_API::init_form_fields() method to prevent potential errors in 3rd party gateways.
* Dev - API - Fixed returned data from product images (changed `title` to `name`).
* Dev - API - Fixed products schema for `grouped_products`.
* Dev - API - Fixed products attribute options when contains `,`.
* Tweak - Hide 'payment methods' screen if no methods support it.
* Tweak - If shipping method count changes, reset to default.
* Tweak - Avoid normalization of zone postcodes so wildcard matching can be performed on postcodes with spaces. E.g. SP1 *
* Tweak - Allow max_fee in addition to min_fee in flat rate costs fields.
* Tweak - Wrap order_schema_markup() output in hidden div in case script tag is stripped.
= 2.6.0 - 14/06/16 =
* Feature - Introduced Shipping Zone functionality, and re-usable instance based shipping methods.
* Feature - Tabbed "My Account" area.
* Feature - Cart operations now use ajax (item quantities/remove, coupon apply/remove, shipping options).
* Feature - Layered nav; filter by rating.
* Feature - On-hold order emails.
* Dev - All new REST API based on the WP REST API. The old WC REST API is still available, but the new one is preferred.
* Dev - Added ability for shipping methods to store meta data to the order.
* Dev - Added Payment Gateway Tokenization API for storing and retrieving tokens in a standardized manner.
* Dev - Migrated custom term meta implementation to WP Term Meta.
* Dev - Added new wc_get_orders() function to get order objects and ids instead of direct get_posts() calls.
* Dev - Made coupon optional in cart has_discount() method.
* Dev - Made the review template more editable.
* Dev - Allowed product constructors to throw exceptions if invalid.
* Dev - Wrapped currency symbols in a span to allow styling or replacement.
* Fix - Update download permission user and email when changed.
* Fix - Fixed shipping method unregistration.
* Fix - Stopped create and update webhooks firing at the same time for products.
* Fix - Allow COD to set on-hold status if the order contains downloads.
* Fix - Force CURL to use TLS 1.2 for PayPal connections.
* Tweak - Improved lost password flow.
* Tweak - Show payment dates on order screen.
* Tweak - Ignore catalog visibility on products shortcode when specifying IDs or SKUs.
* Tweak - Added context to checkout error messages.
* Tweak - Added SKU field to grouped products.
* Tweak - Moved SKU field to inventory tab.
* Tweak - Support qty display in cart messages.
* Tweak - Hide min order amount field when not needed in shipping settings.
* Tweak - If shipping < 999.99, use 'shipping' arg when passing values to PayPal.
* Tweak - Show net sales on dashboard.
* Tweak - Replaced credit card icons with SVG.
* Tweak - Enqueue scripts on pages with checkout shortcodes.
* Tweak - Color code the manual, system and customer notes.
* Tweak - Layered Nav Refactoring to improve performance.
* Tweak - Removed tag/cat classes from loops since WP does the same.
* Tweak - Added hash check for orders so that if the cart changes before payment, a new order is made.
* Tweak - Removed unused 'view mode' under screen options.
* Tweak - Added 110 new currencies (including Bitcoin).
* Tweak - New background updater for data upgrades.
* Tweak - Blank slates in admin post screens.
* Tweak - Added blockui when variations are being retrieved via ajax.
* Tweak - Hide empty taxes by default (filterable).
* Tweak - Allow failed orders to be edited.
* Tweak - If there are no shipping methods setup, dont prompt for shipping at checkout.
* Tweak - Allowed country exclusion, rather than just inclusion, in sell to setting.
* Lots, lots more - [see the comparison here](https://github.com/woothemes/woocommerce/compare/2.5.5...2.6.0).
= 2.7.0 =
* Respect stock status and prevent the "out of stock threshold" setting affecting existing in-stock products.
* Added Nigerian Provinces to i18n/state.
[See changelog for all versions](https://raw.githubusercontent.com/woothemes/woocommerce/master/CHANGELOG.txt).

View File

@ -3,7 +3,7 @@
* Plugin Name: WooCommerce
* Plugin URI: https://woocommerce.com/
* Description: An e-commerce toolkit that helps you sell anything. Beautifully.
* Version: 2.6.3
* Version: 2.7.0-dev
* Author: WooThemes
* Author URI: https://woothemes.com
* Requires at least: 4.4