Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'wcfm_is_allow_my_account_store_order_pdf_invoice_download', function( $allow ) {
- if( is_user_logged_in() ) {
- $user = wp_get_current_user();
- if( in_array( 'customer', $user->roles ) || in_array( 'subscriber', $user->roles ) ) {
- $allow = false;
- }
- }
- return $allow;
- } );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement