Created
September 1, 2020 04:49
-
-
Save MogulChris/b1c5458bb4c5cc8e3a1434145ec23c2b to your computer and use it in GitHub Desktop.
Stop WooCommerce ruining your formatting with paragraph p tags wpautop
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
<?php | |
//Wonky formatting on WooCommerce pages and only on WooCommerce pages? P tags where you don't want P tags? | |
function remove_autop_for_wc(){ | |
remove_filter('woocommerce_short_description','wpautop'); | |
} | |
add_action( 'init', 'remove_autop_for_wc', 999999 ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment