Trigger sync after updating meta

This commit is contained in:
Mike Jolley 2019-03-13 13:53:58 +00:00
parent 0002463c61
commit 4b2f7aedd4
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}
}