Filter to customize the total Cost of Goods Sold value that get_cogs_total_value returns for a given product.
$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.
// 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(;
}
Chargement des actualités...