woocommerce_rest_prepare_data_continent

FILTER woocommerce\includes\rest-api\Controllers\Version3\class-wc-rest-data-continents-controller.php (ligne 219) github
Filter the location list returned from the API. Allows modification of the location data right before it is returned.

Paramètres

Entrée :
$response, $item, $request
Sortie :
@param WP_REST_Response $response The response object.
@param array            $item     The original list of continent(s), countries, and states.
@param WP_REST_Request  $request  Request used to generate the response.

Utilisation

// Modifier la valeur avec le filtre 'woocommerce_rest_prepare_data_continent'
add_filter('woocommerce_rest_prepare_data_continent', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre($response) {
    // Modifier la valeur
    return $response;
}

Actualités

Chargement des actualités...