This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Plugin Name: WooCommerce Composite Products - Prevent Range-Format Prices | |
| * Plugin URI: http://woocommerce.com/products/composite-products/ | |
| * Description: Use this snippet to prevent Composite Products from displaying composite prices in range format. | |
| * Version: 1.0 | |
| * Author: SomewhereWarm | |
| * Author URI: http://somewherewarm.gr/ | |
| * Developer: Manos Psychogyiopoulos | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Use WC 2.0 variable price format, now include sale price strikeout | |
| * | |
| * @param string $price | |
| * @param object $product | |
| * @return string | |
| */ | |
| function wc_wc20_variation_price_format( $price, $product ) { | |
| // Main Price | |
| $prices = array( $product->get_variation_price( 'min', true ), $product->get_variation_price( 'max', true ) ); |