Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Woocommerce remove rel="nofollow" from add to cart and select options buttons
/**
* 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