From 893babaaef858e255f6c555b576a17a8757c53d1 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 10 Feb 2015 11:18:35 +0000 Subject: [PATCH] woocommerce_product_get_weight filter Closes #7319 --- includes/abstracts/abstract-wc-product.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/abstracts/abstract-wc-product.php b/includes/abstracts/abstract-wc-product.php index 50d0d6334f5..bd8a0d1648a 100644 --- a/includes/abstracts/abstract-wc-product.php +++ b/includes/abstracts/abstract-wc-product.php @@ -701,11 +701,11 @@ class WC_Product { /** * Returns the product's weight. - * + * @todo refactor filters in this class to naming woocommerce_product_METHOD * @return string */ public function get_weight() { - return ( $this->weight ) ? $this->weight : ''; + return apply_filters( 'woocommerce_product_get_weight', $this->weight ? $this->weight : '' ); } /**