Revert changes on includes/api/class-wc-rest-product-categories-controller.php

This commit is contained in:
Claudio Sanches 2019-04-23 16:19:41 -03:00
parent 0fdf47294a
commit eeb6f5d15c
1 changed files with 3 additions and 3 deletions

View File

@ -34,10 +34,10 @@ class WC_REST_Product_Categories_Controller extends WC_REST_Product_Categories_V
*/
public function prepare_item_for_response( $item, $request ) {
// Get category display type.
$display_type = get_term_meta( $item->term_id, 'display_type', true );
$display_type = get_term_meta( $item->term_id, 'display_type' );
// Get category order.
$menu_order = get_term_meta( $item->term_id, 'order', true );
$menu_order = get_term_meta( $item->term_id, 'order' );
$data = array(
'id' => (int) $item->term_id,
@ -52,7 +52,7 @@ class WC_REST_Product_Categories_Controller extends WC_REST_Product_Categories_V
);
// Get category image.
$image_id = get_term_meta( $item->term_id, 'thumbnail_id', true );
$image_id = get_term_meta( $item->term_id, 'thumbnail_id' );
if ( $image_id ) {
$attachment = get_post( $image_id );