Merge pull request #9149 from JeroenSormani/stock-changes
Add get_stock_quantity filter
This commit is contained in:
commit
0c56fe0844
|
@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue