woocommerce_rest_prepare_{$this->post_type}_object

woocommerce_rest_prepare_{$this->post_type}_object

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

apply_filters('woocommerce_rest_prepare_{$this->post_type}_object') is found 7 times:

  • /includes/rest-api/Controllers/Version2/class-wc-rest-coupons-v2-controller.php line 225
    		 * @param WP_REST_Response $response The response object.
    		 * @param WC_Data          $object   Object data.
    		 * @param WP_REST_Request  $request  Request object.
    		 */
    		return apply_filters( "woocommerce_rest_prepare_{$this->post_type}_object", $response, $object, $request );
    	}
    
    	/**
    	 * Prepare objects query.
    	 *
    	 * @since  3.0.0
    
  • /includes/rest-api/Controllers/Version2/class-wc-rest-order-refunds-v2-controller.php line 227
    		 * @param WP_REST_Response $response The response object.
    		 * @param WC_Data          $object   Object data.
    		 * @param WP_REST_Request  $request  Request object.
    		 */
    		return apply_filters( "woocommerce_rest_prepare_{$this->post_type}_object", $response, $object, $request );
    	}
    
    	/**
    	 * Prepare links for the request.
    	 *
    	 * @param WC_Data         $object  Object data.
    
  • /includes/rest-api/Controllers/Version2/class-wc-rest-orders-v2-controller.php line 556
    		 * @param WP_REST_Request  $request  Request object.
    		 *
    		 * @since 4.5.0
    		 */
    		return apply_filters( "woocommerce_rest_prepare_{$this->post_type}_object", $response, $object, $request );
    	}
    
    	/**
    	 * Core method to prepare a single order object for response
    	 * (doesn't fire hooks, execute rest_ensure_response, or add links).
    	 *
    
  • /includes/rest-api/Controllers/Version2/class-wc-rest-product-variations-v2-controller.php line 289
    		 * @param WP_REST_Response $response The response object.
    		 * @param WC_Data          $object   Object data.
    		 * @param WP_REST_Request  $request  Request object.
    		 */
    		return apply_filters( "woocommerce_rest_prepare_{$this->post_type}_object", $response, $object, $request );
    	}
    
    	/**
    	 * Prepare objects query.
    	 *
    	 * @since  3.0.0
    
  • /includes/rest-api/Controllers/Version2/class-wc-rest-products-v2-controller.php line 181
    		 * @param WP_REST_Response $response The response object.
    		 * @param WC_Data          $object   Object data.
    		 * @param WP_REST_Request  $request  Request object.
    		 */
    		return apply_filters( "woocommerce_rest_prepare_{$this->post_type}_object", $response, $object, $request );
    	}
    
    	/**
    	 * Core function to prepare a single product output for response
    	 * (doesn't fire hooks, ensure_response, or add links).
    	 *
    
  • /includes/rest-api/Controllers/Version3/class-wc-rest-product-variations-controller.php line 175
    		 * @param WP_REST_Response $response The response object.
    		 * @param WC_Data          $object   Object data.
    		 * @param WP_REST_Request  $request  Request object.
    		 */
    		return apply_filters( "woocommerce_rest_prepare_{$this->post_type}_object", $response, $object, $request );
    	}
    
    	/**
    	 * Prepare a single variation for create or update.
    	 *
    	 * @param  WP_REST_Request $request Request object.
    
  • /includes/rest-api/Controllers/Version3/class-wc-rest-refunds-controller.php line 113
    		$response->add_links( $this->prepare_links( $refund, $request ) );
    
    		// phpcs:disable WooCommerce.Commenting.CommentHooks.MissingSinceComment
    		/** This filter is documented in includes/rest-api/Controllers/Version2/class-wc-rest-order-refunds-v2-controller.php */
    		return apply_filters( "woocommerce_rest_prepare_{$this->post_type}_object", $response, $refund, $request );
    		// phpcs:enable WooCommerce.Commenting.CommentHooks.MissingSinceComment
    	}
    
    	/**
    	 * Get formatted item data.
    	 *