📅  最后修改于: 2022-03-11 14:53:50.297000             🧑  作者: Mango
function custom_redirect() {
global $wp;
if( $wp->request == 'my-account' ) {
wp_redirect( site_url( 'my-account/orders/' ) );
exit;
}
}
add_action ('template_redirect', 'custom_redirect');