📜  删除仪表板 mya 帐户 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:50.925000             🧑  作者: Mango

代码示例1
add_action('template_redirect', 'misha_redirect_to_orders_from_dashboard' );
 
function misha_redirect_to_orders_from_dashboard(){
 
    if( is_account_page() && empty( WC()->query->get_current_endpoint() ) ){
        wp_safe_redirect( wc_get_account_endpoint_url( 'orders' ) );
        exit;
    }
 
}