Merge pull request #9149 from JeroenSormani/stock-changes

Add get_stock_quantity filter
This commit is contained in:
Mike Jolley 2015-09-17 10:57:47 +01:00
commit 0c56fe0844
1 changed files with 1 additions and 1 deletions

View File

@ -177,7 +177,7 @@ class WC_Product {
* @return int
*/
public function get_stock_quantity() {
return $this->managing_stock() ? wc_stock_amount( $this->stock ) : '';
return apply_filters( 'woocommerce_get_stock_quantity', $this->managing_stock() ? wc_stock_amount( $this->stock ) : '', $this );
}
/**