Skip to content

Instantly share code, notes, and snippets.

@harishankerr
Last active August 26, 2016 10:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harishankerr/9ae91f762b75a3045cb954e6679446e7 to your computer and use it in GitHub Desktop.
Save harishankerr/9ae91f762b75a3045cb954e6679446e7 to your computer and use it in GitHub Desktop.
Move Location of WooCommerce Variable Products
<?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