woocommerce_upsells_total

FILTER woocommerce\includes\wc-template-functions.php (ligne 2320) github
Filter the number of upsell products should on the product page.

Paramètres

Entrée :
$args['posts_per_page'] ?? $limit
Sortie :
@param int $limit number of upsell products.

Utilisation

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

function ma_fonction_filtre($args['posts_per_page'] ?? $limit) {
    // Modifier la valeur
    return $args['posts_per_page'] ?? $limit;
}

Actualités

Chargement des actualités...