WooCommerce - Version 3.0.8

Version Description

  • 2017-06-06 =
  • Fix - Include multi-dimensional array support in oAuth1.0.
  • Fix - Stock/backorder notice when stock management is disabled.
  • Fix - Handle shipping item taxes if set to avoid the legacy fallback.
  • Fix - Variations should inherit purchase_note from parent.
  • Fix - Check if subtotal is blank, not empty, before setting for order items.
  • Fix - Cancelled email should be send for processing orders, not pending.
  • Fix - Missing variable in legacy API.
  • Fix - Correct price query when on a post type archive.
  • Fix - Missing $ip Variable in geolocation class.
  • Fix - A single multi-word attribute is fine for variation titles.
  • Fix - Gallery should be updated even if empty in REST API.
  • Fix - Fix saving of text attributes with special chars.
  • Fix - Undefined index warning when saving variations with stock management disabled.
  • Fix - Use meta id instead of key in WC_Order_Item::offsetGet.
  • Fix - Format parent stock qty on read.
  • Fix - Hide replies from recent reviews widgets.
  • Fix - Use formatted weight and dimensions for variations.
  • Fix - Ensure we have child before getting price to fix a notice in grouped products.
  • Fix - Fixed unicode characters when saving webhook delivery logs.
  • Fix - Avoid deprecated ID in legacy API.
  • Fix - Add correct args to woocommerce_shipping_zone_method_deleted and woocommerce_shortcode_products_query hooks.
  • Fix - Correctly append cache in product widget.
  • Fix - Add ability to invalidate cache by object ID.
  • Fix - Notice in structured data class.
  • Fix - Only delete if an object has an ID in CRUD to avoid wp_delete_post using global ID.
  • Fix - Avoid notices on checkout by ensuring all legacy data is correctly set.
  • Fix - Add failed to processing event for the processing email.
  • Fix - Store user ID and use that to determine if the session should be loaded or not. Ensures user data is correct and shipping calculator data is stored.
Download this release

Release Info

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

Code changes from version 3.0.7 to 3.0.8

Files changed (42) hide show
  1. assets/js/frontend/add-to-cart-variation.js +2 -2
  2. assets/js/frontend/add-to-cart-variation.min.js +1 -1
  3. i18n/languages/woocommerce.pot +158 -154
  4. includes/abstracts/abstract-wc-data.php +4 -3
  5. includes/abstracts/abstract-wc-widget.php +9 -2
  6. includes/admin/class-wc-admin-dashboard.php +1 -0
  7. includes/admin/meta-boxes/class-wc-meta-box-product-data.php +4 -4
  8. includes/api/class-wc-rest-authentication.php +130 -79
  9. includes/api/class-wc-rest-products-controller.php +1 -3
  10. includes/api/legacy/v1/class-wc-api-resource.php +1 -6
  11. includes/api/legacy/v2/class-wc-api-resource.php +1 -6
  12. includes/api/legacy/v3/class-wc-api-orders.php +2 -2
  13. includes/api/legacy/v3/class-wc-api-resource.php +1 -6
  14. includes/class-wc-checkout.php +3 -3
  15. includes/class-wc-geolocation.php +2 -2
  16. includes/class-wc-order-item-meta.php +1 -1
  17. includes/class-wc-order-item-product.php +1 -1
  18. includes/class-wc-order-item-shipping.php +1 -1
  19. includes/class-wc-order-item.php +1 -1
  20. includes/class-wc-post-data.php +15 -0
  21. includes/class-wc-product-attribute.php +2 -1
  22. includes/class-wc-product-grouped.php +1 -1
  23. includes/class-wc-product-variation.php +18 -0
  24. includes/class-wc-shipping-zone.php +7 -2
  25. includes/class-wc-shortcodes.php +1 -1
  26. includes/class-wc-structured-data.php +1 -1
  27. includes/class-wc-webhook.php +1 -1
  28. includes/data-stores/abstract-wc-order-data-store-cpt.php +4 -0
  29. includes/data-stores/class-wc-coupon-data-store-cpt.php +6 -2
  30. includes/data-stores/class-wc-customer-data-store-session.php +5 -6
  31. includes/data-stores/class-wc-order-refund-data-store-cpt.php +4 -0
  32. includes/data-stores/class-wc-product-data-store-cpt.php +6 -2
  33. includes/data-stores/class-wc-product-variation-data-store-cpt.php +6 -4
  34. includes/emails/class-wc-email-cancelled-order.php +1 -1
  35. includes/emails/class-wc-email-customer-processing-order.php +1 -0
  36. includes/wc-order-functions.php +1 -1
  37. includes/wc-order-item-functions.php +3 -6
  38. includes/wc-rest-functions.php +1 -2
  39. includes/widgets/class-wc-widget-price-filter.php +1 -1
  40. includes/widgets/class-wc-widget-recent-reviews.php +1 -1
  41. readme.txt +33 -3
  42. woocommerce.php +2 -2
assets/js/frontend/add-to-cart-variation.js CHANGED
@@ -197,13 +197,13 @@
197
  }
198
 
199
  if ( variation.weight ) {
200
- $weight.wc_set_content( variation.weight );
201
  } else {
202
  $weight.wc_reset_content();
203
  }
204
 
205
  if ( variation.dimensions ) {
206
- $dimensions.wc_set_content( variation.dimensions );
207
  } else {
208
  $dimensions.wc_reset_content();
209
  }
197
  }
198
 
199
  if ( variation.weight ) {
200
+ $weight.wc_set_content( variation.weight_html );
201
  } else {
202
  $weight.wc_reset_content();
203
  }
204
 
205
  if ( variation.dimensions ) {
206
+ $dimensions.wc_set_content( variation.dimensions_html );
207
  } else {
208
  $dimensions.wc_reset_content();
209
  }
assets/js/frontend/add-to-cart-variation.min.js CHANGED
@@ -1 +1 @@
1
- !function(a,b,c,d){var e=function(a){this.$form=a,this.$attributeFields=a.find(".variations select"),this.$singleVariation=a.find(".single_variation"),this.$singleVariationWrap=a.find(".single_variation_wrap"),this.$resetVariations=a.find(".reset_variations"),this.$product=a.closest(".product"),this.variationData=a.data("product_variations"),this.useAjax=!1===this.variationData,this.xhr=!1,this.$singleVariationWrap.show(),this.$form.unbind("check_variations update_variation_values found_variation"),this.$resetVariations.unbind("click"),this.$attributeFields.unbind("change "),this.getChosenAttributes=this.getChosenAttributes.bind(this),this.findMatchingVariations=this.findMatchingVariations.bind(this),this.isMatch=this.isMatch.bind(this),this.toggleResetLink=this.toggleResetLink.bind(this),a.on("click",".reset_variations",{variationForm:this},this.onReset),a.on("reload_product_variations",{variationForm:this},this.onReload),a.on("hide_variation",{variationForm:this},this.onHide),a.on("show_variation",{variationForm:this},this.onShow),a.on("click",".single_add_to_cart_button",{variationForm:this},this.onAddToCart),a.on("reset_data",{variationForm:this},this.onResetDisplayedVariation),a.on("reset_image",{variationForm:this},this.onResetImage),a.on("change",".variations select",{variationForm:this},this.onChange),a.on("found_variation",{variationForm:this},this.onFoundVariation),a.on("check_variations",{variationForm:this},this.onFindVariation),a.on("update_variation_values",{variationForm:this},this.onUpdateAttributes),a.trigger("check_variations"),a.trigger("wc_variation_form")};e.prototype.onReset=function(a){a.preventDefault(),a.data.variationForm.$attributeFields.val("").change(),a.data.variationForm.$form.trigger("reset_data")},e.prototype.onReload=function(a){var b=a.data.variationForm;b.variationData=b.$form.data("product_variations"),b.useAjax=!1===b.variationData,b.$form.trigger("check_variations")},e.prototype.onHide=function(a){a.preventDefault(),a.data.variationForm.$form.find(".single_add_to_cart_button").removeClass("wc-variation-is-unavailable").addClass("disabled wc-variation-selection-needed"),a.data.variationForm.$form.find(".woocommerce-variation-add-to-cart").removeClass("woocommerce-variation-add-to-cart-enabled").addClass("woocommerce-variation-add-to-cart-disabled")},e.prototype.onShow=function(a,b,c){a.preventDefault(),c?(a.data.variationForm.$form.find(".single_add_to_cart_button").removeClass("disabled wc-variation-selection-needed wc-variation-is-unavailable"),a.data.variationForm.$form.find(".woocommerce-variation-add-to-cart").removeClass("woocommerce-variation-add-to-cart-disabled").addClass("woocommerce-variation-add-to-cart-enabled")):(a.data.variationForm.$form.find(".single_add_to_cart_button").removeClass("wc-variation-selection-needed").addClass("disabled wc-variation-is-unavailable"),a.data.variationForm.$form.find(".woocommerce-variation-add-to-cart").removeClass("woocommerce-variation-add-to-cart-enabled").addClass("woocommerce-variation-add-to-cart-disabled"))},e.prototype.onAddToCart=function(c){a(this).is(".disabled")&&(c.preventDefault(),a(this).is(".wc-variation-is-unavailable")?b.alert(wc_add_to_cart_variation_params.i18n_unavailable_text):a(this).is(".wc-variation-selection-needed")&&b.alert(wc_add_to_cart_variation_params.i18n_make_a_selection_text))},e.prototype.onResetDisplayedVariation=function(a){var b=a.data.variationForm;b.$product.find(".product_meta").find(".sku").wc_reset_content(),b.$product.find(".product_weight").wc_reset_content(),b.$product.find(".product_dimensions").wc_reset_content(),b.$form.trigger("reset_image"),b.$singleVariation.slideUp(200).trigger("hide_variation")},e.prototype.onResetImage=function(a){a.data.variationForm.$form.wc_variations_image_update(!1)},e.prototype.onFindVariation=function(b){var c=b.data.variationForm,d=c.getChosenAttributes(),e=d.data;if(d.count===d.chosenCount)if(c.useAjax)c.xhr&&c.xhr.abort(),c.$form.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),e.product_id=parseInt(c.$form.data("product_id"),10),e.custom_data=c.$form.data("custom_data"),c.xhr=a.ajax({url:wc_cart_fragments_params.wc_ajax_url.toString().replace("%%endpoint%%","get_variation"),type:"POST",data:e,success:function(a){a?c.$form.trigger("found_variation",[a]):(c.$form.trigger("reset_data"),c.$form.find(".single_variation").after('<p class="wc-no-matching-variations woocommerce-info">'+wc_add_to_cart_variation_params.i18n_no_matching_variations_text+"</p>"),c.$form.find(".wc-no-matching-variations").slideDown(200))},complete:function(){c.$form.unblock()}});else{c.$form.trigger("update_variation_values");var f=c.findMatchingVariations(c.variationData,e),g=f.shift();g?c.$form.trigger("found_variation",[g]):(c.$form.trigger("reset_data"),c.$form.find(".single_variation").after('<p class="wc-no-matching-variations woocommerce-info">'+wc_add_to_cart_variation_params.i18n_no_matching_variations_text+"</p>"),c.$form.find(".wc-no-matching-variations").slideDown(200))}else c.$form.trigger("update_variation_values"),c.$form.trigger("reset_data");c.toggleResetLink(d.chosenCount>0)},e.prototype.onFoundVariation=function(b,c){var d=b.data.variationForm,e=d.$product.find(".product_meta").find(".sku"),f=d.$product.find(".product_weight"),g=d.$product.find(".product_dimensions"),h=d.$singleVariationWrap.find(".quantity"),i=!0,j="",k=!1,l="";c.sku?e.wc_set_content(c.sku):e.wc_reset_content(),c.weight?f.wc_set_content(c.weight):f.wc_reset_content(),c.dimensions?g.wc_set_content(c.dimensions):g.wc_reset_content(),d.$form.wc_variations_image_update(c),c.variation_is_visible?(k=wp.template("variation-template"),j=c.variation_id):k=wp.template("unavailable-variation-template"),l=k({variation:c}),l=l.replace("/*<![CDATA[*/",""),l=l.replace("/*]]>*/",""),d.$singleVariation.html(l),d.$form.find('input[name="variation_id"], input.variation_id').val(c.variation_id).change(),"yes"===c.is_sold_individually?(h.find("input.qty").val("1").attr("min","1").attr("max",""),h.hide()):(h.find("input.qty").attr("min",c.min_qty).attr("max",c.max_qty),h.show()),c.is_purchasable&&c.is_in_stock&&c.variation_is_visible||(i=!1),a.trim(d.$singleVariation.text())?d.$singleVariation.slideDown(200).trigger("show_variation",[c,i]):d.$singleVariation.show().trigger("show_variation",[c,i])},e.prototype.onChange=function(b){var c=b.data.variationForm;c.$form.find('input[name="variation_id"], input.variation_id').val("").change(),c.$form.find(".wc-no-matching-variations").remove(),c.useAjax?c.$form.trigger("check_variations"):(c.$form.trigger("woocommerce_variation_select_change"),c.$form.trigger("check_variations"),a(this).blur()),c.$form.trigger("woocommerce_variation_has_changed")},e.prototype.addSlashes=function(a){return a=a.replace(/'/g,"\\'"),a=a.replace(/"/g,'\\"')},e.prototype.onUpdateAttributes=function(b){var c=b.data.variationForm,d=c.getChosenAttributes(),e=d.data;c.useAjax||(c.$attributeFields.each(function(b,d){var f=a(d),g=f.data("attribute_name")||f.attr("name"),h=a(d).data("show_option_none"),i=":gt(0)",j=0,k=a("<select/>"),l=f.val()||"",m=!0;if(!f.data("attribute_html")){var n=f.clone();n.find("option").removeAttr("disabled attached").removeAttr("selected"),f.data("attribute_options",n.find("option"+i).get()),f.data("attribute_html",n.html())}k.html(f.data("attribute_html"));var o=a.extend(!0,{},e);o[g]="";var p=c.findMatchingVariations(c.variationData,o);for(var q in p)if("undefined"!=typeof p[q]){var r=p[q].attributes;for(var s in r)if(r.hasOwnProperty(s)){var t=r[s],u="";s===g&&(p[q].variation_is_active&&(u="enabled"),t?(t=a("<div/>").html(t).text(),k.find('option[value="'+c.addSlashes(t)+'"]').addClass("attached "+u)):k.find("option:gt(0)").addClass("attached "+u))}}j=k.find("option.attached").length,!l||0!==j&&0!==k.find('option.attached.enabled[value="'+c.addSlashes(l)+'"]').length||(m=!1),j>0&&l&&m&&"no"===h&&(k.find("option:first").remove(),i=""),k.find("option"+i+":not(.attached)").remove(),f.html(k.html()),f.find("option"+i+":not(.enabled)").prop("disabled",!0),l?m?f.val(l):f.val("").change():f.val("")}),c.$form.trigger("woocommerce_update_variation_values"))},e.prototype.getChosenAttributes=function(){var b={},c=0,d=0;return this.$attributeFields.each(function(){var e=a(this).data("attribute_name")||a(this).attr("name"),f=a(this).val()||"";f.length>0&&d++,c++,b[e]=f}),{count:c,chosenCount:d,data:b}},e.prototype.findMatchingVariations=function(a,b){for(var c=[],d=0;d<a.length;d++){var e=a[d];this.isMatch(e.attributes,b)&&c.push(e)}return c},e.prototype.isMatch=function(a,b){var c=!0;for(var e in a)if(a.hasOwnProperty(e)){var f=a[e],g=b[e];f!==d&&g!==d&&0!==f.length&&0!==g.length&&f!==g&&(c=!1)}return c},e.prototype.toggleResetLink=function(a){a?"hidden"===this.$resetVariations.css("visibility")&&this.$resetVariations.css("visibility","visible").hide().fadeIn():this.$resetVariations.css("visibility","hidden")},a.fn.wc_variation_form=function(){return new e(this),this},a.fn.wc_set_content=function(a){d===this.attr("data-o_content")&&this.attr("data-o_content",this.text()),this.text(a)},a.fn.wc_reset_content=function(){d!==this.attr("data-o_content")&&this.text(this.attr("data-o_content"))},a.fn.wc_set_variation_attr=function(a,b){d===this.attr("data-o_"+a)&&this.attr("data-o_"+a,this.attr(a)?this.attr(a):""),!1===b?this.removeAttr(a):this.attr(a,b)},a.fn.wc_reset_variation_attr=function(a){d!==this.attr("data-o_"+a)&&this.attr(a,this.attr("data-o_"+a))},a.fn.wc_maybe_trigger_slide_position_reset=function(b){var c=a(this),d=c.closest(".product"),e=d.find(".images"),f=!1,g=b&&b.image_id?b.image_id:"";c.attr("current-image")!==g&&(f=!0),c.attr("current-image",g),f&&e.trigger("woocommerce_gallery_reset_slide_position")},a.fn.wc_variations_image_update=function(c){var d=this,e=d.closest(".product"),f=e.find(".images"),g=e.find(".flex-control-nav li:eq(0) img"),h=f.find(".woocommerce-product-gallery__image, .woocommerce-product-gallery__image--placeholder").eq(0),i=h.find(".wp-post-image"),j=h.find("a").eq(0);c&&c.image&&c.image.src&&c.image.src.length>1?(i.wc_set_variation_attr("src",c.image.src),i.wc_set_variation_attr("height",c.image.src_h),i.wc_set_variation_attr("width",c.image.src_w),i.wc_set_variation_attr("srcset",c.image.srcset),i.wc_set_variation_attr("sizes",c.image.sizes),i.wc_set_variation_attr("title",c.image.title),i.wc_set_variation_attr("alt",c.image.alt),i.wc_set_variation_attr("data-src",c.image.full_src),i.wc_set_variation_attr("data-large_image",c.image.full_src),i.wc_set_variation_attr("data-large_image_width",c.image.full_src_w),i.wc_set_variation_attr("data-large_image_height",c.image.full_src_h),h.wc_set_variation_attr("data-thumb",c.image.src),g.wc_set_variation_attr("src",c.image.thumb_src),j.wc_set_variation_attr("href",c.image.full_src)):(i.wc_reset_variation_attr("src"),i.wc_reset_variation_attr("width"),i.wc_reset_variation_attr("height"),i.wc_reset_variation_attr("srcset"),i.wc_reset_variation_attr("sizes"),i.wc_reset_variation_attr("title"),i.wc_reset_variation_attr("alt"),i.wc_reset_variation_attr("data-src"),i.wc_reset_variation_attr("data-large_image"),i.wc_reset_variation_attr("data-large_image_width"),i.wc_reset_variation_attr("data-large_image_height"),h.wc_reset_variation_attr("data-thumb"),g.wc_reset_variation_attr("src"),j.wc_reset_variation_attr("href")),b.setTimeout(function(){f.trigger("woocommerce_gallery_init_zoom"),d.wc_maybe_trigger_slide_position_reset(c),a(b).trigger("resize")},10)},a(function(){"undefined"!=typeof wc_add_to_cart_variation_params&&a(".variations_form").each(function(){a(this).wc_variation_form()})})}(jQuery,window,document);
1
+ !function(a,b,c,d){var e=function(a){this.$form=a,this.$attributeFields=a.find(".variations select"),this.$singleVariation=a.find(".single_variation"),this.$singleVariationWrap=a.find(".single_variation_wrap"),this.$resetVariations=a.find(".reset_variations"),this.$product=a.closest(".product"),this.variationData=a.data("product_variations"),this.useAjax=!1===this.variationData,this.xhr=!1,this.$singleVariationWrap.show(),this.$form.unbind("check_variations update_variation_values found_variation"),this.$resetVariations.unbind("click"),this.$attributeFields.unbind("change "),this.getChosenAttributes=this.getChosenAttributes.bind(this),this.findMatchingVariations=this.findMatchingVariations.bind(this),this.isMatch=this.isMatch.bind(this),this.toggleResetLink=this.toggleResetLink.bind(this),a.on("click",".reset_variations",{variationForm:this},this.onReset),a.on("reload_product_variations",{variationForm:this},this.onReload),a.on("hide_variation",{variationForm:this},this.onHide),a.on("show_variation",{variationForm:this},this.onShow),a.on("click",".single_add_to_cart_button",{variationForm:this},this.onAddToCart),a.on("reset_data",{variationForm:this},this.onResetDisplayedVariation),a.on("reset_image",{variationForm:this},this.onResetImage),a.on("change",".variations select",{variationForm:this},this.onChange),a.on("found_variation",{variationForm:this},this.onFoundVariation),a.on("check_variations",{variationForm:this},this.onFindVariation),a.on("update_variation_values",{variationForm:this},this.onUpdateAttributes),a.trigger("check_variations"),a.trigger("wc_variation_form")};e.prototype.onReset=function(a){a.preventDefault(),a.data.variationForm.$attributeFields.val("").change(),a.data.variationForm.$form.trigger("reset_data")},e.prototype.onReload=function(a){var b=a.data.variationForm;b.variationData=b.$form.data("product_variations"),b.useAjax=!1===b.variationData,b.$form.trigger("check_variations")},e.prototype.onHide=function(a){a.preventDefault(),a.data.variationForm.$form.find(".single_add_to_cart_button").removeClass("wc-variation-is-unavailable").addClass("disabled wc-variation-selection-needed"),a.data.variationForm.$form.find(".woocommerce-variation-add-to-cart").removeClass("woocommerce-variation-add-to-cart-enabled").addClass("woocommerce-variation-add-to-cart-disabled")},e.prototype.onShow=function(a,b,c){a.preventDefault(),c?(a.data.variationForm.$form.find(".single_add_to_cart_button").removeClass("disabled wc-variation-selection-needed wc-variation-is-unavailable"),a.data.variationForm.$form.find(".woocommerce-variation-add-to-cart").removeClass("woocommerce-variation-add-to-cart-disabled").addClass("woocommerce-variation-add-to-cart-enabled")):(a.data.variationForm.$form.find(".single_add_to_cart_button").removeClass("wc-variation-selection-needed").addClass("disabled wc-variation-is-unavailable"),a.data.variationForm.$form.find(".woocommerce-variation-add-to-cart").removeClass("woocommerce-variation-add-to-cart-enabled").addClass("woocommerce-variation-add-to-cart-disabled"))},e.prototype.onAddToCart=function(c){a(this).is(".disabled")&&(c.preventDefault(),a(this).is(".wc-variation-is-unavailable")?b.alert(wc_add_to_cart_variation_params.i18n_unavailable_text):a(this).is(".wc-variation-selection-needed")&&b.alert(wc_add_to_cart_variation_params.i18n_make_a_selection_text))},e.prototype.onResetDisplayedVariation=function(a){var b=a.data.variationForm;b.$product.find(".product_meta").find(".sku").wc_reset_content(),b.$product.find(".product_weight").wc_reset_content(),b.$product.find(".product_dimensions").wc_reset_content(),b.$form.trigger("reset_image"),b.$singleVariation.slideUp(200).trigger("hide_variation")},e.prototype.onResetImage=function(a){a.data.variationForm.$form.wc_variations_image_update(!1)},e.prototype.onFindVariation=function(b){var c=b.data.variationForm,d=c.getChosenAttributes(),e=d.data;if(d.count===d.chosenCount)if(c.useAjax)c.xhr&&c.xhr.abort(),c.$form.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),e.product_id=parseInt(c.$form.data("product_id"),10),e.custom_data=c.$form.data("custom_data"),c.xhr=a.ajax({url:wc_cart_fragments_params.wc_ajax_url.toString().replace("%%endpoint%%","get_variation"),type:"POST",data:e,success:function(a){a?c.$form.trigger("found_variation",[a]):(c.$form.trigger("reset_data"),c.$form.find(".single_variation").after('<p class="wc-no-matching-variations woocommerce-info">'+wc_add_to_cart_variation_params.i18n_no_matching_variations_text+"</p>"),c.$form.find(".wc-no-matching-variations").slideDown(200))},complete:function(){c.$form.unblock()}});else{c.$form.trigger("update_variation_values");var f=c.findMatchingVariations(c.variationData,e),g=f.shift();g?c.$form.trigger("found_variation",[g]):(c.$form.trigger("reset_data"),c.$form.find(".single_variation").after('<p class="wc-no-matching-variations woocommerce-info">'+wc_add_to_cart_variation_params.i18n_no_matching_variations_text+"</p>"),c.$form.find(".wc-no-matching-variations").slideDown(200))}else c.$form.trigger("update_variation_values"),c.$form.trigger("reset_data");c.toggleResetLink(d.chosenCount>0)},e.prototype.onFoundVariation=function(b,c){var d=b.data.variationForm,e=d.$product.find(".product_meta").find(".sku"),f=d.$product.find(".product_weight"),g=d.$product.find(".product_dimensions"),h=d.$singleVariationWrap.find(".quantity"),i=!0,j="",k=!1,l="";c.sku?e.wc_set_content(c.sku):e.wc_reset_content(),c.weight?f.wc_set_content(c.weight_html):f.wc_reset_content(),c.dimensions?g.wc_set_content(c.dimensions_html):g.wc_reset_content(),d.$form.wc_variations_image_update(c),c.variation_is_visible?(k=wp.template("variation-template"),j=c.variation_id):k=wp.template("unavailable-variation-template"),l=k({variation:c}),l=l.replace("/*<![CDATA[*/",""),l=l.replace("/*]]>*/",""),d.$singleVariation.html(l),d.$form.find('input[name="variation_id"], input.variation_id').val(c.variation_id).change(),"yes"===c.is_sold_individually?(h.find("input.qty").val("1").attr("min","1").attr("max",""),h.hide()):(h.find("input.qty").attr("min",c.min_qty).attr("max",c.max_qty),h.show()),c.is_purchasable&&c.is_in_stock&&c.variation_is_visible||(i=!1),a.trim(d.$singleVariation.text())?d.$singleVariation.slideDown(200).trigger("show_variation",[c,i]):d.$singleVariation.show().trigger("show_variation",[c,i])},e.prototype.onChange=function(b){var c=b.data.variationForm;c.$form.find('input[name="variation_id"], input.variation_id').val("").change(),c.$form.find(".wc-no-matching-variations").remove(),c.useAjax?c.$form.trigger("check_variations"):(c.$form.trigger("woocommerce_variation_select_change"),c.$form.trigger("check_variations"),a(this).blur()),c.$form.trigger("woocommerce_variation_has_changed")},e.prototype.addSlashes=function(a){return a=a.replace(/'/g,"\\'"),a=a.replace(/"/g,'\\"')},e.prototype.onUpdateAttributes=function(b){var c=b.data.variationForm,d=c.getChosenAttributes(),e=d.data;c.useAjax||(c.$attributeFields.each(function(b,d){var f=a(d),g=f.data("attribute_name")||f.attr("name"),h=a(d).data("show_option_none"),i=":gt(0)",j=0,k=a("<select/>"),l=f.val()||"",m=!0;if(!f.data("attribute_html")){var n=f.clone();n.find("option").removeAttr("disabled attached").removeAttr("selected"),f.data("attribute_options",n.find("option"+i).get()),f.data("attribute_html",n.html())}k.html(f.data("attribute_html"));var o=a.extend(!0,{},e);o[g]="";var p=c.findMatchingVariations(c.variationData,o);for(var q in p)if("undefined"!=typeof p[q]){var r=p[q].attributes;for(var s in r)if(r.hasOwnProperty(s)){var t=r[s],u="";s===g&&(p[q].variation_is_active&&(u="enabled"),t?(t=a("<div/>").html(t).text(),k.find('option[value="'+c.addSlashes(t)+'"]').addClass("attached "+u)):k.find("option:gt(0)").addClass("attached "+u))}}j=k.find("option.attached").length,!l||0!==j&&0!==k.find('option.attached.enabled[value="'+c.addSlashes(l)+'"]').length||(m=!1),j>0&&l&&m&&"no"===h&&(k.find("option:first").remove(),i=""),k.find("option"+i+":not(.attached)").remove(),f.html(k.html()),f.find("option"+i+":not(.enabled)").prop("disabled",!0),l?m?f.val(l):f.val("").change():f.val("")}),c.$form.trigger("woocommerce_update_variation_values"))},e.prototype.getChosenAttributes=function(){var b={},c=0,d=0;return this.$attributeFields.each(function(){var e=a(this).data("attribute_name")||a(this).attr("name"),f=a(this).val()||"";f.length>0&&d++,c++,b[e]=f}),{count:c,chosenCount:d,data:b}},e.prototype.findMatchingVariations=function(a,b){for(var c=[],d=0;d<a.length;d++){var e=a[d];this.isMatch(e.attributes,b)&&c.push(e)}return c},e.prototype.isMatch=function(a,b){var c=!0;for(var e in a)if(a.hasOwnProperty(e)){var f=a[e],g=b[e];f!==d&&g!==d&&0!==f.length&&0!==g.length&&f!==g&&(c=!1)}return c},e.prototype.toggleResetLink=function(a){a?"hidden"===this.$resetVariations.css("visibility")&&this.$resetVariations.css("visibility","visible").hide().fadeIn():this.$resetVariations.css("visibility","hidden")},a.fn.wc_variation_form=function(){return new e(this),this},a.fn.wc_set_content=function(a){d===this.attr("data-o_content")&&this.attr("data-o_content",this.text()),this.text(a)},a.fn.wc_reset_content=function(){d!==this.attr("data-o_content")&&this.text(this.attr("data-o_content"))},a.fn.wc_set_variation_attr=function(a,b){d===this.attr("data-o_"+a)&&this.attr("data-o_"+a,this.attr(a)?this.attr(a):""),!1===b?this.removeAttr(a):this.attr(a,b)},a.fn.wc_reset_variation_attr=function(a){d!==this.attr("data-o_"+a)&&this.attr(a,this.attr("data-o_"+a))},a.fn.wc_maybe_trigger_slide_position_reset=function(b){var c=a(this),d=c.closest(".product"),e=d.find(".images"),f=!1,g=b&&b.image_id?b.image_id:"";c.attr("current-image")!==g&&(f=!0),c.attr("current-image",g),f&&e.trigger("woocommerce_gallery_reset_slide_position")},a.fn.wc_variations_image_update=function(c){var d=this,e=d.closest(".product"),f=e.find(".images"),g=e.find(".flex-control-nav li:eq(0) img"),h=f.find(".woocommerce-product-gallery__image, .woocommerce-product-gallery__image--placeholder").eq(0),i=h.find(".wp-post-image"),j=h.find("a").eq(0);c&&c.image&&c.image.src&&c.image.src.length>1?(i.wc_set_variation_attr("src",c.image.src),i.wc_set_variation_attr("height",c.image.src_h),i.wc_set_variation_attr("width",c.image.src_w),i.wc_set_variation_attr("srcset",c.image.srcset),i.wc_set_variation_attr("sizes",c.image.sizes),i.wc_set_variation_attr("title",c.image.title),i.wc_set_variation_attr("alt",c.image.alt),i.wc_set_variation_attr("data-src",c.image.full_src),i.wc_set_variation_attr("data-large_image",c.image.full_src),i.wc_set_variation_attr("data-large_image_width",c.image.full_src_w),i.wc_set_variation_attr("data-large_image_height",c.image.full_src_h),h.wc_set_variation_attr("data-thumb",c.image.src),g.wc_set_variation_attr("src",c.image.thumb_src),j.wc_set_variation_attr("href",c.image.full_src)):(i.wc_reset_variation_attr("src"),i.wc_reset_variation_attr("width"),i.wc_reset_variation_attr("height"),i.wc_reset_variation_attr("srcset"),i.wc_reset_variation_attr("sizes"),i.wc_reset_variation_attr("title"),i.wc_reset_variation_attr("alt"),i.wc_reset_variation_attr("data-src"),i.wc_reset_variation_attr("data-large_image"),i.wc_reset_variation_attr("data-large_image_width"),i.wc_reset_variation_attr("data-large_image_height"),h.wc_reset_variation_attr("data-thumb"),g.wc_reset_variation_attr("src"),j.wc_reset_variation_attr("href")),b.setTimeout(function(){f.trigger("woocommerce_gallery_init_zoom"),d.wc_maybe_trigger_slide_position_reset(c),a(b).trigger("resize")},10)},a(function(){"undefined"!=typeof wc_add_to_cart_variation_params&&a(".variations_form").each(function(){a(this).wc_variation_form()})})}(jQuery,window,document);
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.0.7\n"
6
  "Report-Msgid-Bugs-To: https://github.com/woocommerce/woocommerce/issues\n"
7
- "POT-Creation-Date: 2017-05-16 16:19:04+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -5312,7 +5312,7 @@ msgstr ""
5312
  #: includes/abstracts/abstract-wc-rest-crud-controller.php:385
5313
  #: includes/abstracts/abstract-wc-rest-posts-controller.php:148
5314
  #: includes/api/class-wc-rest-product-variations-controller.php:462
5315
- #: includes/api/class-wc-rest-products-controller.php:1264
5316
  msgid "Invalid ID."
5317
  msgstr ""
5318
 
@@ -5331,7 +5331,7 @@ msgstr ""
5331
  #: includes/abstracts/abstract-wc-rest-crud-controller.php:402
5332
  #: includes/abstracts/abstract-wc-rest-posts-controller.php:433
5333
  #: includes/api/class-wc-rest-product-variations-controller.php:479
5334
- #: includes/api/class-wc-rest-products-controller.php:1285
5335
  #: includes/api/v1/class-wc-rest-products-controller.php:1658
5336
  #. translators: %s: post type
5337
  msgid "Sorry, you are not allowed to delete %s."
@@ -5340,7 +5340,7 @@ msgstr ""
5340
  #: includes/abstracts/abstract-wc-rest-crud-controller.php:416
5341
  #: includes/abstracts/abstract-wc-rest-posts-controller.php:446
5342
  #: includes/api/class-wc-rest-product-variations-controller.php:493
5343
- #: includes/api/class-wc-rest-products-controller.php:1312
5344
  #: includes/api/v1/class-wc-rest-products-controller.php:1685
5345
  #. translators: %s: post type
5346
  msgid "The %s does not support trashing."
@@ -5349,7 +5349,7 @@ msgstr ""
5349
  #: includes/abstracts/abstract-wc-rest-crud-controller.php:423
5350
  #: includes/abstracts/abstract-wc-rest-posts-controller.php:452
5351
  #: includes/api/class-wc-rest-product-variations-controller.php:500
5352
- #: includes/api/class-wc-rest-products-controller.php:1319
5353
  #: includes/api/v1/class-wc-rest-products-controller.php:1691
5354
  #. translators: %s: post type
5355
  msgid "The %s has already been deleted."
@@ -5358,7 +5358,7 @@ msgstr ""
5358
  #: includes/abstracts/abstract-wc-rest-crud-controller.php:433
5359
  #: includes/abstracts/abstract-wc-rest-posts-controller.php:462
5360
  #: includes/api/class-wc-rest-product-variations-controller.php:510
5361
- #: includes/api/class-wc-rest-products-controller.php:1329
5362
  #: includes/api/v1/class-wc-rest-order-notes-controller.php:313
5363
  #: includes/api/v1/class-wc-rest-products-controller.php:1702
5364
  #: includes/api/v1/class-wc-rest-webhooks-controller.php:342
@@ -5483,7 +5483,7 @@ msgstr ""
5483
  #: includes/abstracts/abstract-wc-rest-posts-controller.php:146
5484
  #: includes/abstracts/abstract-wc-rest-posts-controller.php:253
5485
  #: includes/api/class-wc-rest-products-controller.php:675
5486
- #: includes/api/class-wc-rest-products-controller.php:1268
5487
  #: includes/api/v1/class-wc-rest-products-controller.php:1639
5488
  msgid ""
5489
  "To manipulate product variations you should use the "
@@ -5547,7 +5547,7 @@ msgstr ""
5547
  #: includes/api/class-wc-rest-product-reviews-controller.php:155
5548
  #: includes/api/class-wc-rest-product-variations-controller.php:597
5549
  #: includes/api/class-wc-rest-products-controller.php:83
5550
- #: includes/api/class-wc-rest-products-controller.php:1363
5551
  #: includes/api/class-wc-rest-setting-options-controller.php:81
5552
  #: includes/api/class-wc-rest-shipping-methods-controller.php:53
5553
  #: includes/api/class-wc-rest-shipping-zones-controller.php:275
@@ -6315,18 +6315,18 @@ msgid_plural "<strong>%s products</strong> out of stock"
6315
  msgstr[0] ""
6316
  msgstr[1] ""
6317
 
6318
- #: includes/admin/class-wc-admin-dashboard.php:272
6319
  #: templates/single-product/review-rating.php:31
6320
  #. translators: %s: rating
6321
  msgid "%s out of 5"
6322
  msgstr ""
6323
 
6324
- #: includes/admin/class-wc-admin-dashboard.php:275
6325
  #. translators: %s: review author
6326
  msgid "reviewed by %s"
6327
  msgstr ""
6328
 
6329
- #: includes/admin/class-wc-admin-dashboard.php:281
6330
  msgid "There are no product reviews yet."
6331
  msgstr ""
6332
 
@@ -9500,7 +9500,7 @@ msgstr ""
9500
 
9501
  #: includes/admin/meta-boxes/views/html-product-data-inventory.php:65
9502
  #: includes/admin/meta-boxes/views/html-variation-admin.php:207
9503
- #: includes/api/class-wc-rest-products-controller.php:1596
9504
  #: includes/api/v1/class-wc-rest-products-controller.php:1954
9505
  msgid ""
9506
  "Controls whether or not the product is listed as \"in stock\" or \"out of "
@@ -13049,76 +13049,80 @@ msgstr ""
13049
  msgid "Custom:"
13050
  msgstr ""
13051
 
13052
- #: includes/api/class-wc-rest-authentication.php:124
13053
  #: includes/api/legacy/v1/class-wc-api-authentication.php:115
13054
  #: includes/api/legacy/v2/class-wc-api-authentication.php:115
13055
  #: includes/api/legacy/v3/class-wc-api-authentication.php:83
13056
  msgid "Consumer secret is invalid."
13057
  msgstr ""
13058
 
13059
- #: includes/api/class-wc-rest-authentication.php:251
13060
  msgid "Missing OAuth parameter %s"
13061
  msgid_plural "Missing OAuth parameters %s"
13062
  msgstr[0] ""
13063
  msgstr[1] ""
13064
 
13065
- #: includes/api/class-wc-rest-authentication.php:291
13066
  #: includes/api/legacy/v1/class-wc-api-authentication.php:184
13067
  #: includes/api/legacy/v2/class-wc-api-authentication.php:183
13068
  #: includes/api/legacy/v3/class-wc-api-authentication.php:179
13069
  msgid "Consumer key is invalid."
13070
  msgstr ""
13071
 
13072
- #: includes/api/class-wc-rest-authentication.php:341
13073
  #: includes/api/legacy/v1/class-wc-api-authentication.php:252
13074
  #: includes/api/legacy/v2/class-wc-api-authentication.php:251
13075
  #: includes/api/legacy/v3/class-wc-api-authentication.php:241
13076
  msgid "Invalid signature - failed to sort parameters."
13077
  msgstr ""
13078
 
13079
- #: includes/api/class-wc-rest-authentication.php:360
13080
  #: includes/api/legacy/v1/class-wc-api-authentication.php:266
13081
  #: includes/api/legacy/v2/class-wc-api-authentication.php:265
13082
  #: includes/api/legacy/v3/class-wc-api-authentication.php:261
13083
  msgid "Invalid signature - signature method is invalid."
13084
  msgstr ""
13085
 
13086
- #: includes/api/class-wc-rest-authentication.php:368
13087
  #: includes/api/legacy/v1/class-wc-api-authentication.php:274
13088
  #: includes/api/legacy/v2/class-wc-api-authentication.php:273
13089
  #: includes/api/legacy/v3/class-wc-api-authentication.php:270
13090
  msgid "Invalid signature - provided signature does not match."
13091
  msgstr ""
13092
 
13093
- #: includes/api/class-wc-rest-authentication.php:419
13094
  #: includes/api/legacy/v1/class-wc-api-authentication.php:332
13095
  #: includes/api/legacy/v2/class-wc-api-authentication.php:331
13096
  #: includes/api/legacy/v3/class-wc-api-authentication.php:335
13097
  msgid "Invalid timestamp."
13098
  msgstr ""
13099
 
13100
- #: includes/api/class-wc-rest-authentication.php:429
13101
  #: includes/api/legacy/v1/class-wc-api-authentication.php:342
13102
  #: includes/api/legacy/v2/class-wc-api-authentication.php:341
13103
  #: includes/api/legacy/v3/class-wc-api-authentication.php:345
13104
  msgid "Invalid nonce - nonce has already been used."
13105
  msgstr ""
13106
 
13107
- #: includes/api/class-wc-rest-authentication.php:493
13108
  #: includes/api/legacy/v1/class-wc-api-authentication.php:377
13109
  #: includes/api/legacy/v2/class-wc-api-authentication.php:376
13110
  #: includes/api/legacy/v3/class-wc-api-authentication.php:380
13111
  msgid "The API key provided does not have read permissions."
13112
  msgstr ""
13113
 
13114
- #: includes/api/class-wc-rest-authentication.php:503
13115
  #: includes/api/legacy/v1/class-wc-api-authentication.php:386
13116
  #: includes/api/legacy/v2/class-wc-api-authentication.php:385
13117
  #: includes/api/legacy/v3/class-wc-api-authentication.php:389
13118
  msgid "The API key provided does not have write permissions."
13119
  msgstr ""
13120
 
13121
- #: includes/api/class-wc-rest-authentication.php:541
 
 
 
 
13122
  #: includes/api/legacy/v3/class-wc-api-authentication.php:111
13123
  msgid ""
13124
  "WooCommerce API. Use a consumer key in the username field and a consumer "
@@ -13301,7 +13305,7 @@ msgstr ""
13301
  #: includes/api/class-wc-rest-orders-controller.php:1484
13302
  #: includes/api/class-wc-rest-orders-controller.php:1542
13303
  #: includes/api/class-wc-rest-product-variations-controller.php:913
13304
- #: includes/api/class-wc-rest-products-controller.php:1938
13305
  msgid "Meta data."
13306
  msgstr ""
13307
 
@@ -13316,7 +13320,7 @@ msgstr ""
13316
  #: includes/api/class-wc-rest-orders-controller.php:1491
13317
  #: includes/api/class-wc-rest-orders-controller.php:1549
13318
  #: includes/api/class-wc-rest-product-variations-controller.php:920
13319
- #: includes/api/class-wc-rest-products-controller.php:1945
13320
  msgid "Meta ID."
13321
  msgstr ""
13322
 
@@ -13331,7 +13335,7 @@ msgstr ""
13331
  #: includes/api/class-wc-rest-orders-controller.php:1497
13332
  #: includes/api/class-wc-rest-orders-controller.php:1555
13333
  #: includes/api/class-wc-rest-product-variations-controller.php:926
13334
- #: includes/api/class-wc-rest-products-controller.php:1951
13335
  #: includes/api/v1/class-wc-rest-order-refunds-controller.php:477
13336
  #: includes/api/v1/class-wc-rest-orders-controller.php:1302
13337
  msgid "Meta key."
@@ -13348,7 +13352,7 @@ msgstr ""
13348
  #: includes/api/class-wc-rest-orders-controller.php:1502
13349
  #: includes/api/class-wc-rest-orders-controller.php:1560
13350
  #: includes/api/class-wc-rest-product-variations-controller.php:931
13351
- #: includes/api/class-wc-rest-products-controller.php:1956
13352
  #: includes/api/v1/class-wc-rest-order-refunds-controller.php:489
13353
  #: includes/api/v1/class-wc-rest-orders-controller.php:1314
13354
  msgid "Meta value."
@@ -13377,7 +13381,7 @@ msgstr ""
13377
  #: includes/api/class-wc-rest-customer-downloads-controller.php:103
13378
  #: includes/api/class-wc-rest-order-refunds-controller.php:414
13379
  #: includes/api/class-wc-rest-orders-controller.php:1136
13380
- #: includes/api/class-wc-rest-products-controller.php:1369
13381
  #: includes/api/v1/class-wc-rest-order-refunds-controller.php:381
13382
  #: includes/api/v1/class-wc-rest-orders-controller.php:1206
13383
  #: includes/api/v1/class-wc-rest-products-controller.php:1742
@@ -13424,7 +13428,7 @@ msgstr ""
13424
 
13425
  #: includes/api/class-wc-rest-customer-downloads-controller.php:151
13426
  #: includes/api/class-wc-rest-product-variations-controller.php:711
13427
- #: includes/api/class-wc-rest-products-controller.php:1537
13428
  #: includes/api/v1/class-wc-rest-customer-downloads-controller.php:223
13429
  #: includes/api/v1/class-wc-rest-products-controller.php:1888
13430
  #: includes/api/v1/class-wc-rest-products-controller.php:2366
@@ -13433,7 +13437,7 @@ msgstr ""
13433
 
13434
  #: includes/api/class-wc-rest-customer-downloads-controller.php:157
13435
  #: includes/api/class-wc-rest-product-variations-controller.php:716
13436
- #: includes/api/class-wc-rest-products-controller.php:1542
13437
  #: includes/api/v1/class-wc-rest-customer-downloads-controller.php:229
13438
  #: includes/api/v1/class-wc-rest-products-controller.php:1893
13439
  #: includes/api/v1/class-wc-rest-products-controller.php:2371
@@ -14259,7 +14263,7 @@ msgid "Placeholder text to be displayed in text inputs."
14259
  msgstr ""
14260
 
14261
  #: includes/api/class-wc-rest-product-categories-controller.php:112
14262
- #: includes/api/class-wc-rest-products-controller.php:1746
14263
  #: includes/api/v1/class-wc-rest-product-categories-controller.php:176
14264
  #: includes/api/v1/class-wc-rest-products-controller.php:2104
14265
  msgid "Category name."
@@ -14299,7 +14303,7 @@ msgstr ""
14299
 
14300
  #: includes/api/class-wc-rest-product-categories-controller.php:153
14301
  #: includes/api/class-wc-rest-product-variations-controller.php:831
14302
- #: includes/api/class-wc-rest-products-controller.php:1795
14303
  #: includes/api/v1/class-wc-rest-product-categories-controller.php:217
14304
  #: includes/api/v1/class-wc-rest-products-controller.php:2153
14305
  #: includes/api/v1/class-wc-rest-products-controller.php:2486
@@ -14308,7 +14312,7 @@ msgstr ""
14308
 
14309
  #: includes/api/class-wc-rest-product-categories-controller.php:158
14310
  #: includes/api/class-wc-rest-product-variations-controller.php:836
14311
- #: includes/api/class-wc-rest-products-controller.php:1800
14312
  #: includes/api/v1/class-wc-rest-product-categories-controller.php:222
14313
  #: includes/api/v1/class-wc-rest-products-controller.php:2158
14314
  #: includes/api/v1/class-wc-rest-products-controller.php:2491
@@ -14317,13 +14321,13 @@ msgstr ""
14317
 
14318
  #: includes/api/class-wc-rest-product-categories-controller.php:164
14319
  #: includes/api/class-wc-rest-product-variations-controller.php:842
14320
- #: includes/api/class-wc-rest-products-controller.php:1806
14321
  msgid "The date the image was created, as GMT."
14322
  msgstr ""
14323
 
14324
  #: includes/api/class-wc-rest-product-categories-controller.php:170
14325
  #: includes/api/class-wc-rest-product-variations-controller.php:848
14326
- #: includes/api/class-wc-rest-products-controller.php:1812
14327
  #: includes/api/v1/class-wc-rest-product-categories-controller.php:228
14328
  #: includes/api/v1/class-wc-rest-products-controller.php:2164
14329
  #: includes/api/v1/class-wc-rest-products-controller.php:2497
@@ -14332,13 +14336,13 @@ msgstr ""
14332
 
14333
  #: includes/api/class-wc-rest-product-categories-controller.php:176
14334
  #: includes/api/class-wc-rest-product-variations-controller.php:854
14335
- #: includes/api/class-wc-rest-products-controller.php:1818
14336
  msgid "The date the image was last modified, as GMT."
14337
  msgstr ""
14338
 
14339
  #: includes/api/class-wc-rest-product-categories-controller.php:182
14340
  #: includes/api/class-wc-rest-product-variations-controller.php:860
14341
- #: includes/api/class-wc-rest-products-controller.php:1824
14342
  #: includes/api/v1/class-wc-rest-product-categories-controller.php:234
14343
  #: includes/api/v1/class-wc-rest-products-controller.php:2170
14344
  #: includes/api/v1/class-wc-rest-products-controller.php:2503
@@ -14347,7 +14351,7 @@ msgstr ""
14347
 
14348
  #: includes/api/class-wc-rest-product-categories-controller.php:188
14349
  #: includes/api/class-wc-rest-product-variations-controller.php:866
14350
- #: includes/api/class-wc-rest-products-controller.php:1830
14351
  #: includes/api/v1/class-wc-rest-product-categories-controller.php:240
14352
  #: includes/api/v1/class-wc-rest-products-controller.php:2176
14353
  #: includes/api/v1/class-wc-rest-products-controller.php:2509
@@ -14356,7 +14360,7 @@ msgstr ""
14356
 
14357
  #: includes/api/class-wc-rest-product-categories-controller.php:193
14358
  #: includes/api/class-wc-rest-product-variations-controller.php:871
14359
- #: includes/api/class-wc-rest-products-controller.php:1835
14360
  #: includes/api/v1/class-wc-rest-product-categories-controller.php:245
14361
  #: includes/api/v1/class-wc-rest-products-controller.php:2181
14362
  #: includes/api/v1/class-wc-rest-products-controller.php:2514
@@ -14445,7 +14449,7 @@ msgid "Variation URL."
14445
  msgstr ""
14446
 
14447
  #: includes/api/class-wc-rest-product-variations-controller.php:627
14448
- #: includes/api/class-wc-rest-products-controller.php:1447
14449
  #: includes/api/v1/class-wc-rest-products-controller.php:1808
14450
  #: includes/api/v1/class-wc-rest-products-controller.php:2293
14451
  msgid "Unique identifier."
@@ -14467,19 +14471,19 @@ msgid "Variation sale price."
14467
  msgstr ""
14468
 
14469
  #: includes/api/class-wc-rest-product-variations-controller.php:648
14470
- #: includes/api/class-wc-rest-products-controller.php:1468
14471
  msgid "Start date of sale price, in the site's timezone."
14472
  msgstr ""
14473
 
14474
  #: includes/api/class-wc-rest-product-variations-controller.php:653
14475
- #: includes/api/class-wc-rest-products-controller.php:1473
14476
  msgid "Start date of sale price, as GMT."
14477
  msgstr ""
14478
 
14479
  #: includes/api/class-wc-rest-product-variations-controller.php:658
14480
  #: includes/api/class-wc-rest-product-variations-controller.php:663
14481
- #: includes/api/class-wc-rest-products-controller.php:1478
14482
- #: includes/api/class-wc-rest-products-controller.php:1483
14483
  msgid "End date of sale price, in the site's timezone."
14484
  msgstr ""
14485
 
@@ -14489,7 +14493,7 @@ msgid "Shows if the variation is on sale."
14489
  msgstr ""
14490
 
14491
  #: includes/api/class-wc-rest-product-variations-controller.php:674
14492
- #: includes/api/class-wc-rest-products-controller.php:1870
14493
  #: includes/api/v1/class-wc-rest-products-controller.php:2216
14494
  msgid ""
14495
  "Define if the attribute is visible on the \"Additional information\" tab in "
@@ -14512,42 +14516,42 @@ msgid "If the variation is downloadable."
14512
  msgstr ""
14513
 
14514
  #: includes/api/class-wc-rest-product-variations-controller.php:698
14515
- #: includes/api/class-wc-rest-products-controller.php:1524
14516
  #: includes/api/v1/class-wc-rest-products-controller.php:1875
14517
  #: includes/api/v1/class-wc-rest-products-controller.php:2353
14518
  msgid "List of downloadable files."
14519
  msgstr ""
14520
 
14521
  #: includes/api/class-wc-rest-product-variations-controller.php:705
14522
- #: includes/api/class-wc-rest-products-controller.php:1531
14523
  #: includes/api/v1/class-wc-rest-products-controller.php:1882
14524
  #: includes/api/v1/class-wc-rest-products-controller.php:2360
14525
  msgid "File MD5 hash."
14526
  msgstr ""
14527
 
14528
  #: includes/api/class-wc-rest-product-variations-controller.php:724
14529
- #: includes/api/class-wc-rest-products-controller.php:1550
14530
  #: includes/api/v1/class-wc-rest-products-controller.php:1901
14531
  #: includes/api/v1/class-wc-rest-products-controller.php:2379
14532
  msgid "Number of times downloadable files can be downloaded after purchase."
14533
  msgstr ""
14534
 
14535
  #: includes/api/class-wc-rest-product-variations-controller.php:730
14536
- #: includes/api/class-wc-rest-products-controller.php:1556
14537
  #: includes/api/v1/class-wc-rest-products-controller.php:1907
14538
  #: includes/api/v1/class-wc-rest-products-controller.php:2385
14539
  msgid "Number of days until access to downloadable files expires."
14540
  msgstr ""
14541
 
14542
  #: includes/api/class-wc-rest-product-variations-controller.php:736
14543
- #: includes/api/class-wc-rest-products-controller.php:1573
14544
  #: includes/api/v1/class-wc-rest-products-controller.php:1931
14545
  #: includes/api/v1/class-wc-rest-products-controller.php:2391
14546
  msgid "Tax status."
14547
  msgstr ""
14548
 
14549
  #: includes/api/class-wc-rest-product-variations-controller.php:743
14550
- #: includes/api/class-wc-rest-products-controller.php:1580
14551
  #: includes/api/v1/class-wc-rest-products-controller.php:1938
14552
  #: includes/api/v1/class-wc-rest-products-controller.php:2398
14553
  #: includes/api/v1/class-wc-rest-taxes-controller.php:631
@@ -14560,7 +14564,7 @@ msgid "Stock management at variation level."
14560
  msgstr ""
14561
 
14562
  #: includes/api/class-wc-rest-product-variations-controller.php:754
14563
- #: includes/api/class-wc-rest-products-controller.php:1591
14564
  #: includes/api/v1/class-wc-rest-products-controller.php:1949
14565
  #: includes/api/v1/class-wc-rest-products-controller.php:2409
14566
  msgid "Stock quantity."
@@ -14574,14 +14578,14 @@ msgid ""
14574
  msgstr ""
14575
 
14576
  #: includes/api/class-wc-rest-product-variations-controller.php:765
14577
- #: includes/api/class-wc-rest-products-controller.php:1602
14578
  #: includes/api/v1/class-wc-rest-products-controller.php:1960
14579
  #: includes/api/v1/class-wc-rest-products-controller.php:2420
14580
  msgid "If managing stock, this controls if backorders are allowed."
14581
  msgstr ""
14582
 
14583
  #: includes/api/class-wc-rest-product-variations-controller.php:772
14584
- #: includes/api/class-wc-rest-products-controller.php:1609
14585
  #: includes/api/v1/class-wc-rest-products-controller.php:1967
14586
  #: includes/api/v1/class-wc-rest-products-controller.php:2427
14587
  msgid "Shows if backorders are allowed."
@@ -14622,14 +14626,14 @@ msgid "Variation height (%s)."
14622
  msgstr ""
14623
 
14624
  #: includes/api/class-wc-rest-product-variations-controller.php:815
14625
- #: includes/api/class-wc-rest-products-controller.php:1670
14626
  #: includes/api/v1/class-wc-rest-products-controller.php:2028
14627
  #: includes/api/v1/class-wc-rest-products-controller.php:2470
14628
  msgid "Shipping class slug."
14629
  msgstr ""
14630
 
14631
  #: includes/api/class-wc-rest-product-variations-controller.php:820
14632
- #: includes/api/class-wc-rest-products-controller.php:1675
14633
  #: includes/api/v1/class-wc-rest-products-controller.php:2033
14634
  #: includes/api/v1/class-wc-rest-products-controller.php:2475
14635
  msgid "Shipping class ID."
@@ -14641,22 +14645,22 @@ msgid "Variation image data."
14641
  msgstr ""
14642
 
14643
  #: includes/api/class-wc-rest-product-variations-controller.php:876
14644
- #: includes/api/class-wc-rest-products-controller.php:1840
14645
  #: includes/api/v1/class-wc-rest-products-controller.php:2186
14646
  #: includes/api/v1/class-wc-rest-products-controller.php:2519
14647
  msgid "Image position. 0 means that the image is featured."
14648
  msgstr ""
14649
 
14650
  #: includes/api/class-wc-rest-product-variations-controller.php:883
14651
- #: includes/api/class-wc-rest-products-controller.php:1848
14652
  #: includes/api/v1/class-wc-rest-products-controller.php:2194
14653
  #: includes/api/v1/class-wc-rest-products-controller.php:2526
14654
  msgid "List of attributes."
14655
  msgstr ""
14656
 
14657
  #: includes/api/class-wc-rest-product-variations-controller.php:890
14658
- #: includes/api/class-wc-rest-products-controller.php:1855
14659
- #: includes/api/class-wc-rest-products-controller.php:1897
14660
  #: includes/api/v1/class-wc-rest-products-controller.php:2201
14661
  #: includes/api/v1/class-wc-rest-products-controller.php:2243
14662
  #: includes/api/v1/class-wc-rest-products-controller.php:2533
@@ -14665,8 +14669,8 @@ msgid "Attribute ID."
14665
  msgstr ""
14666
 
14667
  #: includes/api/class-wc-rest-product-variations-controller.php:895
14668
- #: includes/api/class-wc-rest-products-controller.php:1860
14669
- #: includes/api/class-wc-rest-products-controller.php:1902
14670
  #: includes/api/v1/class-wc-rest-product-attributes-controller.php:542
14671
  #: includes/api/v1/class-wc-rest-products-controller.php:2206
14672
  #: includes/api/v1/class-wc-rest-products-controller.php:2248
@@ -14675,14 +14679,14 @@ msgid "Attribute name."
14675
  msgstr ""
14676
 
14677
  #: includes/api/class-wc-rest-product-variations-controller.php:900
14678
- #: includes/api/class-wc-rest-products-controller.php:1907
14679
  #: includes/api/v1/class-wc-rest-products-controller.php:2253
14680
  #: includes/api/v1/class-wc-rest-products-controller.php:2543
14681
  msgid "Selected attribute term name."
14682
  msgstr ""
14683
 
14684
  #: includes/api/class-wc-rest-product-variations-controller.php:908
14685
- #: includes/api/class-wc-rest-products-controller.php:1933
14686
  #: includes/api/v1/class-wc-rest-products-controller.php:2563
14687
  msgid "Menu order, used to custom sort products."
14688
  msgstr ""
@@ -14706,351 +14710,351 @@ msgstr ""
14706
  msgid "#%s is an invalid image ID."
14707
  msgstr ""
14708
 
14709
- #: includes/api/class-wc-rest-products-controller.php:1374
14710
  #: includes/api/v1/class-wc-rest-products-controller.php:1747
14711
  msgid "Product slug."
14712
  msgstr ""
14713
 
14714
- #: includes/api/class-wc-rest-products-controller.php:1379
14715
  #: includes/api/v1/class-wc-rest-products-controller.php:1752
14716
  msgid "Product URL."
14717
  msgstr ""
14718
 
14719
- #: includes/api/class-wc-rest-products-controller.php:1386
14720
  #: includes/api/v1/class-wc-rest-products-controller.php:1759
14721
  msgid "The date the product was created, in the site's timezone."
14722
  msgstr ""
14723
 
14724
- #: includes/api/class-wc-rest-products-controller.php:1392
14725
  msgid "The date the product was created, as GMT."
14726
  msgstr ""
14727
 
14728
- #: includes/api/class-wc-rest-products-controller.php:1398
14729
  #: includes/api/v1/class-wc-rest-products-controller.php:1765
14730
  msgid "The date the product was last modified, in the site's timezone."
14731
  msgstr ""
14732
 
14733
- #: includes/api/class-wc-rest-products-controller.php:1404
14734
  msgid "The date the product was last modified, as GMT."
14735
  msgstr ""
14736
 
14737
- #: includes/api/class-wc-rest-products-controller.php:1410
14738
  #: includes/api/v1/class-wc-rest-products-controller.php:1771
14739
  msgid "Product type."
14740
  msgstr ""
14741
 
14742
- #: includes/api/class-wc-rest-products-controller.php:1417
14743
  #: includes/api/v1/class-wc-rest-products-controller.php:1778
14744
  msgid "Product status (post status)."
14745
  msgstr ""
14746
 
14747
- #: includes/api/class-wc-rest-products-controller.php:1424
14748
  #: includes/api/v1/class-wc-rest-products-controller.php:1785
14749
  msgid "Featured product."
14750
  msgstr ""
14751
 
14752
- #: includes/api/class-wc-rest-products-controller.php:1430
14753
  #: includes/api/v1/class-wc-rest-products-controller.php:1791
14754
  msgid "Catalog visibility."
14755
  msgstr ""
14756
 
14757
- #: includes/api/class-wc-rest-products-controller.php:1437
14758
  #: includes/api/v1/class-wc-rest-products-controller.php:1798
14759
  msgid "Product description."
14760
  msgstr ""
14761
 
14762
- #: includes/api/class-wc-rest-products-controller.php:1442
14763
  #: includes/api/v1/class-wc-rest-products-controller.php:1803
14764
  msgid "Product short description."
14765
  msgstr ""
14766
 
14767
- #: includes/api/class-wc-rest-products-controller.php:1452
14768
  #: includes/api/v1/class-wc-rest-products-controller.php:1813
14769
  msgid "Current product price."
14770
  msgstr ""
14771
 
14772
- #: includes/api/class-wc-rest-products-controller.php:1458
14773
  #: includes/api/v1/class-wc-rest-products-controller.php:1819
14774
  msgid "Product regular price."
14775
  msgstr ""
14776
 
14777
- #: includes/api/class-wc-rest-products-controller.php:1463
14778
  #: includes/api/v1/class-wc-rest-products-controller.php:1824
14779
  msgid "Product sale price."
14780
  msgstr ""
14781
 
14782
- #: includes/api/class-wc-rest-products-controller.php:1488
14783
  #: includes/api/v1/class-wc-rest-products-controller.php:1839
14784
  msgid "Price formatted in HTML."
14785
  msgstr ""
14786
 
14787
- #: includes/api/class-wc-rest-products-controller.php:1494
14788
  #: includes/api/v1/class-wc-rest-products-controller.php:1845
14789
  msgid "Shows if the product is on sale."
14790
  msgstr ""
14791
 
14792
- #: includes/api/class-wc-rest-products-controller.php:1500
14793
  #: includes/api/v1/class-wc-rest-products-controller.php:1851
14794
  msgid "Shows if the product can be bought."
14795
  msgstr ""
14796
 
14797
- #: includes/api/class-wc-rest-products-controller.php:1506
14798
  #: includes/api/v1/class-wc-rest-products-controller.php:1857
14799
  msgid "Amount of sales."
14800
  msgstr ""
14801
 
14802
- #: includes/api/class-wc-rest-products-controller.php:1512
14803
  #: includes/api/v1/class-wc-rest-products-controller.php:1863
14804
  msgid "If the product is virtual."
14805
  msgstr ""
14806
 
14807
- #: includes/api/class-wc-rest-products-controller.php:1518
14808
  #: includes/api/v1/class-wc-rest-products-controller.php:1869
14809
  msgid "If the product is downloadable."
14810
  msgstr ""
14811
 
14812
- #: includes/api/class-wc-rest-products-controller.php:1562
14813
  #: includes/api/v1/class-wc-rest-products-controller.php:1920
14814
  msgid "Product external URL. Only for external products."
14815
  msgstr ""
14816
 
14817
- #: includes/api/class-wc-rest-products-controller.php:1568
14818
  #: includes/api/v1/class-wc-rest-products-controller.php:1926
14819
  msgid "Product external button text. Only for external products."
14820
  msgstr ""
14821
 
14822
- #: includes/api/class-wc-rest-products-controller.php:1585
14823
  #: includes/api/v1/class-wc-rest-products-controller.php:1943
14824
  msgid "Stock management at product level."
14825
  msgstr ""
14826
 
14827
- #: includes/api/class-wc-rest-products-controller.php:1615
14828
  #: includes/api/v1/class-wc-rest-products-controller.php:1973
14829
  msgid "Shows if the product is on backordered."
14830
  msgstr ""
14831
 
14832
- #: includes/api/class-wc-rest-products-controller.php:1621
14833
  #: includes/api/v1/class-wc-rest-products-controller.php:1979
14834
  msgid "Allow one item to be bought in a single order."
14835
  msgstr ""
14836
 
14837
- #: includes/api/class-wc-rest-products-controller.php:1628
14838
  #: includes/api/v1/class-wc-rest-products-controller.php:1986
14839
  #. translators: %s: weight unit
14840
  msgid "Product weight (%s)."
14841
  msgstr ""
14842
 
14843
- #: includes/api/class-wc-rest-products-controller.php:1633
14844
  #: includes/api/v1/class-wc-rest-products-controller.php:1991
14845
  msgid "Product dimensions."
14846
  msgstr ""
14847
 
14848
- #: includes/api/class-wc-rest-products-controller.php:1639
14849
  #: includes/api/v1/class-wc-rest-products-controller.php:1997
14850
  #. translators: %s: dimension unit
14851
  msgid "Product length (%s)."
14852
  msgstr ""
14853
 
14854
- #: includes/api/class-wc-rest-products-controller.php:1645
14855
  #: includes/api/v1/class-wc-rest-products-controller.php:2003
14856
  #. translators: %s: dimension unit
14857
  msgid "Product width (%s)."
14858
  msgstr ""
14859
 
14860
- #: includes/api/class-wc-rest-products-controller.php:1651
14861
  #: includes/api/v1/class-wc-rest-products-controller.php:2009
14862
  #. translators: %s: dimension unit
14863
  msgid "Product height (%s)."
14864
  msgstr ""
14865
 
14866
- #: includes/api/class-wc-rest-products-controller.php:1658
14867
  #: includes/api/v1/class-wc-rest-products-controller.php:2016
14868
  msgid "Shows if the product need to be shipped."
14869
  msgstr ""
14870
 
14871
- #: includes/api/class-wc-rest-products-controller.php:1664
14872
  #: includes/api/v1/class-wc-rest-products-controller.php:2022
14873
  msgid "Shows whether or not the product shipping is taxable."
14874
  msgstr ""
14875
 
14876
- #: includes/api/class-wc-rest-products-controller.php:1681
14877
  #: includes/api/v1/class-wc-rest-products-controller.php:2039
14878
  msgid "Allow reviews."
14879
  msgstr ""
14880
 
14881
- #: includes/api/class-wc-rest-products-controller.php:1687
14882
  #: includes/api/v1/class-wc-rest-products-controller.php:2045
14883
  msgid "Reviews average rating."
14884
  msgstr ""
14885
 
14886
- #: includes/api/class-wc-rest-products-controller.php:1693
14887
  #: includes/api/v1/class-wc-rest-products-controller.php:2051
14888
  msgid "Amount of reviews that the product have."
14889
  msgstr ""
14890
 
14891
- #: includes/api/class-wc-rest-products-controller.php:1699
14892
  #: includes/api/v1/class-wc-rest-products-controller.php:2057
14893
  msgid "List of related products IDs."
14894
  msgstr ""
14895
 
14896
- #: includes/api/class-wc-rest-products-controller.php:1708
14897
  #: includes/api/v1/class-wc-rest-products-controller.php:2066
14898
  msgid "List of up-sell products IDs."
14899
  msgstr ""
14900
 
14901
- #: includes/api/class-wc-rest-products-controller.php:1716
14902
  #: includes/api/v1/class-wc-rest-products-controller.php:2074
14903
  msgid "List of cross-sell products IDs."
14904
  msgstr ""
14905
 
14906
- #: includes/api/class-wc-rest-products-controller.php:1724
14907
  #: includes/api/v1/class-wc-rest-products-controller.php:2082
14908
  msgid "Product parent ID."
14909
  msgstr ""
14910
 
14911
- #: includes/api/class-wc-rest-products-controller.php:1729
14912
  #: includes/api/v1/class-wc-rest-products-controller.php:2087
14913
  msgid "Optional note to send the customer after purchase."
14914
  msgstr ""
14915
 
14916
- #: includes/api/class-wc-rest-products-controller.php:1734
14917
  #: includes/api/v1/class-wc-rest-products-controller.php:2092
14918
  msgid "List of categories."
14919
  msgstr ""
14920
 
14921
- #: includes/api/class-wc-rest-products-controller.php:1741
14922
  #: includes/api/v1/class-wc-rest-products-controller.php:2099
14923
  msgid "Category ID."
14924
  msgstr ""
14925
 
14926
- #: includes/api/class-wc-rest-products-controller.php:1752
14927
  #: includes/api/v1/class-wc-rest-products-controller.php:2110
14928
  msgid "Category slug."
14929
  msgstr ""
14930
 
14931
- #: includes/api/class-wc-rest-products-controller.php:1761
14932
  #: includes/api/v1/class-wc-rest-products-controller.php:2119
14933
  msgid "List of tags."
14934
  msgstr ""
14935
 
14936
- #: includes/api/class-wc-rest-products-controller.php:1768
14937
  #: includes/api/v1/class-wc-rest-products-controller.php:2126
14938
  msgid "Tag ID."
14939
  msgstr ""
14940
 
14941
- #: includes/api/class-wc-rest-products-controller.php:1773
14942
  #: includes/api/v1/class-wc-rest-product-tags-controller.php:100
14943
  #: includes/api/v1/class-wc-rest-products-controller.php:2131
14944
  msgid "Tag name."
14945
  msgstr ""
14946
 
14947
- #: includes/api/class-wc-rest-products-controller.php:1779
14948
  #: includes/api/v1/class-wc-rest-products-controller.php:2137
14949
  msgid "Tag slug."
14950
  msgstr ""
14951
 
14952
- #: includes/api/class-wc-rest-products-controller.php:1788
14953
  #: includes/api/v1/class-wc-rest-products-controller.php:2146
14954
  msgid "List of images."
14955
  msgstr ""
14956
 
14957
- #: includes/api/class-wc-rest-products-controller.php:1865
14958
  #: includes/api/v1/class-wc-rest-products-controller.php:2211
14959
  msgid "Attribute position."
14960
  msgstr ""
14961
 
14962
- #: includes/api/class-wc-rest-products-controller.php:1876
14963
  #: includes/api/v1/class-wc-rest-products-controller.php:2222
14964
  msgid "Define if the attribute can be used as variation."
14965
  msgstr ""
14966
 
14967
- #: includes/api/class-wc-rest-products-controller.php:1882
14968
  #: includes/api/v1/class-wc-rest-products-controller.php:2228
14969
  msgid "List of available term names of the attribute."
14970
  msgstr ""
14971
 
14972
- #: includes/api/class-wc-rest-products-controller.php:1890
14973
  #: includes/api/v1/class-wc-rest-products-controller.php:2236
14974
  msgid "Defaults variation attributes."
14975
  msgstr ""
14976
 
14977
- #: includes/api/class-wc-rest-products-controller.php:1915
14978
  msgid "List of variations IDs."
14979
  msgstr ""
14980
 
14981
- #: includes/api/class-wc-rest-products-controller.php:1924
14982
  #: includes/api/v1/class-wc-rest-products-controller.php:2554
14983
  msgid "List of grouped products ID."
14984
  msgstr ""
14985
 
14986
- #: includes/api/class-wc-rest-products-controller.php:1978
14987
  #: includes/api/v1/class-wc-rest-products-controller.php:2582
14988
  msgid "Limit result set to products with a specific slug."
14989
  msgstr ""
14990
 
14991
- #: includes/api/class-wc-rest-products-controller.php:1984
14992
  #: includes/api/v1/class-wc-rest-products-controller.php:2588
14993
  msgid "Limit result set to products assigned a specific status."
14994
  msgstr ""
14995
 
14996
- #: includes/api/class-wc-rest-products-controller.php:1991
14997
  #: includes/api/v1/class-wc-rest-products-controller.php:2595
14998
  msgid "Limit result set to products assigned a specific type."
14999
  msgstr ""
15000
 
15001
- #: includes/api/class-wc-rest-products-controller.php:1998
15002
  #: includes/api/v1/class-wc-rest-products-controller.php:2632
15003
  msgid "Limit result set to products with a specific SKU."
15004
  msgstr ""
15005
 
15006
- #: includes/api/class-wc-rest-products-controller.php:2004
15007
  msgid "Limit result set to featured products."
15008
  msgstr ""
15009
 
15010
- #: includes/api/class-wc-rest-products-controller.php:2010
15011
  #: includes/api/v1/class-wc-rest-products-controller.php:2602
15012
  msgid "Limit result set to products assigned a specific category ID."
15013
  msgstr ""
15014
 
15015
- #: includes/api/class-wc-rest-products-controller.php:2016
15016
  #: includes/api/v1/class-wc-rest-products-controller.php:2608
15017
  msgid "Limit result set to products assigned a specific tag ID."
15018
  msgstr ""
15019
 
15020
- #: includes/api/class-wc-rest-products-controller.php:2022
15021
  #: includes/api/v1/class-wc-rest-products-controller.php:2614
15022
  msgid "Limit result set to products assigned a specific shipping class ID."
15023
  msgstr ""
15024
 
15025
- #: includes/api/class-wc-rest-products-controller.php:2028
15026
  #: includes/api/v1/class-wc-rest-products-controller.php:2620
15027
  msgid "Limit result set to products with a specific attribute."
15028
  msgstr ""
15029
 
15030
- #: includes/api/class-wc-rest-products-controller.php:2034
15031
  #: includes/api/v1/class-wc-rest-products-controller.php:2626
15032
  msgid ""
15033
  "Limit result set to products with a specific attribute term ID (required an "
15034
  "assigned attribute)."
15035
  msgstr ""
15036
 
15037
- #: includes/api/class-wc-rest-products-controller.php:2042
15038
  msgid "Limit result set to products with a specific tax class."
15039
  msgstr ""
15040
 
15041
- #: includes/api/class-wc-rest-products-controller.php:2051
15042
  msgid "Limit result set to products in stock or out of stock."
15043
  msgstr ""
15044
 
15045
- #: includes/api/class-wc-rest-products-controller.php:2057
15046
  msgid "Limit result set to products on sale."
15047
  msgstr ""
15048
 
15049
- #: includes/api/class-wc-rest-products-controller.php:2063
15050
  msgid "Limit result set to products based on a minimum price."
15051
  msgstr ""
15052
 
15053
- #: includes/api/class-wc-rest-products-controller.php:2069
15054
  msgid "Limit result set to products based on a maximum price."
15055
  msgstr ""
15056
 
@@ -15917,46 +15921,46 @@ msgstr ""
15917
  msgid "You do not have permission to delete this %s"
15918
  msgstr ""
15919
 
15920
- #: includes/api/legacy/v1/class-wc-api-resource.php:303
15921
- #: includes/api/legacy/v2/class-wc-api-resource.php:374
15922
- #: includes/api/legacy/v3/class-wc-api-resource.php:376
15923
  msgid "Permanently deleted customer"
15924
  msgstr ""
15925
 
15926
- #: includes/api/legacy/v1/class-wc-api-resource.php:305
15927
- #: includes/api/legacy/v2/class-wc-api-resource.php:376
15928
- #: includes/api/legacy/v3/class-wc-api-resource.php:378
15929
  msgid "The customer cannot be deleted"
15930
  msgstr ""
15931
 
15932
- #: includes/api/legacy/v1/class-wc-api-resource.php:313
15933
  #: includes/api/legacy/v2/class-wc-api-products.php:442
15934
- #: includes/api/legacy/v2/class-wc-api-resource.php:384
15935
  #: includes/api/legacy/v3/class-wc-api-products.php:501
15936
  #: includes/api/legacy/v3/class-wc-api-products.php:3020
15937
- #: includes/api/legacy/v3/class-wc-api-resource.php:386
15938
  msgid "This %s cannot be deleted"
15939
  msgstr ""
15940
 
15941
- #: includes/api/legacy/v1/class-wc-api-resource.php:316
15942
  #: includes/api/legacy/v2/class-wc-api-products.php:451
15943
- #: includes/api/legacy/v2/class-wc-api-resource.php:388
15944
  #: includes/api/legacy/v3/class-wc-api-products.php:510
15945
- #: includes/api/legacy/v3/class-wc-api-resource.php:389
15946
  msgid "Permanently deleted %s"
15947
  msgstr ""
15948
 
15949
- #: includes/api/legacy/v1/class-wc-api-resource.php:322
15950
  #: includes/api/legacy/v2/class-wc-api-products.php:455
15951
  #: includes/api/legacy/v2/class-wc-api-products.php:2197
15952
- #: includes/api/legacy/v2/class-wc-api-resource.php:392
15953
  #: includes/api/legacy/v3/class-wc-api-products.php:514
15954
  #: includes/api/legacy/v3/class-wc-api-products.php:854
15955
  #: includes/api/legacy/v3/class-wc-api-products.php:1042
15956
  #: includes/api/legacy/v3/class-wc-api-products.php:2759
15957
  #: includes/api/legacy/v3/class-wc-api-products.php:3027
15958
  #: includes/api/legacy/v3/class-wc-api-products.php:3334
15959
- #: includes/api/legacy/v3/class-wc-api-resource.php:395
15960
  #: includes/api/legacy/v3/class-wc-api-taxes.php:354
15961
  #: includes/api/legacy/v3/class-wc-api-taxes.php:665
15962
  msgid "Deleted %s"
@@ -17972,7 +17976,7 @@ msgid "Backordered"
17972
  msgstr ""
17973
 
17974
  #: includes/class-wc-order-refund.php:64
17975
- #: includes/data-stores/class-wc-order-refund-data-store-cpt.php:101
17976
  #. translators: %s: Order date
17977
  msgid "Refund &ndash; %s"
17978
  msgstr ""
@@ -18536,7 +18540,7 @@ msgstr ""
18536
  msgid "%1$d updates complete. Database version is %2$s"
18537
  msgstr ""
18538
 
18539
- #: includes/data-stores/abstract-wc-order-data-store-cpt.php:200
18540
  #. translators: %s: Order date
18541
  msgid "Order &ndash; %s"
18542
  msgstr ""
@@ -22602,8 +22606,8 @@ msgid "my-account"
22602
  msgstr ""
22603
 
22604
  #: includes/class-wc-order-refund.php:64
22605
- #: includes/data-stores/abstract-wc-order-data-store-cpt.php:200
22606
- #: includes/data-stores/class-wc-order-refund-data-store-cpt.php:101
22607
  msgctxt "Order date parsed by strftime"
22608
  msgid "%b %d, %Y @ %I:%M %p"
22609
  msgstr ""
2
  # This file is distributed under the same license as the WooCommerce package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WooCommerce 3.0.8\n"
6
  "Report-Msgid-Bugs-To: https://github.com/woocommerce/woocommerce/issues\n"
7
+ "POT-Creation-Date: 2017-06-06 21:23:44+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
5312
  #: includes/abstracts/abstract-wc-rest-crud-controller.php:385
5313
  #: includes/abstracts/abstract-wc-rest-posts-controller.php:148
5314
  #: includes/api/class-wc-rest-product-variations-controller.php:462
5315
+ #: includes/api/class-wc-rest-products-controller.php:1262
5316
  msgid "Invalid ID."
5317
  msgstr ""
5318
 
5331
  #: includes/abstracts/abstract-wc-rest-crud-controller.php:402
5332
  #: includes/abstracts/abstract-wc-rest-posts-controller.php:433
5333
  #: includes/api/class-wc-rest-product-variations-controller.php:479
5334
+ #: includes/api/class-wc-rest-products-controller.php:1283
5335
  #: includes/api/v1/class-wc-rest-products-controller.php:1658
5336
  #. translators: %s: post type
5337
  msgid "Sorry, you are not allowed to delete %s."
5340
  #: includes/abstracts/abstract-wc-rest-crud-controller.php:416
5341
  #: includes/abstracts/abstract-wc-rest-posts-controller.php:446
5342
  #: includes/api/class-wc-rest-product-variations-controller.php:493
5343
+ #: includes/api/class-wc-rest-products-controller.php:1310
5344
  #: includes/api/v1/class-wc-rest-products-controller.php:1685
5345
  #. translators: %s: post type
5346
  msgid "The %s does not support trashing."
5349
  #: includes/abstracts/abstract-wc-rest-crud-controller.php:423
5350
  #: includes/abstracts/abstract-wc-rest-posts-controller.php:452
5351
  #: includes/api/class-wc-rest-product-variations-controller.php:500
5352
+ #: includes/api/class-wc-rest-products-controller.php:1317
5353
  #: includes/api/v1/class-wc-rest-products-controller.php:1691
5354
  #. translators: %s: post type
5355
  msgid "The %s has already been deleted."
5358
  #: includes/abstracts/abstract-wc-rest-crud-controller.php:433
5359
  #: includes/abstracts/abstract-wc-rest-posts-controller.php:462
5360
  #: includes/api/class-wc-rest-product-variations-controller.php:510
5361
+ #: includes/api/class-wc-rest-products-controller.php:1327
5362
  #: includes/api/v1/class-wc-rest-order-notes-controller.php:313
5363
  #: includes/api/v1/class-wc-rest-products-controller.php:1702
5364
  #: includes/api/v1/class-wc-rest-webhooks-controller.php:342
5483
  #: includes/abstracts/abstract-wc-rest-posts-controller.php:146
5484
  #: includes/abstracts/abstract-wc-rest-posts-controller.php:253
5485
  #: includes/api/class-wc-rest-products-controller.php:675
5486
+ #: includes/api/class-wc-rest-products-controller.php:1266
5487
  #: includes/api/v1/class-wc-rest-products-controller.php:1639
5488
  msgid ""
5489
  "To manipulate product variations you should use the "
5547
  #: includes/api/class-wc-rest-product-reviews-controller.php:155
5548
  #: includes/api/class-wc-rest-product-variations-controller.php:597
5549
  #: includes/api/class-wc-rest-products-controller.php:83
5550
+ #: includes/api/class-wc-rest-products-controller.php:1361
5551
  #: includes/api/class-wc-rest-setting-options-controller.php:81
5552
  #: includes/api/class-wc-rest-shipping-methods-controller.php:53
5553
  #: includes/api/class-wc-rest-shipping-zones-controller.php:275
6315
  msgstr[0] ""
6316
  msgstr[1] ""
6317
 
6318
+ #: includes/admin/class-wc-admin-dashboard.php:273
6319
  #: templates/single-product/review-rating.php:31
6320
  #. translators: %s: rating
6321
  msgid "%s out of 5"
6322
  msgstr ""
6323
 
6324
+ #: includes/admin/class-wc-admin-dashboard.php:276
6325
  #. translators: %s: review author
6326
  msgid "reviewed by %s"
6327
  msgstr ""
6328
 
6329
+ #: includes/admin/class-wc-admin-dashboard.php:282
6330
  msgid "There are no product reviews yet."
6331
  msgstr ""
6332
 
9500
 
9501
  #: includes/admin/meta-boxes/views/html-product-data-inventory.php:65
9502
  #: includes/admin/meta-boxes/views/html-variation-admin.php:207
9503
+ #: includes/api/class-wc-rest-products-controller.php:1594
9504
  #: includes/api/v1/class-wc-rest-products-controller.php:1954
9505
  msgid ""
9506
  "Controls whether or not the product is listed as \"in stock\" or \"out of "
13049
  msgid "Custom:"
13050
  msgstr ""
13051
 
13052
+ #: includes/api/class-wc-rest-authentication.php:164
13053
  #: includes/api/legacy/v1/class-wc-api-authentication.php:115
13054
  #: includes/api/legacy/v2/class-wc-api-authentication.php:115
13055
  #: includes/api/legacy/v3/class-wc-api-authentication.php:83
13056
  msgid "Consumer secret is invalid."
13057
  msgstr ""
13058
 
13059
+ #: includes/api/class-wc-rest-authentication.php:281
13060
  msgid "Missing OAuth parameter %s"
13061
  msgid_plural "Missing OAuth parameters %s"
13062
  msgstr[0] ""
13063
  msgstr[1] ""
13064
 
13065
+ #: includes/api/class-wc-rest-authentication.php:321
13066
  #: includes/api/legacy/v1/class-wc-api-authentication.php:184
13067
  #: includes/api/legacy/v2/class-wc-api-authentication.php:183
13068
  #: includes/api/legacy/v3/class-wc-api-authentication.php:179
13069
  msgid "Consumer key is invalid."
13070
  msgstr ""
13071
 
13072
+ #: includes/api/class-wc-rest-authentication.php:365
13073
  #: includes/api/legacy/v1/class-wc-api-authentication.php:252
13074
  #: includes/api/legacy/v2/class-wc-api-authentication.php:251
13075
  #: includes/api/legacy/v3/class-wc-api-authentication.php:241
13076
  msgid "Invalid signature - failed to sort parameters."
13077
  msgstr ""
13078
 
13079
+ #: includes/api/class-wc-rest-authentication.php:374
13080
  #: includes/api/legacy/v1/class-wc-api-authentication.php:266
13081
  #: includes/api/legacy/v2/class-wc-api-authentication.php:265
13082
  #: includes/api/legacy/v3/class-wc-api-authentication.php:261
13083
  msgid "Invalid signature - signature method is invalid."
13084
  msgstr ""
13085
 
13086
+ #: includes/api/class-wc-rest-authentication.php:382
13087
  #: includes/api/legacy/v1/class-wc-api-authentication.php:274
13088
  #: includes/api/legacy/v2/class-wc-api-authentication.php:273
13089
  #: includes/api/legacy/v3/class-wc-api-authentication.php:270
13090
  msgid "Invalid signature - provided signature does not match."
13091
  msgstr ""
13092
 
13093
+ #: includes/api/class-wc-rest-authentication.php:458
13094
  #: includes/api/legacy/v1/class-wc-api-authentication.php:332
13095
  #: includes/api/legacy/v2/class-wc-api-authentication.php:331
13096
  #: includes/api/legacy/v3/class-wc-api-authentication.php:335
13097
  msgid "Invalid timestamp."
13098
  msgstr ""
13099
 
13100
+ #: includes/api/class-wc-rest-authentication.php:468
13101
  #: includes/api/legacy/v1/class-wc-api-authentication.php:342
13102
  #: includes/api/legacy/v2/class-wc-api-authentication.php:341
13103
  #: includes/api/legacy/v3/class-wc-api-authentication.php:345
13104
  msgid "Invalid nonce - nonce has already been used."
13105
  msgstr ""
13106
 
13107
+ #: includes/api/class-wc-rest-authentication.php:525
13108
  #: includes/api/legacy/v1/class-wc-api-authentication.php:377
13109
  #: includes/api/legacy/v2/class-wc-api-authentication.php:376
13110
  #: includes/api/legacy/v3/class-wc-api-authentication.php:380
13111
  msgid "The API key provided does not have read permissions."
13112
  msgstr ""
13113
 
13114
+ #: includes/api/class-wc-rest-authentication.php:533
13115
  #: includes/api/legacy/v1/class-wc-api-authentication.php:386
13116
  #: includes/api/legacy/v2/class-wc-api-authentication.php:385
13117
  #: includes/api/legacy/v3/class-wc-api-authentication.php:389
13118
  msgid "The API key provided does not have write permissions."
13119
  msgstr ""
13120
 
13121
+ #: includes/api/class-wc-rest-authentication.php:538
13122
+ msgid "Unknown request method."
13123
+ msgstr ""
13124
+
13125
+ #: includes/api/class-wc-rest-authentication.php:569
13126
  #: includes/api/legacy/v3/class-wc-api-authentication.php:111
13127
  msgid ""
13128
  "WooCommerce API. Use a consumer key in the username field and a consumer "
13305
  #: includes/api/class-wc-rest-orders-controller.php:1484
13306
  #: includes/api/class-wc-rest-orders-controller.php:1542
13307
  #: includes/api/class-wc-rest-product-variations-controller.php:913
13308
+ #: includes/api/class-wc-rest-products-controller.php:1936
13309
  msgid "Meta data."
13310
  msgstr ""
13311
 
13320
  #: includes/api/class-wc-rest-orders-controller.php:1491
13321
  #: includes/api/class-wc-rest-orders-controller.php:1549
13322
  #: includes/api/class-wc-rest-product-variations-controller.php:920
13323
+ #: includes/api/class-wc-rest-products-controller.php:1943
13324
  msgid "Meta ID."
13325
  msgstr ""
13326
 
13335
  #: includes/api/class-wc-rest-orders-controller.php:1497
13336
  #: includes/api/class-wc-rest-orders-controller.php:1555
13337
  #: includes/api/class-wc-rest-product-variations-controller.php:926
13338
+ #: includes/api/class-wc-rest-products-controller.php:1949
13339
  #: includes/api/v1/class-wc-rest-order-refunds-controller.php:477
13340
  #: includes/api/v1/class-wc-rest-orders-controller.php:1302
13341
  msgid "Meta key."
13352
  #: includes/api/class-wc-rest-orders-controller.php:1502
13353
  #: includes/api/class-wc-rest-orders-controller.php:1560
13354
  #: includes/api/class-wc-rest-product-variations-controller.php:931
13355
+ #: includes/api/class-wc-rest-products-controller.php:1954
13356
  #: includes/api/v1/class-wc-rest-order-refunds-controller.php:489
13357
  #: includes/api/v1/class-wc-rest-orders-controller.php:1314
13358
  msgid "Meta value."
13381
  #: includes/api/class-wc-rest-customer-downloads-controller.php:103
13382
  #: includes/api/class-wc-rest-order-refunds-controller.php:414
13383
  #: includes/api/class-wc-rest-orders-controller.php:1136
13384
+ #: includes/api/class-wc-rest-products-controller.php:1367
13385
  #: includes/api/v1/class-wc-rest-order-refunds-controller.php:381
13386
  #: includes/api/v1/class-wc-rest-orders-controller.php:1206
13387
  #: includes/api/v1/class-wc-rest-products-controller.php:1742
13428
 
13429
  #: includes/api/class-wc-rest-customer-downloads-controller.php:151
13430
  #: includes/api/class-wc-rest-product-variations-controller.php:711
13431
+ #: includes/api/class-wc-rest-products-controller.php:1535
13432
  #: includes/api/v1/class-wc-rest-customer-downloads-controller.php:223
13433
  #: includes/api/v1/class-wc-rest-products-controller.php:1888
13434
  #: includes/api/v1/class-wc-rest-products-controller.php:2366
13437
 
13438
  #: includes/api/class-wc-rest-customer-downloads-controller.php:157
13439
  #: includes/api/class-wc-rest-product-variations-controller.php:716
13440
+ #: includes/api/class-wc-rest-products-controller.php:1540
13441
  #: includes/api/v1/class-wc-rest-customer-downloads-controller.php:229
13442
  #: includes/api/v1/class-wc-rest-products-controller.php:1893
13443
  #: includes/api/v1/class-wc-rest-products-controller.php:2371
14263
  msgstr ""
14264
 
14265
  #: includes/api/class-wc-rest-product-categories-controller.php:112
14266
+ #: includes/api/class-wc-rest-products-controller.php:1744
14267
  #: includes/api/v1/class-wc-rest-product-categories-controller.php:176
14268
  #: includes/api/v1/class-wc-rest-products-controller.php:2104
14269
  msgid "Category name."
14303
 
14304
  #: includes/api/class-wc-rest-product-categories-controller.php:153
14305
  #: includes/api/class-wc-rest-product-variations-controller.php:831
14306
+ #: includes/api/class-wc-rest-products-controller.php:1793
14307
  #: includes/api/v1/class-wc-rest-product-categories-controller.php:217
14308
  #: includes/api/v1/class-wc-rest-products-controller.php:2153
14309
  #: includes/api/v1/class-wc-rest-products-controller.php:2486
14312
 
14313
  #: includes/api/class-wc-rest-product-categories-controller.php:158
14314
  #: includes/api/class-wc-rest-product-variations-controller.php:836
14315
+ #: includes/api/class-wc-rest-products-controller.php:1798
14316
  #: includes/api/v1/class-wc-rest-product-categories-controller.php:222
14317
  #: includes/api/v1/class-wc-rest-products-controller.php:2158
14318
  #: includes/api/v1/class-wc-rest-products-controller.php:2491
14321
 
14322
  #: includes/api/class-wc-rest-product-categories-controller.php:164
14323
  #: includes/api/class-wc-rest-product-variations-controller.php:842
14324
+ #: includes/api/class-wc-rest-products-controller.php:1804
14325
  msgid "The date the image was created, as GMT."
14326
  msgstr ""
14327
 
14328
  #: includes/api/class-wc-rest-product-categories-controller.php:170
14329
  #: includes/api/class-wc-rest-product-variations-controller.php:848
14330
+ #: includes/api/class-wc-rest-products-controller.php:1810
14331
  #: includes/api/v1/class-wc-rest-product-categories-controller.php:228
14332
  #: includes/api/v1/class-wc-rest-products-controller.php:2164
14333
  #: includes/api/v1/class-wc-rest-products-controller.php:2497
14336
 
14337
  #: includes/api/class-wc-rest-product-categories-controller.php:176
14338
  #: includes/api/class-wc-rest-product-variations-controller.php:854
14339
+ #: includes/api/class-wc-rest-products-controller.php:1816
14340
  msgid "The date the image was last modified, as GMT."
14341
  msgstr ""
14342
 
14343
  #: includes/api/class-wc-rest-product-categories-controller.php:182
14344
  #: includes/api/class-wc-rest-product-variations-controller.php:860
14345
+ #: includes/api/class-wc-rest-products-controller.php:1822
14346
  #: includes/api/v1/class-wc-rest-product-categories-controller.php:234
14347
  #: includes/api/v1/class-wc-rest-products-controller.php:2170
14348
  #: includes/api/v1/class-wc-rest-products-controller.php:2503
14351
 
14352
  #: includes/api/class-wc-rest-product-categories-controller.php:188
14353
  #: includes/api/class-wc-rest-product-variations-controller.php:866
14354
+ #: includes/api/class-wc-rest-products-controller.php:1828
14355
  #: includes/api/v1/class-wc-rest-product-categories-controller.php:240
14356
  #: includes/api/v1/class-wc-rest-products-controller.php:2176
14357
  #: includes/api/v1/class-wc-rest-products-controller.php:2509
14360
 
14361
  #: includes/api/class-wc-rest-product-categories-controller.php:193
14362
  #: includes/api/class-wc-rest-product-variations-controller.php:871
14363
+ #: includes/api/class-wc-rest-products-controller.php:1833
14364
  #: includes/api/v1/class-wc-rest-product-categories-controller.php:245
14365
  #: includes/api/v1/class-wc-rest-products-controller.php:2181
14366
  #: includes/api/v1/class-wc-rest-products-controller.php:2514
14449
  msgstr ""
14450
 
14451
  #: includes/api/class-wc-rest-product-variations-controller.php:627
14452
+ #: includes/api/class-wc-rest-products-controller.php:1445
14453
  #: includes/api/v1/class-wc-rest-products-controller.php:1808
14454
  #: includes/api/v1/class-wc-rest-products-controller.php:2293
14455
  msgid "Unique identifier."
14471
  msgstr ""
14472
 
14473
  #: includes/api/class-wc-rest-product-variations-controller.php:648
14474
+ #: includes/api/class-wc-rest-products-controller.php:1466
14475
  msgid "Start date of sale price, in the site's timezone."
14476
  msgstr ""
14477
 
14478
  #: includes/api/class-wc-rest-product-variations-controller.php:653
14479
+ #: includes/api/class-wc-rest-products-controller.php:1471
14480
  msgid "Start date of sale price, as GMT."
14481
  msgstr ""
14482
 
14483
  #: includes/api/class-wc-rest-product-variations-controller.php:658
14484
  #: includes/api/class-wc-rest-product-variations-controller.php:663
14485
+ #: includes/api/class-wc-rest-products-controller.php:1476
14486
+ #: includes/api/class-wc-rest-products-controller.php:1481
14487
  msgid "End date of sale price, in the site's timezone."
14488
  msgstr ""
14489
 
14493
  msgstr ""
14494
 
14495
  #: includes/api/class-wc-rest-product-variations-controller.php:674
14496
+ #: includes/api/class-wc-rest-products-controller.php:1868
14497
  #: includes/api/v1/class-wc-rest-products-controller.php:2216
14498
  msgid ""
14499
  "Define if the attribute is visible on the \"Additional information\" tab in "
14516
  msgstr ""
14517
 
14518
  #: includes/api/class-wc-rest-product-variations-controller.php:698
14519
+ #: includes/api/class-wc-rest-products-controller.php:1522
14520
  #: includes/api/v1/class-wc-rest-products-controller.php:1875
14521
  #: includes/api/v1/class-wc-rest-products-controller.php:2353
14522
  msgid "List of downloadable files."
14523
  msgstr ""
14524
 
14525
  #: includes/api/class-wc-rest-product-variations-controller.php:705
14526
+ #: includes/api/class-wc-rest-products-controller.php:1529
14527
  #: includes/api/v1/class-wc-rest-products-controller.php:1882
14528
  #: includes/api/v1/class-wc-rest-products-controller.php:2360
14529
  msgid "File MD5 hash."
14530
  msgstr ""
14531
 
14532
  #: includes/api/class-wc-rest-product-variations-controller.php:724
14533
+ #: includes/api/class-wc-rest-products-controller.php:1548
14534
  #: includes/api/v1/class-wc-rest-products-controller.php:1901
14535
  #: includes/api/v1/class-wc-rest-products-controller.php:2379
14536
  msgid "Number of times downloadable files can be downloaded after purchase."
14537
  msgstr ""
14538
 
14539
  #: includes/api/class-wc-rest-product-variations-controller.php:730
14540
+ #: includes/api/class-wc-rest-products-controller.php:1554
14541
  #: includes/api/v1/class-wc-rest-products-controller.php:1907
14542
  #: includes/api/v1/class-wc-rest-products-controller.php:2385
14543
  msgid "Number of days until access to downloadable files expires."
14544
  msgstr ""
14545
 
14546
  #: includes/api/class-wc-rest-product-variations-controller.php:736
14547
+ #: includes/api/class-wc-rest-products-controller.php:1571
14548
  #: includes/api/v1/class-wc-rest-products-controller.php:1931
14549
  #: includes/api/v1/class-wc-rest-products-controller.php:2391
14550
  msgid "Tax status."
14551
  msgstr ""
14552
 
14553
  #: includes/api/class-wc-rest-product-variations-controller.php:743
14554
+ #: includes/api/class-wc-rest-products-controller.php:1578
14555
  #: includes/api/v1/class-wc-rest-products-controller.php:1938
14556
  #: includes/api/v1/class-wc-rest-products-controller.php:2398
14557
  #: includes/api/v1/class-wc-rest-taxes-controller.php:631
14564
  msgstr ""
14565
 
14566
  #: includes/api/class-wc-rest-product-variations-controller.php:754
14567
+ #: includes/api/class-wc-rest-products-controller.php:1589
14568
  #: includes/api/v1/class-wc-rest-products-controller.php:1949
14569
  #: includes/api/v1/class-wc-rest-products-controller.php:2409
14570
  msgid "Stock quantity."
14578
  msgstr ""
14579
 
14580
  #: includes/api/class-wc-rest-product-variations-controller.php:765
14581
+ #: includes/api/class-wc-rest-products-controller.php:1600
14582
  #: includes/api/v1/class-wc-rest-products-controller.php:1960
14583
  #: includes/api/v1/class-wc-rest-products-controller.php:2420
14584
  msgid "If managing stock, this controls if backorders are allowed."
14585
  msgstr ""
14586
 
14587
  #: includes/api/class-wc-rest-product-variations-controller.php:772
14588
+ #: includes/api/class-wc-rest-products-controller.php:1607
14589
  #: includes/api/v1/class-wc-rest-products-controller.php:1967
14590
  #: includes/api/v1/class-wc-rest-products-controller.php:2427
14591
  msgid "Shows if backorders are allowed."
14626
  msgstr ""
14627
 
14628
  #: includes/api/class-wc-rest-product-variations-controller.php:815
14629
+ #: includes/api/class-wc-rest-products-controller.php:1668
14630
  #: includes/api/v1/class-wc-rest-products-controller.php:2028
14631
  #: includes/api/v1/class-wc-rest-products-controller.php:2470
14632
  msgid "Shipping class slug."
14633
  msgstr ""
14634
 
14635
  #: includes/api/class-wc-rest-product-variations-controller.php:820
14636
+ #: includes/api/class-wc-rest-products-controller.php:1673
14637
  #: includes/api/v1/class-wc-rest-products-controller.php:2033
14638
  #: includes/api/v1/class-wc-rest-products-controller.php:2475
14639
  msgid "Shipping class ID."
14645
  msgstr ""
14646
 
14647
  #: includes/api/class-wc-rest-product-variations-controller.php:876
14648
+ #: includes/api/class-wc-rest-products-controller.php:1838
14649
  #: includes/api/v1/class-wc-rest-products-controller.php:2186
14650
  #: includes/api/v1/class-wc-rest-products-controller.php:2519
14651
  msgid "Image position. 0 means that the image is featured."
14652
  msgstr ""
14653
 
14654
  #: includes/api/class-wc-rest-product-variations-controller.php:883
14655
+ #: includes/api/class-wc-rest-products-controller.php:1846
14656
  #: includes/api/v1/class-wc-rest-products-controller.php:2194
14657
  #: includes/api/v1/class-wc-rest-products-controller.php:2526
14658
  msgid "List of attributes."
14659
  msgstr ""
14660
 
14661
  #: includes/api/class-wc-rest-product-variations-controller.php:890
14662
+ #: includes/api/class-wc-rest-products-controller.php:1853
14663
+ #: includes/api/class-wc-rest-products-controller.php:1895
14664
  #: includes/api/v1/class-wc-rest-products-controller.php:2201
14665
  #: includes/api/v1/class-wc-rest-products-controller.php:2243
14666
  #: includes/api/v1/class-wc-rest-products-controller.php:2533
14669
  msgstr ""
14670
 
14671
  #: includes/api/class-wc-rest-product-variations-controller.php:895
14672
+ #: includes/api/class-wc-rest-products-controller.php:1858
14673
+ #: includes/api/class-wc-rest-products-controller.php:1900
14674
  #: includes/api/v1/class-wc-rest-product-attributes-controller.php:542
14675
  #: includes/api/v1/class-wc-rest-products-controller.php:2206
14676
  #: includes/api/v1/class-wc-rest-products-controller.php:2248
14679
  msgstr ""
14680
 
14681
  #: includes/api/class-wc-rest-product-variations-controller.php:900
14682
+ #: includes/api/class-wc-rest-products-controller.php:1905
14683
  #: includes/api/v1/class-wc-rest-products-controller.php:2253
14684
  #: includes/api/v1/class-wc-rest-products-controller.php:2543
14685
  msgid "Selected attribute term name."
14686
  msgstr ""
14687
 
14688
  #: includes/api/class-wc-rest-product-variations-controller.php:908
14689
+ #: includes/api/class-wc-rest-products-controller.php:1931
14690
  #: includes/api/v1/class-wc-rest-products-controller.php:2563
14691
  msgid "Menu order, used to custom sort products."
14692
  msgstr ""
14710
  msgid "#%s is an invalid image ID."
14711
  msgstr ""
14712
 
14713
+ #: includes/api/class-wc-rest-products-controller.php:1372
14714
  #: includes/api/v1/class-wc-rest-products-controller.php:1747
14715
  msgid "Product slug."
14716
  msgstr ""
14717
 
14718
+ #: includes/api/class-wc-rest-products-controller.php:1377
14719
  #: includes/api/v1/class-wc-rest-products-controller.php:1752
14720
  msgid "Product URL."
14721
  msgstr ""
14722
 
14723
+ #: includes/api/class-wc-rest-products-controller.php:1384
14724
  #: includes/api/v1/class-wc-rest-products-controller.php:1759
14725
  msgid "The date the product was created, in the site's timezone."
14726
  msgstr ""
14727
 
14728
+ #: includes/api/class-wc-rest-products-controller.php:1390
14729
  msgid "The date the product was created, as GMT."
14730
  msgstr ""
14731
 
14732
+ #: includes/api/class-wc-rest-products-controller.php:1396
14733
  #: includes/api/v1/class-wc-rest-products-controller.php:1765
14734
  msgid "The date the product was last modified, in the site's timezone."
14735
  msgstr ""
14736
 
14737
+ #: includes/api/class-wc-rest-products-controller.php:1402
14738
  msgid "The date the product was last modified, as GMT."
14739
  msgstr ""
14740
 
14741
+ #: includes/api/class-wc-rest-products-controller.php:1408
14742
  #: includes/api/v1/class-wc-rest-products-controller.php:1771
14743
  msgid "Product type."
14744
  msgstr ""
14745
 
14746
+ #: includes/api/class-wc-rest-products-controller.php:1415
14747
  #: includes/api/v1/class-wc-rest-products-controller.php:1778
14748
  msgid "Product status (post status)."
14749
  msgstr ""
14750
 
14751
+ #: includes/api/class-wc-rest-products-controller.php:1422
14752
  #: includes/api/v1/class-wc-rest-products-controller.php:1785
14753
  msgid "Featured product."
14754
  msgstr ""
14755
 
14756
+ #: includes/api/class-wc-rest-products-controller.php:1428
14757
  #: includes/api/v1/class-wc-rest-products-controller.php:1791
14758
  msgid "Catalog visibility."
14759
  msgstr ""
14760
 
14761
+ #: includes/api/class-wc-rest-products-controller.php:1435
14762
  #: includes/api/v1/class-wc-rest-products-controller.php:1798
14763
  msgid "Product description."
14764
  msgstr ""
14765
 
14766
+ #: includes/api/class-wc-rest-products-controller.php:1440
14767
  #: includes/api/v1/class-wc-rest-products-controller.php:1803
14768
  msgid "Product short description."
14769
  msgstr ""
14770
 
14771
+ #: includes/api/class-wc-rest-products-controller.php:1450
14772
  #: includes/api/v1/class-wc-rest-products-controller.php:1813
14773
  msgid "Current product price."
14774
  msgstr ""
14775
 
14776
+ #: includes/api/class-wc-rest-products-controller.php:1456
14777
  #: includes/api/v1/class-wc-rest-products-controller.php:1819
14778
  msgid "Product regular price."
14779
  msgstr ""
14780
 
14781
+ #: includes/api/class-wc-rest-products-controller.php:1461
14782
  #: includes/api/v1/class-wc-rest-products-controller.php:1824
14783
  msgid "Product sale price."
14784
  msgstr ""
14785
 
14786
+ #: includes/api/class-wc-rest-products-controller.php:1486
14787
  #: includes/api/v1/class-wc-rest-products-controller.php:1839
14788
  msgid "Price formatted in HTML."
14789
  msgstr ""
14790
 
14791
+ #: includes/api/class-wc-rest-products-controller.php:1492
14792
  #: includes/api/v1/class-wc-rest-products-controller.php:1845
14793
  msgid "Shows if the product is on sale."
14794
  msgstr ""
14795
 
14796
+ #: includes/api/class-wc-rest-products-controller.php:1498
14797
  #: includes/api/v1/class-wc-rest-products-controller.php:1851
14798
  msgid "Shows if the product can be bought."
14799
  msgstr ""
14800
 
14801
+ #: includes/api/class-wc-rest-products-controller.php:1504
14802
  #: includes/api/v1/class-wc-rest-products-controller.php:1857
14803
  msgid "Amount of sales."
14804
  msgstr ""
14805
 
14806
+ #: includes/api/class-wc-rest-products-controller.php:1510
14807
  #: includes/api/v1/class-wc-rest-products-controller.php:1863
14808
  msgid "If the product is virtual."
14809
  msgstr ""
14810
 
14811
+ #: includes/api/class-wc-rest-products-controller.php:1516
14812
  #: includes/api/v1/class-wc-rest-products-controller.php:1869
14813
  msgid "If the product is downloadable."
14814
  msgstr ""
14815
 
14816
+ #: includes/api/class-wc-rest-products-controller.php:1560
14817
  #: includes/api/v1/class-wc-rest-products-controller.php:1920
14818
  msgid "Product external URL. Only for external products."
14819
  msgstr ""
14820
 
14821
+ #: includes/api/class-wc-rest-products-controller.php:1566
14822
  #: includes/api/v1/class-wc-rest-products-controller.php:1926
14823
  msgid "Product external button text. Only for external products."
14824
  msgstr ""
14825
 
14826
+ #: includes/api/class-wc-rest-products-controller.php:1583
14827
  #: includes/api/v1/class-wc-rest-products-controller.php:1943
14828
  msgid "Stock management at product level."
14829
  msgstr ""
14830
 
14831
+ #: includes/api/class-wc-rest-products-controller.php:1613
14832
  #: includes/api/v1/class-wc-rest-products-controller.php:1973
14833
  msgid "Shows if the product is on backordered."
14834
  msgstr ""
14835
 
14836
+ #: includes/api/class-wc-rest-products-controller.php:1619
14837
  #: includes/api/v1/class-wc-rest-products-controller.php:1979
14838
  msgid "Allow one item to be bought in a single order."
14839
  msgstr ""
14840
 
14841
+ #: includes/api/class-wc-rest-products-controller.php:1626
14842
  #: includes/api/v1/class-wc-rest-products-controller.php:1986
14843
  #. translators: %s: weight unit
14844
  msgid "Product weight (%s)."
14845
  msgstr ""
14846
 
14847
+ #: includes/api/class-wc-rest-products-controller.php:1631
14848
  #: includes/api/v1/class-wc-rest-products-controller.php:1991
14849
  msgid "Product dimensions."
14850
  msgstr ""
14851
 
14852
+ #: includes/api/class-wc-rest-products-controller.php:1637
14853
  #: includes/api/v1/class-wc-rest-products-controller.php:1997
14854
  #. translators: %s: dimension unit
14855
  msgid "Product length (%s)."
14856
  msgstr ""
14857
 
14858
+ #: includes/api/class-wc-rest-products-controller.php:1643
14859
  #: includes/api/v1/class-wc-rest-products-controller.php:2003
14860
  #. translators: %s: dimension unit
14861
  msgid "Product width (%s)."
14862
  msgstr ""
14863
 
14864
+ #: includes/api/class-wc-rest-products-controller.php:1649
14865
  #: includes/api/v1/class-wc-rest-products-controller.php:2009
14866
  #. translators: %s: dimension unit
14867
  msgid "Product height (%s)."
14868
  msgstr ""
14869
 
14870
+ #: includes/api/class-wc-rest-products-controller.php:1656
14871
  #: includes/api/v1/class-wc-rest-products-controller.php:2016
14872
  msgid "Shows if the product need to be shipped."
14873
  msgstr ""
14874
 
14875
+ #: includes/api/class-wc-rest-products-controller.php:1662
14876
  #: includes/api/v1/class-wc-rest-products-controller.php:2022
14877
  msgid "Shows whether or not the product shipping is taxable."
14878
  msgstr ""
14879
 
14880
+ #: includes/api/class-wc-rest-products-controller.php:1679
14881
  #: includes/api/v1/class-wc-rest-products-controller.php:2039
14882
  msgid "Allow reviews."
14883
  msgstr ""
14884
 
14885
+ #: includes/api/class-wc-rest-products-controller.php:1685
14886
  #: includes/api/v1/class-wc-rest-products-controller.php:2045
14887
  msgid "Reviews average rating."
14888
  msgstr ""
14889
 
14890
+ #: includes/api/class-wc-rest-products-controller.php:1691
14891
  #: includes/api/v1/class-wc-rest-products-controller.php:2051
14892
  msgid "Amount of reviews that the product have."
14893
  msgstr ""
14894
 
14895
+ #: includes/api/class-wc-rest-products-controller.php:1697
14896
  #: includes/api/v1/class-wc-rest-products-controller.php:2057
14897
  msgid "List of related products IDs."
14898
  msgstr ""
14899
 
14900
+ #: includes/api/class-wc-rest-products-controller.php:1706
14901
  #: includes/api/v1/class-wc-rest-products-controller.php:2066
14902
  msgid "List of up-sell products IDs."
14903
  msgstr ""
14904
 
14905
+ #: includes/api/class-wc-rest-products-controller.php:1714
14906
  #: includes/api/v1/class-wc-rest-products-controller.php:2074
14907
  msgid "List of cross-sell products IDs."
14908
  msgstr ""
14909
 
14910
+ #: includes/api/class-wc-rest-products-controller.php:1722
14911
  #: includes/api/v1/class-wc-rest-products-controller.php:2082
14912
  msgid "Product parent ID."
14913
  msgstr ""
14914
 
14915
+ #: includes/api/class-wc-rest-products-controller.php:1727
14916
  #: includes/api/v1/class-wc-rest-products-controller.php:2087
14917
  msgid "Optional note to send the customer after purchase."
14918
  msgstr ""
14919
 
14920
+ #: includes/api/class-wc-rest-products-controller.php:1732
14921
  #: includes/api/v1/class-wc-rest-products-controller.php:2092
14922
  msgid "List of categories."
14923
  msgstr ""
14924
 
14925
+ #: includes/api/class-wc-rest-products-controller.php:1739
14926
  #: includes/api/v1/class-wc-rest-products-controller.php:2099
14927
  msgid "Category ID."
14928
  msgstr ""
14929
 
14930
+ #: includes/api/class-wc-rest-products-controller.php:1750
14931
  #: includes/api/v1/class-wc-rest-products-controller.php:2110
14932
  msgid "Category slug."
14933
  msgstr ""
14934
 
14935
+ #: includes/api/class-wc-rest-products-controller.php:1759
14936
  #: includes/api/v1/class-wc-rest-products-controller.php:2119
14937
  msgid "List of tags."
14938
  msgstr ""
14939
 
14940
+ #: includes/api/class-wc-rest-products-controller.php:1766
14941
  #: includes/api/v1/class-wc-rest-products-controller.php:2126
14942
  msgid "Tag ID."
14943
  msgstr ""
14944
 
14945
+ #: includes/api/class-wc-rest-products-controller.php:1771
14946
  #: includes/api/v1/class-wc-rest-product-tags-controller.php:100
14947
  #: includes/api/v1/class-wc-rest-products-controller.php:2131
14948
  msgid "Tag name."
14949
  msgstr ""
14950
 
14951
+ #: includes/api/class-wc-rest-products-controller.php:1777
14952
  #: includes/api/v1/class-wc-rest-products-controller.php:2137
14953
  msgid "Tag slug."
14954
  msgstr ""
14955
 
14956
+ #: includes/api/class-wc-rest-products-controller.php:1786
14957
  #: includes/api/v1/class-wc-rest-products-controller.php:2146
14958
  msgid "List of images."
14959
  msgstr ""
14960
 
14961
+ #: includes/api/class-wc-rest-products-controller.php:1863
14962
  #: includes/api/v1/class-wc-rest-products-controller.php:2211
14963
  msgid "Attribute position."
14964
  msgstr ""
14965
 
14966
+ #: includes/api/class-wc-rest-products-controller.php:1874
14967
  #: includes/api/v1/class-wc-rest-products-controller.php:2222
14968
  msgid "Define if the attribute can be used as variation."
14969
  msgstr ""
14970
 
14971
+ #: includes/api/class-wc-rest-products-controller.php:1880
14972
  #: includes/api/v1/class-wc-rest-products-controller.php:2228
14973
  msgid "List of available term names of the attribute."
14974
  msgstr ""
14975
 
14976
+ #: includes/api/class-wc-rest-products-controller.php:1888
14977
  #: includes/api/v1/class-wc-rest-products-controller.php:2236
14978
  msgid "Defaults variation attributes."
14979
  msgstr ""
14980
 
14981
+ #: includes/api/class-wc-rest-products-controller.php:1913
14982
  msgid "List of variations IDs."
14983
  msgstr ""
14984
 
14985
+ #: includes/api/class-wc-rest-products-controller.php:1922
14986
  #: includes/api/v1/class-wc-rest-products-controller.php:2554
14987
  msgid "List of grouped products ID."
14988
  msgstr ""
14989
 
14990
+ #: includes/api/class-wc-rest-products-controller.php:1976
14991
  #: includes/api/v1/class-wc-rest-products-controller.php:2582
14992
  msgid "Limit result set to products with a specific slug."
14993
  msgstr ""
14994
 
14995
+ #: includes/api/class-wc-rest-products-controller.php:1982
14996
  #: includes/api/v1/class-wc-rest-products-controller.php:2588
14997
  msgid "Limit result set to products assigned a specific status."
14998
  msgstr ""
14999
 
15000
+ #: includes/api/class-wc-rest-products-controller.php:1989
15001
  #: includes/api/v1/class-wc-rest-products-controller.php:2595
15002
  msgid "Limit result set to products assigned a specific type."
15003
  msgstr ""
15004
 
15005
+ #: includes/api/class-wc-rest-products-controller.php:1996
15006
  #: includes/api/v1/class-wc-rest-products-controller.php:2632
15007
  msgid "Limit result set to products with a specific SKU."
15008
  msgstr ""
15009
 
15010
+ #: includes/api/class-wc-rest-products-controller.php:2002
15011
  msgid "Limit result set to featured products."
15012
  msgstr ""
15013
 
15014
+ #: includes/api/class-wc-rest-products-controller.php:2008
15015
  #: includes/api/v1/class-wc-rest-products-controller.php:2602
15016
  msgid "Limit result set to products assigned a specific category ID."
15017
  msgstr ""
15018
 
15019
+ #: includes/api/class-wc-rest-products-controller.php:2014
15020
  #: includes/api/v1/class-wc-rest-products-controller.php:2608
15021
  msgid "Limit result set to products assigned a specific tag ID."
15022
  msgstr ""
15023
 
15024
+ #: includes/api/class-wc-rest-products-controller.php:2020
15025
  #: includes/api/v1/class-wc-rest-products-controller.php:2614
15026
  msgid "Limit result set to products assigned a specific shipping class ID."
15027
  msgstr ""
15028
 
15029
+ #: includes/api/class-wc-rest-products-controller.php:2026
15030
  #: includes/api/v1/class-wc-rest-products-controller.php:2620
15031
  msgid "Limit result set to products with a specific attribute."
15032
  msgstr ""
15033
 
15034
+ #: includes/api/class-wc-rest-products-controller.php:2032
15035
  #: includes/api/v1/class-wc-rest-products-controller.php:2626
15036
  msgid ""
15037
  "Limit result set to products with a specific attribute term ID (required an "
15038
  "assigned attribute)."
15039
  msgstr ""
15040
 
15041
+ #: includes/api/class-wc-rest-products-controller.php:2040
15042
  msgid "Limit result set to products with a specific tax class."
15043
  msgstr ""
15044
 
15045
+ #: includes/api/class-wc-rest-products-controller.php:2049
15046
  msgid "Limit result set to products in stock or out of stock."
15047
  msgstr ""
15048
 
15049
+ #: includes/api/class-wc-rest-products-controller.php:2055
15050
  msgid "Limit result set to products on sale."
15051
  msgstr ""
15052
 
15053
+ #: includes/api/class-wc-rest-products-controller.php:2061
15054
  msgid "Limit result set to products based on a minimum price."
15055
  msgstr ""
15056
 
15057
+ #: includes/api/class-wc-rest-products-controller.php:2067
15058
  msgid "Limit result set to products based on a maximum price."
15059
  msgstr ""
15060
 
15921
  msgid "You do not have permission to delete this %s"
15922
  msgstr ""
15923
 
15924
+ #: includes/api/legacy/v1/class-wc-api-resource.php:298
15925
+ #: includes/api/legacy/v2/class-wc-api-resource.php:369
15926
+ #: includes/api/legacy/v3/class-wc-api-resource.php:371
15927
  msgid "Permanently deleted customer"
15928
  msgstr ""
15929
 
15930
+ #: includes/api/legacy/v1/class-wc-api-resource.php:300
15931
+ #: includes/api/legacy/v2/class-wc-api-resource.php:371
15932
+ #: includes/api/legacy/v3/class-wc-api-resource.php:373
15933
  msgid "The customer cannot be deleted"
15934
  msgstr ""
15935
 
15936
+ #: includes/api/legacy/v1/class-wc-api-resource.php:308
15937
  #: includes/api/legacy/v2/class-wc-api-products.php:442
15938
+ #: includes/api/legacy/v2/class-wc-api-resource.php:379
15939
  #: includes/api/legacy/v3/class-wc-api-products.php:501
15940
  #: includes/api/legacy/v3/class-wc-api-products.php:3020
15941
+ #: includes/api/legacy/v3/class-wc-api-resource.php:381
15942
  msgid "This %s cannot be deleted"
15943
  msgstr ""
15944
 
15945
+ #: includes/api/legacy/v1/class-wc-api-resource.php:311
15946
  #: includes/api/legacy/v2/class-wc-api-products.php:451
15947
+ #: includes/api/legacy/v2/class-wc-api-resource.php:383
15948
  #: includes/api/legacy/v3/class-wc-api-products.php:510
15949
+ #: includes/api/legacy/v3/class-wc-api-resource.php:384
15950
  msgid "Permanently deleted %s"
15951
  msgstr ""
15952
 
15953
+ #: includes/api/legacy/v1/class-wc-api-resource.php:317
15954
  #: includes/api/legacy/v2/class-wc-api-products.php:455
15955
  #: includes/api/legacy/v2/class-wc-api-products.php:2197
15956
+ #: includes/api/legacy/v2/class-wc-api-resource.php:387
15957
  #: includes/api/legacy/v3/class-wc-api-products.php:514
15958
  #: includes/api/legacy/v3/class-wc-api-products.php:854
15959
  #: includes/api/legacy/v3/class-wc-api-products.php:1042
15960
  #: includes/api/legacy/v3/class-wc-api-products.php:2759
15961
  #: includes/api/legacy/v3/class-wc-api-products.php:3027
15962
  #: includes/api/legacy/v3/class-wc-api-products.php:3334
15963
+ #: includes/api/legacy/v3/class-wc-api-resource.php:390
15964
  #: includes/api/legacy/v3/class-wc-api-taxes.php:354
15965
  #: includes/api/legacy/v3/class-wc-api-taxes.php:665
15966
  msgid "Deleted %s"
17976
  msgstr ""
17977
 
17978
  #: includes/class-wc-order-refund.php:64
17979
+ #: includes/data-stores/class-wc-order-refund-data-store-cpt.php:105
17980
  #. translators: %s: Order date
17981
  msgid "Refund &ndash; %s"
17982
  msgstr ""
18540
  msgid "%1$d updates complete. Database version is %2$s"
18541
  msgstr ""
18542
 
18543
+ #: includes/data-stores/abstract-wc-order-data-store-cpt.php:204
18544
  #. translators: %s: Order date
18545
  msgid "Order &ndash; %s"
18546
  msgstr ""
22606
  msgstr ""
22607
 
22608
  #: includes/class-wc-order-refund.php:64
22609
+ #: includes/data-stores/abstract-wc-order-data-store-cpt.php:204
22610
+ #: includes/data-stores/class-wc-order-refund-data-store-cpt.php:105
22611
  msgctxt "Order date parsed by strftime"
22612
  msgid "%b %d, %Y @ %I:%M %p"
22613
  msgstr ""
includes/abstracts/abstract-wc-data.php CHANGED
@@ -432,7 +432,8 @@ abstract class WC_Data {
432
  }
433
 
434
  if ( ! empty( $this->cache_group ) ) {
435
- $cache_key = WC_Cache_Helper::get_cache_prefix( $this->cache_group ) . 'object_meta_' . $this->get_id();
 
436
  }
437
 
438
  if ( ! $force_read ) {
@@ -480,9 +481,9 @@ abstract class WC_Data {
480
  $this->data_store->update_meta( $this, $meta );
481
  }
482
  }
483
-
484
  if ( ! empty( $this->cache_group ) ) {
485
- WC_Cache_Helper::incr_cache_prefix( $this->cache_group );
 
486
  }
487
  }
488
 
432
  }
433
 
434
  if ( ! empty( $this->cache_group ) ) {
435
+ // Prefix by group allows invalidation by group until https://core.trac.wordpress.org/ticket/4476 is implemented.
436
+ $cache_key = WC_Cache_Helper::get_cache_prefix( $this->cache_group ) . WC_Cache_Helper::get_cache_prefix( 'object_' . $this->get_id() ) . 'object_meta_' . $this->get_id();
437
  }
438
 
439
  if ( ! $force_read ) {
481
  $this->data_store->update_meta( $this, $meta );
482
  }
483
  }
 
484
  if ( ! empty( $this->cache_group ) ) {
485
+ $cache_key = WC_Cache_Helper::get_cache_prefix( $this->cache_group ) . WC_Cache_Helper::get_cache_prefix( 'object_' . $this->get_id() ) . 'object_meta_' . $this->get_id();
486
+ wp_cache_delete( $cache_key, $this->cache_group );
487
  }
488
  }
489
 
includes/abstracts/abstract-wc-widget.php CHANGED
@@ -69,7 +69,6 @@ abstract class WC_Widget extends WP_Widget {
69
  * @return bool true if the widget is cached otherwise false
70
  */
71
  public function get_cached_widget( $args ) {
72
-
73
  $cache = wp_cache_get( apply_filters( 'woocommerce_cached_widget_id', $this->widget_id ), 'widget' );
74
 
75
  if ( ! is_array( $cache ) ) {
@@ -92,7 +91,15 @@ abstract class WC_Widget extends WP_Widget {
92
  * @return string the content that was cached
93
  */
94
  public function cache_widget( $args, $content ) {
95
- wp_cache_set( apply_filters( 'woocommerce_cached_widget_id', $this->widget_id ), array( $args['widget_id'] => $content ), 'widget' );
 
 
 
 
 
 
 
 
96
 
97
  return $content;
98
  }
69
  * @return bool true if the widget is cached otherwise false
70
  */
71
  public function get_cached_widget( $args ) {
 
72
  $cache = wp_cache_get( apply_filters( 'woocommerce_cached_widget_id', $this->widget_id ), 'widget' );
73
 
74
  if ( ! is_array( $cache ) ) {
91
  * @return string the content that was cached
92
  */
93
  public function cache_widget( $args, $content ) {
94
+ $cache = wp_cache_get( apply_filters( 'woocommerce_cached_widget_id', $this->widget_id ), 'widget' );
95
+
96
+ if ( ! is_array( $cache ) ) {
97
+ $cache = array();
98
+ }
99
+
100
+ $cache[ $args['widget_id'] ] = $content;
101
+
102
+ wp_cache_set( apply_filters( 'woocommerce_cached_widget_id', $this->widget_id ), $cache, 'widget' );
103
 
104
  return $content;
105
  }
includes/admin/class-wc-admin-dashboard.php CHANGED
@@ -254,6 +254,7 @@ class WC_Admin_Dashboard {
254
  AND comments.comment_type = ''
255
  AND posts.post_password = ''
256
  AND posts.post_type = 'product'
 
257
  ORDER BY comments.comment_date_gmt DESC
258
  LIMIT 5
259
  " );
254
  AND comments.comment_type = ''
255
  AND posts.post_password = ''
256
  AND posts.post_type = 'product'
257
+ AND comments.comment_parent = 0
258
  ORDER BY comments.comment_date_gmt DESC
259
  LIMIT 5
260
  " );
includes/admin/meta-boxes/class-wc-meta-box-product-data.php CHANGED
@@ -288,9 +288,9 @@ class WC_Meta_Box_Product_Data {
288
  'date_on_sale_from' => wc_clean( $_POST['_sale_price_dates_from'] ),
289
  'date_on_sale_to' => wc_clean( $_POST['_sale_price_dates_to'] ),
290
  'manage_stock' => ! empty( $_POST['_manage_stock'] ),
291
- 'backorders' => wc_clean( $_POST['_backorders'] ),
292
  'stock_status' => wc_clean( $_POST['_stock_status'] ),
293
- 'stock_quantity' => wc_stock_amount( $_POST['_stock'] ),
294
  'download_limit' => '' === $_POST['_download_limit'] ? '' : absint( $_POST['_download_limit'] ),
295
  'download_expiry' => '' === $_POST['_download_expiry'] ? '' : absint( $_POST['_download_expiry'] ),
296
  'downloads' => self::prepare_downloads(
@@ -365,8 +365,8 @@ class WC_Meta_Box_Product_Data {
365
  isset( $_POST['_wc_variation_file_hashes'][ $variation_id ] ) ? $_POST['_wc_variation_file_hashes'][ $variation_id ] : array()
366
  ),
367
  'manage_stock' => isset( $_POST['variable_manage_stock'][ $i ] ),
368
- 'stock_quantity' => wc_clean( $_POST['variable_stock'][ $i ] ),
369
- 'backorders' => wc_clean( $_POST['variable_backorders'][ $i ] ),
370
  'stock_status' => wc_clean( $_POST['variable_stock_status'][ $i ] ),
371
  'image_id' => wc_clean( $_POST['upload_image_id'][ $i ] ),
372
  'attributes' => self::prepare_set_attributes( $parent->get_attributes(), 'attribute_', $i ),
288
  'date_on_sale_from' => wc_clean( $_POST['_sale_price_dates_from'] ),
289
  'date_on_sale_to' => wc_clean( $_POST['_sale_price_dates_to'] ),
290
  'manage_stock' => ! empty( $_POST['_manage_stock'] ),
291
+ 'backorders' => isset( $_POST['_backorders'] ) ? wc_clean( $_POST['_backorders'] ) : null,
292
  'stock_status' => wc_clean( $_POST['_stock_status'] ),
293
+ 'stock_quantity' => isset( $_POST['_stock'] ) ? wc_stock_amount( $_POST['_stock'] ) : null,
294
  'download_limit' => '' === $_POST['_download_limit'] ? '' : absint( $_POST['_download_limit'] ),
295
  'download_expiry' => '' === $_POST['_download_expiry'] ? '' : absint( $_POST['_download_expiry'] ),
296
  'downloads' => self::prepare_downloads(
365
  isset( $_POST['_wc_variation_file_hashes'][ $variation_id ] ) ? $_POST['_wc_variation_file_hashes'][ $variation_id ] : array()
366
  ),
367
  'manage_stock' => isset( $_POST['variable_manage_stock'][ $i ] ),
368
+ 'stock_quantity' => isset( $_POST['variable_stock'], $_POST['variable_stock'][ $i ] ) ? wc_clean( $_POST['variable_stock'][ $i ] ) : null,
369
+ 'backorders' => isset( $_POST['variable_backorders'], $_POST['variable_backorders'][ $i ] ) ? wc_clean( $_POST['variable_backorders'][ $i ] ) : null,
370
  'stock_status' => wc_clean( $_POST['variable_stock_status'][ $i ] ),
371
  'image_id' => wc_clean( $_POST['upload_image_id'][ $i ] ),
372
  'attributes' => self::prepare_set_attributes( $parent->get_attributes(), 'attribute_', $i ),
includes/api/class-wc-rest-authentication.php CHANGED
@@ -14,6 +14,27 @@ if ( ! defined( 'ABSPATH' ) ) {
14
 
15
  class WC_REST_Authentication {
16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  /**
18
  * Initialize authentication actions.
19
  */
@@ -21,6 +42,7 @@ class WC_REST_Authentication {
21
  add_filter( 'determine_current_user', array( $this, 'authenticate' ), 15 );
22
  add_filter( 'rest_authentication_errors', array( $this, 'check_authentication_error' ) );
23
  add_filter( 'rest_post_dispatch', array( $this, 'send_unauthorized_headers' ), 50 );
 
24
  }
25
 
26
  /**
@@ -70,14 +92,33 @@ class WC_REST_Authentication {
70
  * @return WP_Error|null|bool
71
  */
72
  public function check_authentication_error( $error ) {
73
- global $wc_rest_authentication_error;
74
-
75
  // Passthrough other errors.
76
  if ( ! empty( $error ) ) {
77
  return $error;
78
  }
79
 
80
- return $wc_rest_authentication_error;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  }
82
 
83
  /**
@@ -91,10 +132,9 @@ class WC_REST_Authentication {
91
  * @return int|bool
92
  */
93
  private function perform_basic_authentication() {
94
- global $wc_rest_authentication_error;
95
-
96
- $consumer_key = '';
97
- $consumer_secret = '';
98
 
99
  // If the $_GET parameters are present, use those first.
100
  if ( ! empty( $_GET['consumer_key'] ) && ! empty( $_GET['consumer_secret'] ) ) {
@@ -114,27 +154,19 @@ class WC_REST_Authentication {
114
  }
115
 
116
  // Get user data.
117
- $user = $this->get_user_data_by_consumer_key( $consumer_key );
118
- if ( empty( $user ) ) {
119
  return false;
120
  }
121
 
122
  // Validate user secret.
123
- if ( ! hash_equals( $user->consumer_secret, $consumer_secret ) ) {
124
- $wc_rest_authentication_error = new WP_Error( 'woocommerce_rest_authentication_error', __( 'Consumer secret is invalid.', 'woocommerce' ), array( 'status' => 401 ) );
125
-
126
- return false;
127
- }
128
 
129
- // Check API Key permissions.
130
- if ( ! $this->check_permissions( $user->permissions ) ) {
131
  return false;
132
  }
133
 
134
- // Update last access.
135
- $this->update_last_access( $user->key_id );
136
-
137
- return $user->user_id;
138
  }
139
 
140
  /**
@@ -203,8 +235,6 @@ class WC_REST_Authentication {
203
  * @return array|WP_Error
204
  */
205
  public function get_oauth_parameters() {
206
- global $wc_rest_authentication_error;
207
-
208
  $params = array_merge( $_GET, $_POST );
209
  $params = wp_unslash( $params );
210
  $header = $this->get_authorization_header();
@@ -252,7 +282,7 @@ class WC_REST_Authentication {
252
  implode( ', ', $errors )
253
  );
254
 
255
- $wc_rest_authentication_error = new WP_Error( 'woocommerce_rest_authentication_missing_parameter', $message, array( 'status' => 401 ) );
256
 
257
  return array();
258
  }
@@ -277,7 +307,7 @@ class WC_REST_Authentication {
277
  * @return int|bool
278
  */
279
  private function perform_oauth_authentication() {
280
- global $wc_rest_authentication_error;
281
 
282
  $params = $this->get_oauth_parameters();
283
  if ( empty( $params ) ) {
@@ -285,34 +315,28 @@ class WC_REST_Authentication {
285
  }
286
 
287
  // Fetch WP user by consumer key.
288
- $user = $this->get_user_data_by_consumer_key( $params['oauth_consumer_key'] );
289
 
290
- if ( empty( $user ) ) {
291
- $wc_rest_authentication_error = new WP_Error( 'woocommerce_rest_authentication_error', __( 'Consumer key is invalid.', 'woocommerce' ), array( 'status' => 401 ) );
292
 
293
  return false;
294
  }
295
 
296
  // Perform OAuth validation.
297
- $wc_rest_authentication_error = $this->check_oauth_signature( $user, $params );
298
- if ( is_wp_error( $wc_rest_authentication_error ) ) {
299
- return false;
300
- }
301
-
302
- $wc_rest_authentication_error = $this->check_oauth_timestamp_and_nonce( $user, $params['oauth_timestamp'], $params['oauth_nonce'] );
303
- if ( is_wp_error( $wc_rest_authentication_error ) ) {
304
  return false;
305
  }
306
 
307
- // Check API Key permissions.
308
- if ( ! $this->check_permissions( $user->permissions ) ) {
 
309
  return false;
310
  }
311
 
312
- // Update last access.
313
- $this->update_last_access( $user->key_id );
314
-
315
- return $user->user_id;
316
  }
317
 
318
  /**
@@ -342,18 +366,8 @@ class WC_REST_Authentication {
342
  }
343
 
344
  // Normalize parameter key/values.
345
- $params = $this->normalize_parameters( $params );
346
- $query_parameters = array();
347
- foreach ( $params as $param_key => $param_value ) {
348
- if ( is_array( $param_value ) ) {
349
- foreach ( $param_value as $param_key_inner => $param_value_inner ) {
350
- $query_parameters[] = $param_key . '%255B' . $param_key_inner . '%255D%3D' . $param_value_inner;
351
- }
352
- } else {
353
- $query_parameters[] = $param_key . '%3D' . $param_value; // Join with equals sign.
354
- }
355
- }
356
- $query_string = implode( '%26', $query_parameters ); // Join with ampersand.
357
  $string_to_sign = $http_method . '&' . $base_request_uri . '&' . $query_string;
358
 
359
  if ( 'HMAC-SHA1' !== $params['oauth_signature_method'] && 'HMAC-SHA256' !== $params['oauth_signature_method'] ) {
@@ -371,6 +385,31 @@ class WC_REST_Authentication {
371
  return true;
372
  }
373
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
374
  /**
375
  * Normalize each parameter by assuming each parameter may have already been
376
  * encoded, so attempt to decode, and then re-encode according to RFC 3986.
@@ -381,13 +420,13 @@ class WC_REST_Authentication {
381
  *
382
  * is encoded to:
383
  *
384
- * 'filter%5Bperiod%5D' => 'week'
385
  *
386
  * This conforms to the OAuth 1.0a spec which indicates the entire query string
387
  * should be URL encoded.
388
  *
389
  * @see rawurlencode()
390
- * @param array $parameters Un-normalized pararmeters.
391
  * @return array Normalized parameters.
392
  */
393
  private function normalize_parameters( $parameters ) {
@@ -473,54 +512,45 @@ class WC_REST_Authentication {
473
  /**
474
  * Check that the API keys provided have the proper key-specific permissions to either read or write API resources.
475
  *
476
- * @param string $permissions
477
- * @return bool
478
  */
479
- private function check_permissions( $permissions ) {
480
- global $wc_rest_authentication_error;
481
-
482
- $valid = true;
483
-
484
- if ( ! isset( $_SERVER['REQUEST_METHOD'] ) ) {
485
- return false;
486
- }
487
-
488
- switch ( $_SERVER['REQUEST_METHOD'] ) {
489
 
 
490
  case 'HEAD' :
491
  case 'GET' :
492
  if ( 'read' !== $permissions && 'read_write' !== $permissions ) {
493
- $wc_rest_authentication_error = new WP_Error( 'woocommerce_rest_authentication_error', __( 'The API key provided does not have read permissions.', 'woocommerce' ), array( 'status' => 401 ) );
494
- $valid = false;
495
  }
496
  break;
497
-
498
  case 'POST' :
499
  case 'PUT' :
500
  case 'PATCH' :
501
  case 'DELETE' :
502
  if ( 'write' !== $permissions && 'read_write' !== $permissions ) {
503
- $wc_rest_authentication_error = new WP_Error( 'woocommerce_rest_authentication_error', __( 'The API key provided does not have write permissions.', 'woocommerce' ), array( 'status' => 401 ) );
504
- $valid = false;
505
  }
506
  break;
 
 
 
507
  }
508
 
509
- return $valid;
510
  }
511
 
512
  /**
513
  * Updated API Key last access datetime.
514
- *
515
- * @param int $key_id
516
  */
517
- private function update_last_access( $key_id ) {
518
  global $wpdb;
519
 
520
  $wpdb->update(
521
  $wpdb->prefix . 'woocommerce_api_keys',
522
  array( 'last_access' => current_time( 'mysql' ) ),
523
- array( 'key_id' => $key_id ),
524
  array( '%s' ),
525
  array( '%d' )
526
  );
@@ -535,15 +565,36 @@ class WC_REST_Authentication {
535
  * @return WP_REST_Response
536
  */
537
  public function send_unauthorized_headers( $response ) {
538
- global $wc_rest_authentication_error;
539
-
540
- if ( is_wp_error( $wc_rest_authentication_error ) && is_ssl() ) {
541
  $auth_message = __( 'WooCommerce API. Use a consumer key in the username field and a consumer secret in the password field.', 'woocommerce' );
542
  $response->header( 'WWW-Authenticate', 'Basic realm="' . $auth_message . '"', true );
543
  }
544
 
545
  return $response;
546
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
547
  }
548
 
549
  new WC_REST_Authentication();
14
 
15
  class WC_REST_Authentication {
16
 
17
+ /**
18
+ * Authentication error.
19
+ *
20
+ * @var WP_Error
21
+ */
22
+ protected $error = null;
23
+
24
+ /**
25
+ * Logged in user data.
26
+ *
27
+ * @var stdClass
28
+ */
29
+ protected $user = null;
30
+
31
+ /**
32
+ * Current auth method.
33
+ *
34
+ * @var string
35
+ */
36
+ protected $auth_method = '';
37
+
38
  /**
39
  * Initialize authentication actions.
40
  */
42
  add_filter( 'determine_current_user', array( $this, 'authenticate' ), 15 );
43
  add_filter( 'rest_authentication_errors', array( $this, 'check_authentication_error' ) );
44
  add_filter( 'rest_post_dispatch', array( $this, 'send_unauthorized_headers' ), 50 );
45
+ add_filter( 'rest_pre_dispatch', array( $this, 'check_user_permissions' ), 10, 3 );
46
  }
47
 
48
  /**
92
  * @return WP_Error|null|bool
93
  */
94
  public function check_authentication_error( $error ) {
 
 
95
  // Passthrough other errors.
96
  if ( ! empty( $error ) ) {
97
  return $error;
98
  }
99
 
100
+ return $this->get_error();
101
+ }
102
+
103
+ /**
104
+ * Set authentication error.
105
+ *
106
+ * @param WP_Error $error Authication error data.
107
+ */
108
+ protected function set_error( $error ) {
109
+ // Reset user.
110
+ $this->user = null;
111
+
112
+ $this->error = $error;
113
+ }
114
+
115
+ /**
116
+ * Get authentication error.
117
+ *
118
+ * @return WP_Error|null.
119
+ */
120
+ protected function get_error() {
121
+ return $this->error;
122
  }
123
 
124
  /**
132
  * @return int|bool
133
  */
134
  private function perform_basic_authentication() {
135
+ $this->auth_method = 'basic_auth';
136
+ $consumer_key = '';
137
+ $consumer_secret = '';
 
138
 
139
  // If the $_GET parameters are present, use those first.
140
  if ( ! empty( $_GET['consumer_key'] ) && ! empty( $_GET['consumer_secret'] ) ) {
154
  }
155
 
156
  // Get user data.
157
+ $this->user = $this->get_user_data_by_consumer_key( $consumer_key );
158
+ if ( empty( $this->user ) ) {
159
  return false;
160
  }
161
 
162
  // Validate user secret.
163
+ if ( ! hash_equals( $this->user->consumer_secret, $consumer_secret ) ) {
164
+ $this->set_error( new WP_Error( 'woocommerce_rest_authentication_error', __( 'Consumer secret is invalid.', 'woocommerce' ), array( 'status' => 401 ) ) );
 
 
 
165
 
 
 
166
  return false;
167
  }
168
 
169
+ return $this->user->user_id;
 
 
 
170
  }
171
 
172
  /**
235
  * @return array|WP_Error
236
  */
237
  public function get_oauth_parameters() {
 
 
238
  $params = array_merge( $_GET, $_POST );
239
  $params = wp_unslash( $params );
240
  $header = $this->get_authorization_header();
282
  implode( ', ', $errors )
283
  );
284
 
285
+ $this->set_error( new WP_Error( 'woocommerce_rest_authentication_missing_parameter', $message, array( 'status' => 401 ) ) );
286
 
287
  return array();
288
  }
307
  * @return int|bool
308
  */
309
  private function perform_oauth_authentication() {
310
+ $this->auth_method = 'oauth1';
311
 
312
  $params = $this->get_oauth_parameters();
313
  if ( empty( $params ) ) {
315
  }
316
 
317
  // Fetch WP user by consumer key.
318
+ $this->user = $this->get_user_data_by_consumer_key( $params['oauth_consumer_key'] );
319
 
320
+ if ( empty( $this->user ) ) {
321
+ $this->set_error( new WP_Error( 'woocommerce_rest_authentication_error', __( 'Consumer key is invalid.', 'woocommerce' ), array( 'status' => 401 ) ) );
322
 
323
  return false;
324
  }
325
 
326
  // Perform OAuth validation.
327
+ $signature = $this->check_oauth_signature( $this->user, $params );
328
+ if ( is_wp_error( $signature ) ) {
329
+ $this->set_error( $signature );
 
 
 
 
330
  return false;
331
  }
332
 
333
+ $timestamp_and_nonce = $this->check_oauth_timestamp_and_nonce( $this->user, $params['oauth_timestamp'], $params['oauth_nonce'] );
334
+ if ( is_wp_error( $timestamp_and_nonce ) ) {
335
+ $this->set_error( $timestamp_and_nonce );
336
  return false;
337
  }
338
 
339
+ return $this->user->user_id;
 
 
 
340
  }
341
 
342
  /**
366
  }
367
 
368
  // Normalize parameter key/values.
369
+ $params = $this->normalize_parameters( $params );
370
+ $query_string = implode( '%26', $this->join_with_equals_sign( $params ) ); // Join with ampersand.
 
 
 
 
 
 
 
 
 
 
371
  $string_to_sign = $http_method . '&' . $base_request_uri . '&' . $query_string;
372
 
373
  if ( 'HMAC-SHA1' !== $params['oauth_signature_method'] && 'HMAC-SHA256' !== $params['oauth_signature_method'] ) {
385
  return true;
386
  }
387
 
388
+ /**
389
+ * Creates an array of urlencoded strings out of each array key/value pairs.
390
+ *
391
+ * @param array $params Array of parameters to convert.
392
+ * @param array $query_params Array to extend.
393
+ * @param string $key Optional Array key to append
394
+ * @return string Array of urlencoded strings
395
+ */
396
+ private function join_with_equals_sign( $params, $query_params = array(), $key = '' ) {
397
+ foreach ( $params as $param_key => $param_value ) {
398
+ if ( $key ) {
399
+ $param_key = $key . '%5B' . $param_key . '%5D'; // Handle multi-dimensional array.
400
+ }
401
+
402
+ if ( is_array( $param_value ) ) {
403
+ $query_params = $this->join_with_equals_sign( $param_value, $query_params, $param_key );
404
+ } else {
405
+ $string = $param_key . '=' . $param_value; // Join with equals sign.
406
+ $query_params[] = wc_rest_urlencode_rfc3986( $string );
407
+ }
408
+ }
409
+
410
+ return $query_params;
411
+ }
412
+
413
  /**
414
  * Normalize each parameter by assuming each parameter may have already been
415
  * encoded, so attempt to decode, and then re-encode according to RFC 3986.
420
  *
421
  * is encoded to:
422
  *
423
+ * 'filter%255Bperiod%255D' => 'week'
424
  *
425
  * This conforms to the OAuth 1.0a spec which indicates the entire query string
426
  * should be URL encoded.
427
  *
428
  * @see rawurlencode()
429
+ * @param array $parameters Un-normalized parameters.
430
  * @return array Normalized parameters.
431
  */
432
  private function normalize_parameters( $parameters ) {
512
  /**
513
  * Check that the API keys provided have the proper key-specific permissions to either read or write API resources.
514
  *
515
+ * @param string $method Request method.
516
+ * @return bool|WP_Error
517
  */
518
+ private function check_permissions( $method ) {
519
+ $permissions = $this->user->permissions;
 
 
 
 
 
 
 
 
520
 
521
+ switch ( $method ) {
522
  case 'HEAD' :
523
  case 'GET' :
524
  if ( 'read' !== $permissions && 'read_write' !== $permissions ) {
525
+ return new WP_Error( 'woocommerce_rest_authentication_error', __( 'The API key provided does not have read permissions.', 'woocommerce' ), array( 'status' => 401 ) );
 
526
  }
527
  break;
 
528
  case 'POST' :
529
  case 'PUT' :
530
  case 'PATCH' :
531
  case 'DELETE' :
532
  if ( 'write' !== $permissions && 'read_write' !== $permissions ) {
533
+ return new WP_Error( 'woocommerce_rest_authentication_error', __( 'The API key provided does not have write permissions.', 'woocommerce' ), array( 'status' => 401 ) );
 
534
  }
535
  break;
536
+
537
+ default :
538
+ return new WP_Error( 'woocommerce_rest_authentication_error', __( 'Unknown request method.', 'woocommerce' ), array( 'status' => 401 ) );
539
  }
540
 
541
+ return true;
542
  }
543
 
544
  /**
545
  * Updated API Key last access datetime.
 
 
546
  */
547
+ private function update_last_access() {
548
  global $wpdb;
549
 
550
  $wpdb->update(
551
  $wpdb->prefix . 'woocommerce_api_keys',
552
  array( 'last_access' => current_time( 'mysql' ) ),
553
+ array( 'key_id' => $this->user->key_id ),
554
  array( '%s' ),
555
  array( '%d' )
556
  );
565
  * @return WP_REST_Response
566
  */
567
  public function send_unauthorized_headers( $response ) {
568
+ if ( is_wp_error( $this->get_error() ) && 'basic_auth' === $this->auth_method ) {
 
 
569
  $auth_message = __( 'WooCommerce API. Use a consumer key in the username field and a consumer secret in the password field.', 'woocommerce' );
570
  $response->header( 'WWW-Authenticate', 'Basic realm="' . $auth_message . '"', true );
571
  }
572
 
573
  return $response;
574
  }
575
+
576
+ /**
577
+ * Check for user permissions and register last access.
578
+ *
579
+ * @param mixed $result Response to replace the requested version with.
580
+ * @param WP_REST_Server $server Server instance.
581
+ * @param WP_REST_Request $request Request used to generate the response.
582
+ * @return mixed
583
+ */
584
+ public function check_user_permissions( $result, $server, $request ) {
585
+ if ( $this->user ) {
586
+ // Check API Key permissions.
587
+ $allowed = $this->check_permissions( $request->get_method() );
588
+ if ( is_wp_error( $allowed ) ) {
589
+ return $allowed;
590
+ }
591
+
592
+ // Register last access.
593
+ $this->update_last_access();
594
+ }
595
+
596
+ return $result;
597
+ }
598
  }
599
 
600
  new WC_REST_Authentication();
includes/api/class-wc-rest-products-controller.php CHANGED
@@ -1069,9 +1069,7 @@ class WC_REST_Products_Controller extends WC_REST_Legacy_Products_Controller {
1069
  }
1070
  }
1071
 
1072
- if ( ! empty( $gallery ) ) {
1073
- $product->set_gallery_image_ids( $gallery );
1074
- }
1075
  } else {
1076
  $product->set_image_id( '' );
1077
  $product->set_gallery_image_ids( array() );
1069
  }
1070
  }
1071
 
1072
+ $product->set_gallery_image_ids( $gallery );
 
 
1073
  } else {
1074
  $product->set_image_id( '' );
1075
  $product->set_gallery_image_ids( array() );
includes/api/legacy/v1/class-wc-api-resource.php CHANGED
@@ -202,15 +202,10 @@ class WC_API_Resource {
202
  // customer meta
203
  $meta = (array) get_user_meta( $resource->ID );
204
 
205
- } elseif ( is_a( $resource, 'WC_Product_Variation' ) ) {
206
-
207
- // product variation meta
208
- $meta = (array) get_post_meta( $resource->get_variation_id() );
209
-
210
  } else {
211
 
212
  // coupon/order/product meta
213
- $meta = (array) get_post_meta( $resource->id );
214
  }
215
 
216
  foreach ( $meta as $meta_key => $meta_value ) {
202
  // customer meta
203
  $meta = (array) get_user_meta( $resource->ID );
204
 
 
 
 
 
 
205
  } else {
206
 
207
  // coupon/order/product meta
208
+ $meta = (array) get_post_meta( $resource->get_id() );
209
  }
210
 
211
  foreach ( $meta as $meta_key => $meta_value ) {
includes/api/legacy/v2/class-wc-api-resource.php CHANGED
@@ -271,15 +271,10 @@ class WC_API_Resource {
271
  // customer meta
272
  $meta = (array) get_user_meta( $resource->ID );
273
 
274
- } elseif ( is_a( $resource, 'WC_Product_Variation' ) ) {
275
-
276
- // product variation meta
277
- $meta = (array) get_post_meta( $resource->get_variation_id() );
278
-
279
  } else {
280
 
281
  // coupon/order/product meta
282
- $meta = (array) get_post_meta( $resource->id );
283
  }
284
 
285
  foreach ( $meta as $meta_key => $meta_value ) {
271
  // customer meta
272
  $meta = (array) get_user_meta( $resource->ID );
273
 
 
 
 
 
 
274
  } else {
275
 
276
  // coupon/order/product meta
277
+ $meta = (array) get_post_meta( $resource->get_id() );
278
  }
279
 
280
  foreach ( $meta as $meta_key => $meta_value ) {
includes/api/legacy/v3/class-wc-api-orders.php CHANGED
@@ -243,8 +243,8 @@ class WC_API_Orders extends WC_API_Resource {
243
  'meta' => array_values( $item_meta ),
244
  );
245
 
246
- if ( in_array( 'products', $expand ) ) {
247
- $_product_data = WC()->api->WC_API_Products->get_product( $product_id );
248
 
249
  if ( isset( $_product_data['product'] ) ) {
250
  $line_item['product_data'] = $_product_data['product'];
243
  'meta' => array_values( $item_meta ),
244
  );
245
 
246
+ if ( in_array( 'products', $expand ) && is_object( $product ) ) {
247
+ $_product_data = WC()->api->WC_API_Products->get_product( $product->get_id() );
248
 
249
  if ( isset( $_product_data['product'] ) ) {
250
  $line_item['product_data'] = $_product_data['product'];
includes/api/legacy/v3/class-wc-api-resource.php CHANGED
@@ -273,15 +273,10 @@ class WC_API_Resource {
273
  // customer meta
274
  $meta = (array) get_user_meta( $resource->ID );
275
 
276
- } elseif ( is_a( $resource, 'WC_Product_Variation' ) ) {
277
-
278
- // product variation meta
279
- $meta = (array) get_post_meta( $resource->get_variation_id() );
280
-
281
  } else {
282
 
283
  // coupon/order/product meta
284
- $meta = (array) get_post_meta( $resource->id );
285
  }
286
 
287
  foreach ( $meta as $meta_key => $meta_value ) {
273
  // customer meta
274
  $meta = (array) get_user_meta( $resource->ID );
275
 
 
 
 
 
 
276
  } else {
277
 
278
  // coupon/order/product meta
279
+ $meta = (array) get_post_meta( $resource->get_id() );
280
  }
281
 
282
  foreach ( $meta as $meta_key => $meta_value ) {
includes/class-wc-checkout.php CHANGED
@@ -562,9 +562,6 @@ class WC_Checkout {
562
  }
563
 
564
  $data[ $key ] = apply_filters( 'woocommerce_process_checkout_' . $type . '_field', apply_filters( 'woocommerce_process_checkout_field_' . $key, $value ) );
565
-
566
- // BW compatibility.
567
- $this->legacy_posted_data[ $key ] = $data[ $key ];
568
  }
569
  }
570
 
@@ -574,6 +571,9 @@ class WC_Checkout {
574
  }
575
  }
576
 
 
 
 
577
  return $data;
578
  }
579
 
562
  }
563
 
564
  $data[ $key ] = apply_filters( 'woocommerce_process_checkout_' . $type . '_field', apply_filters( 'woocommerce_process_checkout_field_' . $key, $value ) );
 
 
 
565
  }
566
  }
567
 
571
  }
572
  }
573
 
574
+ // BW compatibility.
575
+ $this->legacy_posted_data = $data;
576
+
577
  return $data;
578
  }
579
 
includes/class-wc-geolocation.php CHANGED
@@ -86,11 +86,11 @@ class WC_Geolocation {
86
 
87
  $ipv4_pattern = '/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/';
88
 
89
- if ( ! preg_match( $ipv4_pattern, $ip ) && ! Requests_IPv6::check_ipv6( $ip ) ) {
90
  return false;
91
  }
92
 
93
- return $ip;
94
  }
95
 
96
  /**
86
 
87
  $ipv4_pattern = '/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/';
88
 
89
+ if ( ! preg_match( $ipv4_pattern, $ip_address ) && ! Requests_IPv6::check_ipv6( $ip_address ) ) {
90
  return false;
91
  }
92
 
93
+ return $ip_address;
94
  }
95
 
96
  /**
includes/class-wc-order-item-meta.php CHANGED
@@ -148,7 +148,7 @@ class WC_Order_Item_Meta {
148
  */
149
  public function get_formatted_legacy( $hideprefix = '_' ) {
150
  if ( ! is_ajax() ) {
151
- wc_deprecated_function( 'get_formatted_legacy', '2.4', 'Item Meta Data is being called with legacy arguments' );
152
  }
153
 
154
  $formatted_meta = array();
148
  */
149
  public function get_formatted_legacy( $hideprefix = '_' ) {
150
  if ( ! is_ajax() ) {
151
+ wc_deprecated_argument( 'WC_Order_Item_Meta::get_formatted', '2.4', 'Item Meta Data is being called with legacy arguments' );
152
  }
153
 
154
  $formatted_meta = array();
includes/class-wc-order-item-product.php CHANGED
@@ -109,7 +109,7 @@ class WC_Order_Item_Product extends WC_Order_Item {
109
  $this->set_prop( 'total', floatval( wc_format_decimal( $value ) ) );
110
 
111
  // Subtotal cannot be less than total
112
- if ( ! $this->get_subtotal() || $this->get_subtotal() < $this->get_total() ) {
113
  $this->set_subtotal( $value );
114
  }
115
  }
109
  $this->set_prop( 'total', floatval( wc_format_decimal( $value ) ) );
110
 
111
  // Subtotal cannot be less than total
112
+ if ( '' === $this->get_subtotal() || $this->get_subtotal() < $this->get_total() ) {
113
  $this->set_subtotal( $value );
114
  }
115
  }
includes/class-wc-order-item-shipping.php CHANGED
@@ -97,7 +97,7 @@ class WC_Order_Item_Shipping extends WC_Order_Item {
97
  $tax_data = array(
98
  'total' => array(),
99
  );
100
- if ( ! empty( $raw_tax_data['total'] ) ) {
101
  $tax_data['total'] = array_map( 'wc_format_decimal', $raw_tax_data['total'] );
102
  } elseif ( ! empty( $raw_tax_data ) && is_array( $raw_tax_data ) ) {
103
  // Older versions just used an array.
97
  $tax_data = array(
98
  'total' => array(),
99
  );
100
+ if ( isset( $raw_tax_data['total'] ) ) {
101
  $tax_data['total'] = array_map( 'wc_format_decimal', $raw_tax_data['total'] );
102
  } elseif ( ! empty( $raw_tax_data ) && is_array( $raw_tax_data ) ) {
103
  // Older versions just used an array.
includes/class-wc-order-item.php CHANGED
@@ -294,7 +294,7 @@ class WC_Order_Item extends WC_Data implements ArrayAccess {
294
  $return = array();
295
 
296
  foreach ( $this->meta_data as $meta ) {
297
- $return[ $meta->key ] = $meta;
298
  }
299
 
300
  return $return;
294
  $return = array();
295
 
296
  foreach ( $this->meta_data as $meta ) {
297
+ $return[ $meta->id ] = $meta;
298
  }
299
 
300
  return $return;
includes/class-wc-post-data.php CHANGED
@@ -52,6 +52,10 @@ class WC_Post_Data {
52
 
53
  // Download permissions
54
  add_action( 'woocommerce_process_product_file_download_paths', array( __CLASS__, 'process_product_file_download_paths' ), 10, 3 );
 
 
 
 
55
  }
56
 
57
  /**
@@ -433,6 +437,17 @@ class WC_Post_Data {
433
  }
434
  }
435
  }
 
 
 
 
 
 
 
 
 
 
 
436
  }
437
 
438
  WC_Post_Data::init();
52
 
53
  // Download permissions
54
  add_action( 'woocommerce_process_product_file_download_paths', array( __CLASS__, 'process_product_file_download_paths' ), 10, 3 );
55
+
56
+ // Meta cache flushing.
57
+ add_action( 'updated_post_meta', array( __CLASS__, 'flush_object_meta_cache' ), 10, 4 );
58
+ add_action( 'updated_order_item_meta', array( __CLASS__, 'flush_object_meta_cache' ), 10, 4 );
59
  }
60
 
61
  /**
437
  }
438
  }
439
  }
440
+
441
+ /**
442
+ * Flush meta cache for CRUD objects on direct update.
443
+ * @param int $meta_id
444
+ * @param int $object_id
445
+ * @param string $meta_key
446
+ * @param string $meta_value
447
+ */
448
+ public static function flush_object_meta_cache( $meta_id, $object_id, $meta_key, $meta_value ) {
449
+ WC_Cache_Helper::incr_cache_prefix( 'object_' . $object_id );
450
+ }
451
  }
452
 
453
  WC_Post_Data::init();
includes/class-wc-product-attribute.php CHANGED
@@ -73,7 +73,8 @@ class WC_Product_Attribute implements ArrayAccess {
73
  if ( is_int( $option ) ) {
74
  $term = get_term_by( 'id', $option, $this->get_name() );
75
  } else {
76
- $term = get_term_by( 'name', $option, $this->get_name() );
 
77
 
78
  if ( ! $term || is_wp_error( $term ) ) {
79
  $new_term = wp_insert_term( $option, $this->get_name() );
73
  if ( is_int( $option ) ) {
74
  $term = get_term_by( 'id', $option, $this->get_name() );
75
  } else {
76
+ // Term names get escaped in WP. See sanitize_term_field.
77
+ $term = get_term_by( 'name', esc_attr( $option ), $this->get_name() );
78
 
79
  if ( ! $term || is_wp_error( $term ) ) {
80
  $new_term = wp_insert_term( $option, $this->get_name() );
includes/class-wc-product-grouped.php CHANGED
@@ -79,7 +79,7 @@ class WC_Product_Grouped extends WC_Product {
79
 
80
  foreach ( $this->get_children() as $child_id ) {
81
  $child = wc_get_product( $child_id );
82
- if ( '' !== $child->get_price() ) {
83
  $child_prices[] = 'incl' === $tax_display_mode ? wc_get_price_including_tax( $child ) : wc_get_price_excluding_tax( $child );
84
  }
85
  }
79
 
80
  foreach ( $this->get_children() as $child_id ) {
81
  $child = wc_get_product( $child_id );
82
+ if ( $child && '' !== $child->get_price() ) {
83
  $child_prices[] = 'incl' === $tax_display_mode ? wc_get_price_including_tax( $child ) : wc_get_price_excluding_tax( $child );
84
  }
85
  }
includes/class-wc-product-variation.php CHANGED
@@ -39,6 +39,7 @@ class WC_Product_Variation extends WC_Product_Simple {
39
  'tax_class' => '',
40
  'shipping_class_id' => '',
41
  'image_id' => '',
 
42
  );
43
 
44
  /**
@@ -319,6 +320,23 @@ class WC_Product_Variation extends WC_Product_Simple {
319
  return $image_id;
320
  }
321
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
322
  /**
323
  * Get shipping class ID.
324
  *
39
  'tax_class' => '',
40
  'shipping_class_id' => '',
41
  'image_id' => '',
42
+ 'purchase_note' => '',
43
  );
44
 
45
  /**
320
  return $image_id;
321
  }
322
 
323
+ /**
324
+ * Get purchase note.
325
+ *
326
+ * @since 3.0.0
327
+ * @param string $context
328
+ * @return string
329
+ */
330
+ public function get_purchase_note( $context = 'view' ) {
331
+ $value = $this->get_prop( 'purchase_note', $context );
332
+
333
+ // Inherit value from parent.
334
+ if ( 'view' === $context && empty( $value ) ) {
335
+ $value = apply_filters( $this->get_hook_prefix() . 'purchase_note', $this->parent_data['purchase_note'], $this );
336
+ }
337
+ return $value;
338
+ }
339
+
340
  /**
341
  * Get shipping class ID.
342
  *
includes/class-wc-shipping-zone.php CHANGED
@@ -418,8 +418,13 @@ class WC_Shipping_Zone extends WC_Legacy_Shipping_Zone {
418
  return false;
419
  }
420
 
421
- $this->data_store->delete_method( $instance_id );
422
- do_action( 'woocommerce_shipping_zone_method_deleted', $instance_id, $this->get_id() );
 
 
 
 
 
423
 
424
  WC_Cache_Helper::get_transient_version( 'shipping', true );
425
 
418
  return false;
419
  }
420
 
421
+ // Get method details.
422
+ $method = $this->data_store->get_method( $instance_id );
423
+
424
+ if ( $method ) {
425
+ $this->data_store->delete_method( $instance_id );
426
+ do_action( 'woocommerce_shipping_zone_method_deleted', $instance_id, $method->method_id, $this->get_id() );
427
+ }
428
 
429
  WC_Cache_Helper::get_transient_version( 'shipping', true );
430
 
includes/class-wc-shortcodes.php CHANGED
@@ -395,7 +395,7 @@ class WC_Shortcodes {
395
 
396
  ob_start();
397
 
398
- $products = new WP_Query( apply_filters( 'woocommerce_shortcode_products_query', $args, $atts ) );
399
 
400
  if ( $products->have_posts() ) : ?>
401
 
395
 
396
  ob_start();
397
 
398
+ $products = new WP_Query( apply_filters( 'woocommerce_shortcode_products_query', $args, $atts, null ) );
399
 
400
  if ( $products->have_posts() ) : ?>
401
 
includes/class-wc-structured-data.php CHANGED
@@ -258,7 +258,7 @@ class WC_Structured_Data {
258
  $markup['description'] = get_comment_text( $comment->comment_ID );
259
  $markup['itemReviewed'] = array(
260
  '@type' => 'Product',
261
- 'name' => get_the_title( $comment->post_ID ),
262
  );
263
  if ( $rating = get_comment_meta( $comment->comment_ID, 'rating', true ) ) {
264
  $markup['reviewRating'] = array(
258
  $markup['description'] = get_comment_text( $comment->comment_ID );
259
  $markup['itemReviewed'] = array(
260
  '@type' => 'Product',
261
+ 'name' => get_the_title( $comment->comment_post_ID ),
262
  );
263
  if ( $rating = get_comment_meta( $comment->comment_ID, 'rating', true ) ) {
264
  $markup['reviewRating'] = array(
includes/class-wc-webhook.php CHANGED
@@ -421,7 +421,7 @@ class WC_Webhook {
421
  // save request data
422
  add_comment_meta( $delivery_id, '_request_method', $request['method'] );
423
  add_comment_meta( $delivery_id, '_request_headers', array_merge( array( 'User-Agent' => $request['user-agent'] ), $request['headers'] ) );
424
- add_comment_meta( $delivery_id, '_request_body', $request['body'] );
425
 
426
  // parse response
427
  if ( is_wp_error( $response ) ) {
421
  // save request data
422
  add_comment_meta( $delivery_id, '_request_method', $request['method'] );
423
  add_comment_meta( $delivery_id, '_request_headers', array_merge( array( 'User-Agent' => $request['user-agent'] ), $request['headers'] ) );
424
+ add_comment_meta( $delivery_id, '_request_body', wp_slash( $request['body'] ) );
425
 
426
  // parse response
427
  if ( is_wp_error( $response ) ) {
includes/data-stores/abstract-wc-order-data-store-cpt.php CHANGED
@@ -162,6 +162,10 @@ abstract class Abstract_WC_Order_Data_Store_CPT extends WC_Data_Store_WP impleme
162
  'force_delete' => false,
163
  ) );
164
 
 
 
 
 
165
  if ( $args['force_delete'] ) {
166
  wp_delete_post( $id );
167
  $order->set_id( 0 );
162
  'force_delete' => false,
163
  ) );
164
 
165
+ if ( ! $id ) {
166
+ return;
167
+ }
168
+
169
  if ( $args['force_delete'] ) {
170
  wp_delete_post( $id );
171
  $order->set_id( 0 );
includes/data-stores/class-wc-coupon-data-store-cpt.php CHANGED
@@ -175,12 +175,16 @@ class WC_Coupon_Data_Store_CPT extends WC_Data_Store_WP implements WC_Coupon_Dat
175
 
176
  $id = $coupon->get_id();
177
 
 
 
 
 
178
  if ( $args['force_delete'] ) {
179
- wp_delete_post( $coupon->get_id() );
180
  $coupon->set_id( 0 );
181
  do_action( 'woocommerce_delete_coupon', $id );
182
  } else {
183
- wp_trash_post( $coupon->get_id() );
184
  do_action( 'woocommerce_trash_coupon', $id );
185
  }
186
  }
175
 
176
  $id = $coupon->get_id();
177
 
178
+ if ( ! $id ) {
179
+ return;
180
+ }
181
+
182
  if ( $args['force_delete'] ) {
183
+ wp_delete_post( $id );
184
  $coupon->set_id( 0 );
185
  do_action( 'woocommerce_delete_coupon', $id );
186
  } else {
187
+ wp_trash_post( $id );
188
  do_action( 'woocommerce_trash_coupon', $id );
189
  }
190
  }
includes/data-stores/class-wc-customer-data-store-session.php CHANGED
@@ -17,6 +17,7 @@ class WC_Customer_Data_Store_Session extends WC_Data_Store_WP implements WC_Cust
17
  * @var array
18
  */
19
  protected $session_keys = array(
 
20
  'billing_postcode',
21
  'billing_city',
22
  'billing_address_1',
@@ -81,24 +82,22 @@ class WC_Customer_Data_Store_Session extends WC_Data_Store_WP implements WC_Cust
81
  }
82
 
83
  /**
84
- * Read customer data from the session.
 
85
  *
86
  * @since 3.0.0
87
  * @param WC_Customer
88
  */
89
  public function read( &$customer ) {
90
  $data = (array) WC()->session->get( 'customer' );
91
- if ( ! empty( $data ) ) {
92
  foreach ( $this->session_keys as $session_key ) {
93
  $function_key = $session_key;
94
  if ( 'billing_' === substr( $session_key, 0, 8 ) ) {
95
  $session_key = str_replace( 'billing_', '', $session_key );
96
  }
97
  if ( ! empty( $data[ $session_key ] ) && is_callable( array( $customer, "set_{$function_key}" ) ) ) {
98
- // Only set from session if data is already missing.
99
- if ( ! $customer->{"get_{$function_key}"}() ) {
100
- $customer->{"set_{$function_key}"}( $data[ $session_key ] );
101
- }
102
  }
103
  }
104
  }
17
  * @var array
18
  */
19
  protected $session_keys = array(
20
+ 'id',
21
  'billing_postcode',
22
  'billing_city',
23
  'billing_address_1',
82
  }
83
 
84
  /**
85
+ * Read customer data from the session unless the user has logged in, in
86
+ * which case the stored ID will differ from the actual ID.
87
  *
88
  * @since 3.0.0
89
  * @param WC_Customer
90
  */
91
  public function read( &$customer ) {
92
  $data = (array) WC()->session->get( 'customer' );
93
+ if ( ! empty( $data ) && isset( $data['id'] ) && $data['id'] === $customer->get_id() ) {
94
  foreach ( $this->session_keys as $session_key ) {
95
  $function_key = $session_key;
96
  if ( 'billing_' === substr( $session_key, 0, 8 ) ) {
97
  $session_key = str_replace( 'billing_', '', $session_key );
98
  }
99
  if ( ! empty( $data[ $session_key ] ) && is_callable( array( $customer, "set_{$function_key}" ) ) ) {
100
+ $customer->{"set_{$function_key}"}( $data[ $session_key ] );
 
 
 
101
  }
102
  }
103
  }
includes/data-stores/class-wc-order-refund-data-store-cpt.php CHANGED
@@ -41,6 +41,10 @@ class WC_Order_Refund_Data_Store_CPT extends Abstract_WC_Order_Data_Store_CPT im
41
  public function delete( &$order, $args = array() ) {
42
  $id = $order->get_id();
43
 
 
 
 
 
44
  wp_delete_post( $id );
45
  $order->set_id( 0 );
46
  do_action( 'woocommerce_delete_order_refund', $id );
41
  public function delete( &$order, $args = array() ) {
42
  $id = $order->get_id();
43
 
44
+ if ( ! $id ) {
45
+ return;
46
+ }
47
+
48
  wp_delete_post( $id );
49
  $order->set_id( 0 );
50
  do_action( 'woocommerce_delete_order_refund', $id );
includes/data-stores/class-wc-product-data-store-cpt.php CHANGED
@@ -233,12 +233,16 @@ class WC_Product_Data_Store_CPT extends WC_Data_Store_WP implements WC_Object_Da
233
  'force_delete' => false,
234
  ) );
235
 
 
 
 
 
236
  if ( $args['force_delete'] ) {
237
- wp_delete_post( $product->get_id() );
238
  $product->set_id( 0 );
239
  do_action( 'woocommerce_delete_' . $post_type, $id );
240
  } else {
241
- wp_trash_post( $product->get_id() );
242
  $product->set_status( 'trash' );
243
  do_action( 'woocommerce_trash_' . $post_type, $id );
244
  }
233
  'force_delete' => false,
234
  ) );
235
 
236
+ if ( ! $id ) {
237
+ return;
238
+ }
239
+
240
  if ( $args['force_delete'] ) {
241
+ wp_delete_post( $id );
242
  $product->set_id( 0 );
243
  do_action( 'woocommerce_delete_' . $post_type, $id );
244
  } else {
245
+ wp_trash_post( $id );
246
  $product->set_status( 'trash' );
247
  do_action( 'woocommerce_trash_' . $post_type, $id );
248
  }
includes/data-stores/class-wc-product-variation-data-store-cpt.php CHANGED
@@ -203,11 +203,12 @@ class WC_Product_Variation_Data_Store_CPT extends WC_Product_Data_Store_CPT impl
203
  protected function generate_product_title( $product ) {
204
  $attributes = (array) $product->get_attributes();
205
 
206
- // Don't include attributes if the product has 3+ attributes.
207
  $should_include_attributes = count( $attributes ) < 3;
208
 
209
- // Don't include attributes if an attribute name has 2+ words.
210
- if ( $should_include_attributes ) {
 
211
  foreach ( $attributes as $name => $value ) {
212
  if ( false !== strpos( $name, '-' ) ) {
213
  $should_include_attributes = false;
@@ -279,7 +280,7 @@ class WC_Product_Variation_Data_Store_CPT extends WC_Product_Data_Store_CPT impl
279
  'sku' => get_post_meta( $product->get_parent_id(), '_sku', true ),
280
  'manage_stock' => get_post_meta( $product->get_parent_id(), '_manage_stock', true ),
281
  'backorders' => get_post_meta( $product->get_parent_id(), '_backorders', true ),
282
- 'stock_quantity' => get_post_meta( $product->get_parent_id(), '_stock', true ),
283
  'weight' => get_post_meta( $product->get_parent_id(), '_weight', true ),
284
  'length' => get_post_meta( $product->get_parent_id(), '_length', true ),
285
  'width' => get_post_meta( $product->get_parent_id(), '_width', true ),
@@ -287,6 +288,7 @@ class WC_Product_Variation_Data_Store_CPT extends WC_Product_Data_Store_CPT impl
287
  'tax_class' => get_post_meta( $product->get_parent_id(), '_tax_class', true ),
288
  'shipping_class_id' => absint( current( $this->get_term_ids( $product->get_parent_id(), 'product_shipping_class' ) ) ),
289
  'image_id' => get_post_thumbnail_id( $product->get_parent_id() ),
 
290
  ) );
291
 
292
  // Pull data from the parent when there is no user-facing way to set props.
203
  protected function generate_product_title( $product ) {
204
  $attributes = (array) $product->get_attributes();
205
 
206
+ // Do not include attributes if the product has 3+ attributes.
207
  $should_include_attributes = count( $attributes ) < 3;
208
 
209
+ // Do not include attributes if an attribute name has 2+ words and the
210
+ // product has multiple attributes.
211
+ if ( $should_include_attributes && 1 < count( $attributes ) ) {
212
  foreach ( $attributes as $name => $value ) {
213
  if ( false !== strpos( $name, '-' ) ) {
214
  $should_include_attributes = false;
280
  'sku' => get_post_meta( $product->get_parent_id(), '_sku', true ),
281
  'manage_stock' => get_post_meta( $product->get_parent_id(), '_manage_stock', true ),
282
  'backorders' => get_post_meta( $product->get_parent_id(), '_backorders', true ),
283
+ 'stock_quantity' => wc_stock_amount( get_post_meta( $product->get_parent_id(), '_stock', true ) ),
284
  'weight' => get_post_meta( $product->get_parent_id(), '_weight', true ),
285
  'length' => get_post_meta( $product->get_parent_id(), '_length', true ),
286
  'width' => get_post_meta( $product->get_parent_id(), '_width', true ),
288
  'tax_class' => get_post_meta( $product->get_parent_id(), '_tax_class', true ),
289
  'shipping_class_id' => absint( current( $this->get_term_ids( $product->get_parent_id(), 'product_shipping_class' ) ) ),
290
  'image_id' => get_post_thumbnail_id( $product->get_parent_id() ),
291
+ 'purchase_note' => get_post_meta( $product->get_parent_id(), '_purchase_note', true ),
292
  ) );
293
 
294
  // Pull data from the parent when there is no user-facing way to set props.
includes/emails/class-wc-email-cancelled-order.php CHANGED
@@ -32,7 +32,7 @@ class WC_Email_Cancelled_Order extends WC_Email {
32
  $this->template_plain = 'emails/plain/admin-cancelled-order.php';
33
 
34
  // Triggers for this email
35
- add_action( 'woocommerce_order_status_pending_to_cancelled_notification', array( $this, 'trigger' ), 10, 2 );
36
  add_action( 'woocommerce_order_status_on-hold_to_cancelled_notification', array( $this, 'trigger' ), 10, 2 );
37
 
38
  // Call parent constructor
32
  $this->template_plain = 'emails/plain/admin-cancelled-order.php';
33
 
34
  // Triggers for this email
35
+ add_action( 'woocommerce_order_status_processing_to_cancelled_notification', array( $this, 'trigger' ), 10, 2 );
36
  add_action( 'woocommerce_order_status_on-hold_to_cancelled_notification', array( $this, 'trigger' ), 10, 2 );
37
 
38
  // Call parent constructor
includes/emails/class-wc-email-customer-processing-order.php CHANGED
@@ -33,6 +33,7 @@ class WC_Email_Customer_Processing_Order extends WC_Email {
33
  $this->template_plain = 'emails/plain/customer-processing-order.php';
34
 
35
  // Triggers for this email
 
36
  add_action( 'woocommerce_order_status_on-hold_to_processing_notification', array( $this, 'trigger' ), 10, 2 );
37
  add_action( 'woocommerce_order_status_pending_to_processing_notification', array( $this, 'trigger' ), 10, 2 );
38
 
33
  $this->template_plain = 'emails/plain/customer-processing-order.php';
34
 
35
  // Triggers for this email
36
+ add_action( 'woocommerce_order_status_failed_to_processing_notification', array( $this, 'trigger' ), 10, 2 );
37
  add_action( 'woocommerce_order_status_on-hold_to_processing_notification', array( $this, 'trigger' ), 10, 2 );
38
  add_action( 'woocommerce_order_status_pending_to_processing_notification', array( $this, 'trigger' ), 10, 2 );
39
 
includes/wc-order-functions.php CHANGED
@@ -694,7 +694,7 @@ function wc_get_tax_class_by_tax_id( $tax_id ) {
694
  */
695
  function wc_get_payment_gateway_by_order( $order ) {
696
  if ( WC()->payment_gateways() ) {
697
- $payment_gateways = WC()->payment_gateways->payment_gateways();
698
  } else {
699
  $payment_gateways = array();
700
  }
694
  */
695
  function wc_get_payment_gateway_by_order( $order ) {
696
  if ( WC()->payment_gateways() ) {
697
+ $payment_gateways = WC()->payment_gateways()->payment_gateways();
698
  } else {
699
  $payment_gateways = array();
700
  }
includes/wc-order-item-functions.php CHANGED
@@ -97,8 +97,7 @@ function wc_delete_order_item( $item_id ) {
97
  function wc_update_order_item_meta( $item_id, $meta_key, $meta_value, $prev_value = '' ) {
98
  $data_store = WC_Data_Store::load( 'order-item' );
99
  if ( $data_store->update_metadata( $item_id, $meta_key, $meta_value, $prev_value ) ) {
100
- $cache_key = WC_Cache_Helper::get_cache_prefix( 'order-items' ) . 'object_meta_' . $item_id;
101
- wp_cache_delete( $cache_key, 'order-items' );
102
  return true;
103
  }
104
  return false;
@@ -117,8 +116,7 @@ function wc_update_order_item_meta( $item_id, $meta_key, $meta_value, $prev_valu
117
  function wc_add_order_item_meta( $item_id, $meta_key, $meta_value, $unique = false ) {
118
  $data_store = WC_Data_Store::load( 'order-item' );
119
  if ( $meta_id = $data_store->add_metadata( $item_id, $meta_key, $meta_value, $unique ) ) {
120
- $cache_key = WC_Cache_Helper::get_cache_prefix( 'order-items' ) . 'object_meta_' . $item_id;
121
- wp_cache_delete( $cache_key, 'order-items' );
122
  return $meta_id;
123
  }
124
  return 0;
@@ -137,8 +135,7 @@ function wc_add_order_item_meta( $item_id, $meta_key, $meta_value, $unique = fal
137
  function wc_delete_order_item_meta( $item_id, $meta_key, $meta_value = '', $delete_all = false ) {
138
  $data_store = WC_Data_Store::load( 'order-item' );
139
  if ( $data_store->delete_metadata( $item_id, $meta_key, $meta_value, $delete_all ) ) {
140
- $cache_key = WC_Cache_Helper::get_cache_prefix( 'order-items' ) . 'object_meta_' . $item_id;
141
- wp_cache_delete( $cache_key, 'order-items' );
142
  return true;
143
  }
144
  return false;
97
  function wc_update_order_item_meta( $item_id, $meta_key, $meta_value, $prev_value = '' ) {
98
  $data_store = WC_Data_Store::load( 'order-item' );
99
  if ( $data_store->update_metadata( $item_id, $meta_key, $meta_value, $prev_value ) ) {
100
+ WC_Cache_Helper::incr_cache_prefix( 'object_' . $item_id ); // Invalidate cache.
 
101
  return true;
102
  }
103
  return false;
116
  function wc_add_order_item_meta( $item_id, $meta_key, $meta_value, $unique = false ) {
117
  $data_store = WC_Data_Store::load( 'order-item' );
118
  if ( $meta_id = $data_store->add_metadata( $item_id, $meta_key, $meta_value, $unique ) ) {
119
+ WC_Cache_Helper::incr_cache_prefix( 'object_' . $item_id ); // Invalidate cache.
 
120
  return $meta_id;
121
  }
122
  return 0;
135
  function wc_delete_order_item_meta( $item_id, $meta_key, $meta_value = '', $delete_all = false ) {
136
  $data_store = WC_Data_Store::load( 'order-item' );
137
  if ( $data_store->delete_metadata( $item_id, $meta_key, $meta_value, $delete_all ) ) {
138
+ WC_Cache_Helper::incr_cache_prefix( 'object_' . $item_id ); // Invalidate cache.
 
139
  return true;
140
  }
141
  return false;
includes/wc-rest-functions.php CHANGED
@@ -218,8 +218,7 @@ function wc_rest_urlencode_rfc3986( $value ) {
218
  if ( is_array( $value ) ) {
219
  return array_map( 'wc_rest_urlencode_rfc3986', $value );
220
  } else {
221
- // Percent symbols (%) must be double-encoded.
222
- return str_replace( '%', '%25', rawurlencode( rawurldecode( $value ) ) );
223
  }
224
  }
225
 
218
  if ( is_array( $value ) ) {
219
  return array_map( 'wc_rest_urlencode_rfc3986', $value );
220
  } else {
221
+ return str_replace( array( '+', '%7E' ), array( ' ', '~' ), rawurlencode( $value ) );
 
222
  }
223
  }
224
 
includes/widgets/class-wc-widget-price-filter.php CHANGED
@@ -137,7 +137,7 @@ class WC_Widget_Price_Filter extends WC_Widget {
137
  $tax_query = isset( $args['tax_query'] ) ? $args['tax_query'] : array();
138
  $meta_query = isset( $args['meta_query'] ) ? $args['meta_query'] : array();
139
 
140
- if ( ! empty( $args['taxonomy'] ) && ! empty( $args['term'] ) ) {
141
  $tax_query[] = array(
142
  'taxonomy' => $args['taxonomy'],
143
  'terms' => array( $args['term'] ),
137
  $tax_query = isset( $args['tax_query'] ) ? $args['tax_query'] : array();
138
  $meta_query = isset( $args['meta_query'] ) ? $args['meta_query'] : array();
139
 
140
+ if ( ! is_post_type_archive( 'product' ) && ! empty( $args['taxonomy'] ) && ! empty( $args['term'] ) ) {
141
  $tax_query[] = array(
142
  'taxonomy' => $args['taxonomy'],
143
  'terms' => array( $args['term'] ),
includes/widgets/class-wc-widget-recent-reviews.php CHANGED
@@ -60,7 +60,7 @@ class WC_Widget_Recent_Reviews extends WC_Widget {
60
  ob_start();
61
 
62
  $number = ! empty( $instance['number'] ) ? absint( $instance['number'] ) : $this->settings['number']['std'];
63
- $comments = get_comments( array( 'number' => $number, 'status' => 'approve', 'post_status' => 'publish', 'post_type' => 'product' ) );
64
 
65
  if ( $comments ) {
66
  $this->widget_start( $args, $instance );
60
  ob_start();
61
 
62
  $number = ! empty( $instance['number'] ) ? absint( $instance['number'] ) : $this->settings['number']['std'];
63
+ $comments = get_comments( array( 'number' => $number, 'status' => 'approve', 'post_status' => 'publish', 'post_type' => 'product', 'parent' => 0 ) );
64
 
65
  if ( $comments ) {
66
  $this->widget_start( $args, $instance );
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: automattic, mikejolley, jameskoster, claudiosanches, jshreve, coderkevin, claudiulodro, woothemes, iCaleb
3
  Tags: ecommerce, e-commerce, store, sales, sell, shop, cart, checkout, downloadable, downloads, paypal, storefront, woo commerce
4
  Requires at least: 4.4
5
- Tested up to: 4.7
6
- Stable tag: 3.0.7
7
  License: GPLv3
8
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -161,6 +161,36 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woocommerce/wo
161
 
162
  == Changelog ==
163
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
  = 3.0.7 - 2017-05-16 =
165
  * Fix - Display of grouped product permalinks + names.
166
  * Fix - Ensure `wc_get_payment_gateway_by_order` has a valid order ID to avoid errors.
@@ -429,5 +459,5 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woocommerce/wo
429
 
430
  == Upgrade Notice ==
431
 
432
- = 3.0.7 =
433
  3.0 is a major update. Make a full site backup, update your theme and extensions, and [review update best practices](https://docs.woocommerce.com/document/how-to-update-your-site) before upgrading.
2
  Contributors: automattic, mikejolley, jameskoster, claudiosanches, jshreve, coderkevin, claudiulodro, woothemes, iCaleb
3
  Tags: ecommerce, e-commerce, store, sales, sell, shop, cart, checkout, downloadable, downloads, paypal, storefront, woo commerce
4
  Requires at least: 4.4
5
+ Tested up to: 4.8
6
+ Stable tag: 3.0.8
7
  License: GPLv3
8
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
9
 
161
 
162
  == Changelog ==
163
 
164
+ = 3.0.8 - 2017-06-06 =
165
+ * Fix - Include multi-dimensional array support in oAuth1.0.
166
+ * Fix - Stock/backorder notice when stock management is disabled.
167
+ * Fix - Handle shipping item taxes if set to avoid the legacy fallback.
168
+ * Fix - Variations should inherit purchase_note from parent.
169
+ * Fix - Check if subtotal is blank, not empty, before setting for order items.
170
+ * Fix - Cancelled email should be send for processing orders, not pending.
171
+ * Fix - Missing variable in legacy API.
172
+ * Fix - Correct price query when on a post type archive.
173
+ * Fix - Missing $ip Variable in geolocation class.
174
+ * Fix - A single multi-word attribute is fine for variation titles.
175
+ * Fix - Gallery should be updated even if empty in REST API.
176
+ * Fix - Fix saving of text attributes with special chars.
177
+ * Fix - Undefined index warning when saving variations with stock management disabled.
178
+ * Fix - Use meta id instead of key in WC_Order_Item::offsetGet.
179
+ * Fix - Format parent stock qty on read.
180
+ * Fix - Hide replies from recent reviews widgets.
181
+ * Fix - Use formatted weight and dimensions for variations.
182
+ * Fix - Ensure we have child before getting price to fix a notice in grouped products.
183
+ * Fix - Fixed unicode characters when saving webhook delivery logs.
184
+ * Fix - Avoid deprecated ID in legacy API.
185
+ * Fix - Add correct args to woocommerce_shipping_zone_method_deleted and woocommerce_shortcode_products_query hooks.
186
+ * Fix - Correctly append cache in product widget.
187
+ * Fix - Add ability to invalidate cache by object ID.
188
+ * Fix - Notice in structured data class.
189
+ * Fix - Only delete if an object has an ID in CRUD to avoid wp_delete_post using global ID.
190
+ * Fix - Avoid notices on checkout by ensuring all legacy data is correctly set.
191
+ * Fix - Add failed to processing event for the processing email.
192
+ * Fix - Store user ID and use that to determine if the session should be loaded or not. Ensures user data is correct and shipping calculator data is stored.
193
+
194
  = 3.0.7 - 2017-05-16 =
195
  * Fix - Display of grouped product permalinks + names.
196
  * Fix - Ensure `wc_get_payment_gateway_by_order` has a valid order ID to avoid errors.
459
 
460
  == Upgrade Notice ==
461
 
462
+ = 3.0.8 =
463
  3.0 is a major update. Make a full site backup, update your theme and extensions, and [review update best practices](https://docs.woocommerce.com/document/how-to-update-your-site) before upgrading.
woocommerce.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WooCommerce
4
  * Plugin URI: https://woocommerce.com/
5
  * Description: An e-commerce toolkit that helps you sell anything. Beautifully.
6
- * Version: 3.0.7
7
  * Author: Automattic
8
  * Author URI: https://woocommerce.com
9
  * Requires at least: 4.4
@@ -35,7 +35,7 @@ final class WooCommerce {
35
  *
36
  * @var string
37
  */
38
- public $version = '3.0.7';
39
 
40
  /**
41
  * The single instance of the class.
3
  * Plugin Name: WooCommerce
4
  * Plugin URI: https://woocommerce.com/
5
  * Description: An e-commerce toolkit that helps you sell anything. Beautifully.
6
+ * Version: 3.0.8
7
  * Author: Automattic
8
  * Author URI: https://woocommerce.com
9
  * Requires at least: 4.4
35
  *
36
  * @var string
37
  */
38
+ public $version = '3.0.8';
39
 
40
  /**
41
  * The single instance of the class.