Created
November 8, 2012 06:38
-
-
Save kloon/4037251 to your computer and use it in GitHub Desktop.
WooCommerce Currency Converter in non widget area
This file contains hidden or 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
//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