Created
January 27, 2017 22:03
-
-
Save fridaynext/8be1243e465b1b2e3a2895a5ccea04bb to your computer and use it in GitHub Desktop.
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 | |
// Get variation price for Ticket Sales | |
$the_min_price = null; | |
function this_variation_price( $price, $min_or_max = 'min', $display = false ) { | |
global $the_min_price; | |
$the_min_price = $price; | |
} | |
add_filter( 'woocommerce_get_variation_price', 'this_variation_price', 9 ); | |
// Add text to ticket sales "from - to" products | |
function add_membership_text( $price ) { | |
global $the_min_price; | |
$price = '<span class="member-price">' . $the_min_price . '</span> TBNA Membership Rate <br />'; | |
$price .= '<span class="member-price">' . '$30' . '</span> Non-Member Rate'; | |
return $price; | |
} | |
add_filter( 'woocommerce_variable_price_html', 'add_membership_text', 10 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment