Created
October 23, 2019 13:21
-
-
Save swoboda/78fd3295ebd69d43cb33e7d76517ae6f to your computer and use it in GitHub Desktop.
Allow Flexible Pricing sales display on non-WooCommerce pages
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
<?php | |
// Do NOT include the opening php tag | |
add_filter( 'wc_flexible_pricing_on_get_price', 'wpdesk_wc_flexible_pricing_on_get_price' ); | |
/** | |
* Allow Flexible Pricing sales on non-WooCommerce pages | |
* | |
*/ | |
function wpdesk_wc_flexible_pricing_on_get_price( $on_get_price ) { | |
if ( is_page() ) { | |
$on_get_price = true; | |
} | |
return $on_get_price; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment