WordPress at a glance
function is not described

wc_disable_author_archives_for_customers() WC 2.5.0

Disable author archives for customers.

No Hooks.

Return

null. Nothing.

Usage

wc_disable_author_archives_for_customers();

Changelog

Since 2.5.0 Introduced.

Code of wc_disable_author_archives_for_customers() WC 5.3.0

<?php
function wc_disable_author_archives_for_customers() {
	global $author;

	if ( is_author() ) {
		$user = get_user_by( 'id', $author );

		if ( user_can( $user, 'customer' ) && ! user_can( $user, 'edit_posts' ) ) {
			wp_safe_redirect( wc_get_page_permalink( 'shop' ) );
			exit;
		}
	}
}