woocommerce_customer_get_total_spent_query

FILTER woocommerce\includes\data-stores\class-wc-customer-data-store.php (ligne 513) github
Filters the SQL query used to get the combined total of all the orders from a given customer.

Paramètres

Entrée :
$sql, $customer
Sortie :
@param string The SQL query to use.
@param WC_Customer The customer to get the total spent for.
@return string The actual SQL query to use.

Utilisation

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

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

Actualités

Chargement des actualités...