Last active
August 26, 2016 10:40
-
-
Save harishankerr/9ae91f762b75a3045cb954e6679446e7 to your computer and use it in GitHub Desktop.
Move Location of WooCommerce Variable Products
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 | |
/* Add this to your theme's functions.php to move the variation description display to a different location | |
* on the product page. | |
*/ | |
add_action('plugins_loaded', 'move_variation_description', 50); | |
function move_variation_description(){ | |
// Remove the hook from the original location | |
remove_action( 'woocommerce_single_product_summary', array( WC_Variation_Description::get_instance()->frontend, 'add_variation_description' ), 25 ); | |
// Re-add the hook to where you want it to be | |
add_action( 'woocommerce_after_add_to_cart_button', array( WC_Variation_Description::get_instance()->frontend, 'add_variation_description' ), 25 ); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment