Merge pull request #13623 from woocommerce/fix-13616
Update function should use = not IN
This commit is contained in:
commit
b6126832ad
|
@ -1053,7 +1053,7 @@ function wc_update_300_product_visibility() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $outofstock_term = get_term_by( 'name', 'outofstock', 'product_visibility' ) ) {
|
if ( $outofstock_term = get_term_by( 'name', 'outofstock', 'product_visibility' ) ) {
|
||||||
$wpdb->query( $wpdb->prepare( "INSERT INTO {$wpdb->term_relationships} SELECT post_id, %d, 0 FROM {$wpdb->postmeta} WHERE meta_key = '_stock_status' AND meta_value IN 'outofstock';", $outofstock_term->term_id ) );
|
$wpdb->query( $wpdb->prepare( "INSERT INTO {$wpdb->term_relationships} SELECT post_id, %d, 0 FROM {$wpdb->postmeta} WHERE meta_key = '_stock_status' AND meta_value = 'outofstock';", $outofstock_term->term_id ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $rating_term = get_term_by( 'name', 'rated-1', 'product_visibility' ) ) {
|
if ( $rating_term = get_term_by( 'name', 'rated-1', 'product_visibility' ) ) {
|
||||||
|
|
Loading…
Reference in New Issue