Last active
December 15, 2022 16:09
-
-
Save stuartduff/3d1f9effaa80754d8a7a4136fa0352fa to your computer and use it in GitHub Desktop.
Remove the word From: before WooCommerce Bookings Price [Temp Fix #3459]
This file contains 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
/** | |
* Temp Fix for the Bookings issue below. | |
* #3459 | |
*/ | |
function temp_price_fix_bookings( $price, $product ) { | |
$target_product_types = array( | |
'booking' | |
); | |
if ( in_array ( $product->product_type, $target_product_types ) ) { | |
// if bookable product remove From: before price | |
return wc_price( $product->get_price() ); | |
} | |
// return normal price | |
return $price; | |
} | |
add_filter('woocommerce_get_price_html', 'temp_price_fix_bookings', 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment