Filter to customize the text of the "Cost per unit" tooltip for the "Cost" (of Goods Sold) column in the order details page. If an empty string is returned then the tooltip won't be rendered.
$tooltip_text, $cost_per_item, $formatted_cost_per_item, $this
Sortie :
@param string $tooltip_text Original tooltip text, may be an empty string. @param float $cost_per_item The numerical value of the unit Cost of Goods Sold of the product. @param string $formatted_cost_per_item The unit Cost of Goods Sold of the product already formatted for display. @param WC_Order_Item $order_item The order item this filter is being fired for.
// Modifier la valeur avec le filtre 'woocommerce_order_item_cogs_per_item_tooltip'
add_filter('woocommerce_order_item_cogs_per_item_tooltip', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre($tooltip_text) {
// Modifier la valeur
return $tooltip_text;
}
Chargement des actualités...