Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sumonst21/2a82e367a51553aaaaa9e587202ba515 to your computer and use it in GitHub Desktop.
Save sumonst21/2a82e367a51553aaaaa9e587202ba515 to your computer and use it in GitHub Desktop.
Removes WooCommerce noindex robots tag on public pages
function YOURPREFIX_remove_wc_account_page_noindex(){
if (!is_user_logged_in()) {
remove_action( 'wp_head', 'wc_page_noindex' );
}
}
add_action( 'init', 'YOURPREFIX_remove_wc_account_page_noindex' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment