woocommerce_analytics_orderby_enum_{$this->rest_base}

FILTER woocommerce\src\Admin\API\Reports\GenericController.php (ligne 285) github
Filter orderby query parameter enum. There was an initial concern about potential SQL injection with the custom orderby. However, testing shows it is safely blocked by validation in the controller, which results in an "Invalid parameter(s): orderby" error. Additionally, it's the responsibility of the merchant/developer to ensure the custom orderby is valid, or a WordPress database error will occur for unknown columns.

Paramètres

Entrée :
$orderby_enum
Sortie :
@param array $orderby_enum The orderby query parameter enum.

Utilisation

// Modifier la valeur avec le filtre 'woocommerce_analytics_orderby_enum_{$this->rest_base}'
add_filter('woocommerce_analytics_orderby_enum_{$this->rest_base}', 'ma_fonction_filtre', 10, 1);

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

Actualités

Chargement des actualités...