woocommerce_get_product_cogs_total_value

FILTER woocommerce\includes\abstracts\abstract-wc-product.php (ligne 2414) github
Filter to customize the total Cost of Goods Sold value that get_cogs_total_value returns for a given product.

Paramètres

Entrée :
$this->get_cogs_total_value_core(
Sortie :
@param float $total_value The effective total value of the product.
@param WC_Product $product The product for which the total value is being retrieved.

Utilisation

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

function ma_fonction_filtre($this->get_cogs_total_value_core() {
    // Modifier la valeur
    return $this->get_cogs_total_value_core(;
}

Actualités

Chargement des actualités...