Stop using update_woocommerce_term_meta
Stop using the update_woocommerce_term_meta helper function as it has been deprecated on 3.6.0
This commit is contained in:
parent
6c6785c844
commit
1a251c82ad
|
@ -223,11 +223,11 @@ class WC_REST_Product_Categories_Controller extends WC_REST_Product_Categories_V
|
|||
$id = (int) $term->term_id;
|
||||
|
||||
if ( isset( $request['display'] ) ) {
|
||||
update_woocommerce_term_meta( $id, 'display_type', 'default' === $request['display'] ? '' : $request['display'] );
|
||||
update_term_meta( $id, 'display_type', 'default' === $request['display'] ? '' : $request['display'] );
|
||||
}
|
||||
|
||||
if ( isset( $request['menu_order'] ) ) {
|
||||
update_woocommerce_term_meta( $id, 'order', $request['menu_order'] );
|
||||
update_term_meta( $id, 'order', $request['menu_order'] );
|
||||
}
|
||||
|
||||
if ( isset( $request['image'] ) ) {
|
||||
|
@ -245,7 +245,7 @@ class WC_REST_Product_Categories_Controller extends WC_REST_Product_Categories_V
|
|||
|
||||
// Check if image_id is a valid image attachment before updating the term meta.
|
||||
if ( $image_id && wp_attachment_is_image( $image_id ) ) {
|
||||
update_woocommerce_term_meta( $id, 'thumbnail_id', $image_id );
|
||||
update_term_meta( $id, 'thumbnail_id', $image_id );
|
||||
|
||||
// Set the image alt.
|
||||
if ( ! empty( $request['image']['alt'] ) ) {
|
||||
|
|
Loading…
Reference in New Issue