Add get_stock_quantity filter

This commit is contained in:
JeroenSormani 2015-09-17 10:19:04 +02:00
parent 9f1a5e3c26
commit cb75a1e8af
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 );
}
/**