Skip to content

Instantly share code, notes, and snippets.

@kloon
Created November 8, 2012 06:38
Show Gist options
  • Save kloon/4037251 to your computer and use it in GitHub Desktop.
Save kloon/4037251 to your computer and use it in GitHub Desktop.
WooCommerce Currency Converter in non widget area
//Display currency converter widget in non widget area
function custom_ccw_display_meta_end() {
$instance = array();
$instance['title'] = 'Currency Converter';
$instance['show_reset'] = 'yes'; // leave empty to disable
$instance['message'] = 'See the prices in your currency';
$instance['currency_codes'] = "USD"."\n"."ZAR"."\n"."EUR"; // Must use \n between currencies and between ""
$args = array();
the_widget( 'WooCommerce_Widget_Currency_Converter', $instance, $args);
}
add_action( 'woocommerce_after_add_to_cart_form', 'custom_ccw_display_meta_end' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment