Home / Admin / Remove Customer Role From Excluded Roles
Duplicate Snippet

Embed Snippet on Your Site

Remove Customer Role From Excluded Roles

This filter can be used to remove the customer role from the excluded roles

<10
Code Preview
php
<?php
add_filter( 'aioseo_access_control_excluded_roles', 'aioseo_filter_access_control_excluded_roles' );
function aioseo_filter_access_control_excluded_roles( $roles ) {
	if ( ( $key = array_search( 'customer', $roles ) ) !== false ) {
		unset( $roles[ $key ] );
	}
	return $roles;
}

Comments

Add a Comment