Hello,
My idea is more or less this one:
function price_discount_by_id( $price ){
$my_product_id = YYY;
$product = wc_get_product( $my_product_id );
if ( $product === $my_product_id ) {
return $price*0.15;
}
return $price
}
add_filter( ‘woocommerce_product_get_price’, ‘price_discount_by_id’, 10, 2 );
I don’t know if it really works but i need to know the “YYY” ID to set manually a discount price only for one variation ID or what i ment one product built by your plugin had a 15% discount.
Kind regards.