方法一
把下面這一段加在function.php中。
// --- 隱藏會員登入訊息 ---//
add_action( 'woocommerce_account_dashboard', 'disable_please_logout_message' );
function disable_please_logout_message() {
// Aron 您好 (不是 Aron 嗎? 請登出) ← 隱藏這行訊息
echo '';
}
方法二
到woocommerce預設主題資料夾 woocommerce > myaccount > dashboard.php複製,放到自己的佈景主題中並修改。
原本的程式長下面這個樣子
recent orders, manage your shipping and billing addresses, and edit your password and account details.', 'woocommerce' ),
esc_url( wc_get_endpoint_url( 'orders' ) ),
esc_url( wc_get_endpoint_url( 'edit-address' ) ),
esc_url( wc_get_endpoint_url( 'edit-account' ) )
);
?>
把這一段整個註解掉就可以了
recent orders, manage your shipping and billing addresses, and edit your password and account details.', 'woocommerce' ),
// esc_url( wc_get_endpoint_url( 'orders' ) ),
// esc_url( wc_get_endpoint_url( 'edit-address' ) ),
// esc_url( wc_get_endpoint_url( 'edit-account' ) )
// );
?>