Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Custom variable price by product
- // code goes in functions.php for your child theme
- add_filter( 'woocommerce_variable_sale_price_html', 'custom_variable_price', 40, 2 );
- add_filter( 'woocommerce_variable_price_html', 'custom_variable_price', 40, 2 );
- function custom_variable_price( $price, $_product ) {
- $product_id = $_product->id;
- switch ($product_id) {
- case 1569:
- return 'From $0.80 per item';
- default:
- return $price;
- } // end switch
- } // end function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement