Skip to content

Instantly share code, notes, and snippets.

View harinderbachhal's full-sized avatar

harinderbachhal

View GitHub Profile
add_action( 'woocommerce_single_product_summary', 'ec_child_wrap_single_product_price', 24 );
add_action( 'woocommerce_single_product_summary', 'electro_child_adsw_currency_switcher', 26 );
function ec_child_wrap_single_product_price() {
?><div class="price-adsw-currency-switcher" style="display: flex; align-items: center;"><?php
}
function electro_child_adsw_currency_switcher() {
echo '<div style="margin-left:15px;">' . do_shortcode( '[adsw_currency_switcher]' ) . '</div>';
?></div><!-- /.price-adsw-currency --><?php
add_filter( 'woocommerce_get_price_html', 'electro_price_prefix_text', 100, 2 );
function electro_price_prefix_text( $price, $product ){
$cc = do_shortcode('[adsw_currency_switcher]');
$price = $price;
return apply_filters( 'woocommerce_get_price', $price .' '.$cc );
}
add_filter( 'wc_product_sku_enabled', '__return_false' );