Add get_stock_quantity filter
This commit is contained in:
parent
9f1a5e3c26
commit
cb75a1e8af
|
@ -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