New hook needed on \WC_Product_Data_Store_CPT::get_query_for_stock()
#27.040 aperta il 15 lug 2020
Metriche repository
- Star
- (10.294 stelle)
- Metriche merge PR
- (Merge medio 9g 12h) (423 PR mergiate in 30 g)
Descrizione
Since WC 4.3 and its new "reserved stock" functionality (that's great, btw), the \WC_Product_Data_Store_CPT::get_query_for_stock() method is being used internally to compare stock against the reserved stock table, but we have some plugins that are altering the stock sources and the value stored in the '_stock' meta is not the total available for these cases, so it would be great to have a filter over this SQL query to be able to change it when needed and get the correct stock there and avoid errors at checkout due to insufficient stock (when is not always correct).
Thanks.