woocommerce_hpos_pre_query

FILTER woocommerce\src\Internal\DataStores\Orders\OrdersTableQuery.php (ligne 241) github
Filters the orders array before the query takes place. Return a non-null value to bypass the HPOS default order queries. If the query includes limits via the `limit`, `page`, or `offset` arguments, we encourage the `found_orders` and `max_num_pages` properties to also be set.

Paramètres

Entrée :
null, $this, $this->sql
Sortie :
@param array|null $order_data {
@param OrdersTableQuery   $query The OrdersTableQuery instance.
@param string             $sql   Fully built SQL query.

Utilisation

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

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

Actualités

Chargement des actualités...