I want to ask why the suffix in the product price is not appearing. This happened after I updated the woocommerce plugin. Before updating, there was no issue like this https://snipboard.io/ERPhNU.jpg, but after updating, the suffix in the product price is not showing. This is the code I added to display the custom field that becomes the suffix in the product price?https://gist.github.com/ITws2/b034e8d9592ebebb663c15d887824839. Can you help me with this code?
Please help me as soon as possible
Regards,
Edo
The theme is Flatsome.
I’ve added a test product link. This is a simple product. Discount is working properly but not the price suffix. I want to show the price with VAT in suffix but the price with VAT is calculated for regular price, not for sale price. Your plugin calculates the latter. If you add the product into the cart the price suffix is correct.
]]>Usually with images it would work like this:
.product_cat-grafikk:not(.product_cat-ramme) img{
}
How can I do this with:
.wpcu-product .wpcu-product__img{
}
?
And one more question:
How can I change the outcome of the price suffix (space between currency symbol and price)?
I am trying to hide the price display suffix on everything except the product page because I have variation products so on the category page some products show the price suffix (the single products) and the products with which have variations and a range of price show no price display suffix which makes the page look odd.
It would be best if I simply hide the price display suffix and only show it on the product page for all my products.
Thank you so much in advance.
]]>Below is the code for based on categories, can it please be altered for products.
add_filter( ‘woocommerce_get_price_html’, ‘conditional_price_suffix’, 20, 2 );
function conditional_price_suffix( $price, $product ) {
// HERE define your product categories (can be IDs, slugs or names)
$product_categories = array(’29’);
if( has_term( $product_categories, ‘product_cat’, $product->get_id() ) )
$price .= ‘ ‘ . __(‘per kg’);
return $price;
}
I need to show the string “From” before price on category pages on variable pdoucts.
So far the best I accomplished was to show the “From” string in all producta via functions.php:
function change_product_price_html($price){
$newPrice = esc_html__( 'desde ', 'chaitan' );
$newPrice .= $price;
return $newPrice;
}
add_filter('woocommerce_get_price_html', 'change_product_price_html');
How can I show this string only for variable products?
]]>