Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Removes the restricted content display from the user My Account page
<?php
/**
* Removes the restricted content display from the account page
*
* Don't forget that you are now responsible to show the restricted content to your users somewhere else
*/
function remove_from_account_page(){
remove_action( 'woocommerce_before_my_account', array( $GLOBALS['wecr_show_content'], 'show_content' ) );
}
add_action( 'init', 'remove_from_account_page' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment