Fixed: get_term() returns objects not array.

This commit is contained in:
Govind Kumar 2017-04-18 13:00:04 +05:30
parent 510630ea05
commit 200cd2de63
1 changed files with 1 additions and 1 deletions

View File

@ -405,7 +405,7 @@ abstract class WC_REST_Terms_Controller extends WC_REST_Controller {
// Add term data.
$meta_fields = $this->update_term_meta_fields( $term, $request );
if ( is_wp_error( $meta_fields ) ) {
wp_delete_term( $term['term_id'], $taxonomy );
wp_delete_term( $term->term_id, $taxonomy );
return $meta_fields;
}