Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Using filters to change ATR Woo Global Price Options plugin display of price options list in single product page
/* https://wordpress.org/plugins/atr-woo-global-price-options/ */
/* You can use this filters to change the display of the price options list */
/* Note the different filters for each part */
/* For the Header */
add_filter( 'atr_gpo_before_price_options', 'test_before_price_options', 20 );
function test_before_price_options(){
$price_options_header = '<div class="atr-price-options-wrap"><p class="gpo-before-price-options">THIS IS THE HEAD OF THE LIST</p>';
return $price_options_header;
}
/* For list item open tag */
/* Will affect only radio button list display */
add_filter( 'atr_gpo_before_price_options_radio_item', 'test_atr_gpo_before_price_options_radio_item', 20 );
function test_atr_gpo_before_price_options_radio_item(){
$price_options_before_radio_item = '<div class="before_price_options_radio_item">';
return $price_options_before_radio_item;
}
/* For list item closing tag */
/* Will affect only radio button list display */
add_filter( 'atr_gpo_after_price_options_radio_item', 'test_atr_gpo_after_price_options_radio_item', 20 );
function test_atr_gpo_after_price_options_radio_item(){
$price_options_after_radio_item = '</div>';
return $price_options_after_radio_item;
}
/* For the footer of the list */
add_filter( 'atr_gpo_after_price_options', 'test_after_price_options', 20 );
function test_after_price_options(){
$price_options_footer = '<p class="gpo-after-price-options">THIS IS THE FOOTER</p></div>';
return $price_options_footer;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.