woocommerce_rest_prepare_system_status filter-hookWC 1.0

Filter the system status returned from the REST API.

Usage

add_filter( 'woocommerce_rest_prepare_system_status', 'wp_kama_woocommerce_rest_prepare_system_status_filter', 10, 3 );

/**
 * Function for `woocommerce_rest_prepare_system_status` filter-hook.
 * 
 * @param WP_REST_Response $response      The response object.
 * @param mixed            $system_status System status
 * @param WP_REST_Request  $request       Request object.
 *
 * @return WP_REST_Response
 */
function wp_kama_woocommerce_rest_prepare_system_status_filter( $response, $system_status, $request ){

	// filter...
	return $response;
}
$response(WP_REST_Response)
The response object.
$system_status(mixed)
System status
$request(WP_REST_Request)
Request object.

Where the hook is called

WC_REST_System_Status_V2_Controller::prepare_item_for_response()
woocommerce_rest_prepare_system_status
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-system-status-v2-controller.php 1362
return apply_filters( 'woocommerce_rest_prepare_system_status', $response, $system_status, $request );

Where the hook is used in WooCommerce

Usage not found.