Created
October 17, 2019 09:07
-
-
Save plugin-republic/b9c61149a16f42239e6cea2e2117d081 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 | |
/** | |
* Filter select and radio option names | |
*/ | |
function prefix_filter_field_option_name( $name, $key, $item, $product ) { | |
$product_price = $product->get_price(); | |
$name .= ' - Only ' . $product_price; | |
return $name; | |
} | |
add_filter( 'prefix_filter_field_option_name', 'prefix_filter_field_option_name', 10, 4 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment