WooCommerce uses this filter to force redirect customers to my-account page woocommerce_prevent_admin_access
, so you need to pass false to this filter to disable the woocommerce redirect
add_action(
'admin_init',
function() {
add_filter( 'woocommerce_prevent_admin_access', '__return_false', 100 );
},
1
);
You can then use login_redirect
filter after that to customize the wordpress redirect link after login
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…