Fix term name in update function

Closes #13398
This commit is contained in:
Mike Jolley 2017-03-02 15:59:19 +00:00
parent bc6e68b29c
commit 5637f043e5
1 changed files with 1 additions and 1 deletions

View File

@ -1052,7 +1052,7 @@ function wc_update_270_product_visibility() {
$wpdb->query( $wpdb->prepare( "INSERT INTO {$wpdb->term_relationships} SELECT post_id, %d, 0 FROM {$wpdb->postmeta} WHERE meta_key = '_visibility' AND meta_value IN ('hidden', 'search');", $exclude_catalog_term->term_id ) );
}
if ( $outofstock_term = get_term_by( 'name', 'out-of-stock', '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 ) );
}