Last active
January 20, 2023 06:43
-
-
Save growdev/2a11b09bf19fd1ae3f4d to your computer and use it in GitHub Desktop.
Moving the location of the WooCommerce Variable Product Description on the product page
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
<? | |
/* 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_before_single_product_summary', 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