Trigger sync after updating meta
This commit is contained in:
parent
0002463c61
commit
4b2f7aedd4
|
@ -554,6 +554,7 @@ class WC_Product_Variable_Data_Store_CPT extends WC_Product_Data_Store_CPT imple
|
|||
$managed_children = array_unique( $wpdb->get_col( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_manage_stock' AND meta_value != 'yes' AND post_id IN {$query_in}", $children ) ) ); // @codingStandardsIgnoreLine.
|
||||
foreach ( $managed_children as $managed_child ) {
|
||||
if ( update_post_meta( $managed_child, '_stock_status', $status ) ) {
|
||||
$this->update_lookup_table( $managed_child, 'wc_product_meta_lookup' );
|
||||
$changed = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue