Heads up!
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
Format or remove the price shown in the WooCommerce cart for a product that includes a Formidable Form. The default format is ' ($price)'.
Usage
add_filter( 'wc_fp_addons_format_cart_item_price', 'change_variation_price' );
Parameters
- $formatted_price (string) - The current format for the price
Examples
Hide variation price
Disable or remove the price shown in the WooCommerce cart for a product that includes a Formidable form.
add_filter( 'wc_fp_addons_format_cart_item_price', 'remove_variation_price' );
function remove_variation_price( $value ) {
$formatted = '';
return $formatted;
}