Created
September 14, 2021 11:31
-
-
Save mitchellkrogza/058d79058a3e9b407db7cc3aa8dd4653 to your computer and use it in GitHub Desktop.
Woocommerce remove rel="nofollow" from add to cart and select options buttons
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
/** | |
* Remove "nofollow" from add to cart / Select options buttons | |
* What possessed Woocommerce to inplement this we shall never know ? | |
*/ | |
add_filter( 'woocommerce_loop_add_to_cart_args', 'add_to_cart_args_remove_nofollow' ); | |
function add_to_cart_args_remove_nofollow( $args ) { | |
unset($args['attributes']['rel']); | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment