目錄

方法一
把下面這一段加在function.php中。
// --- 隱藏會員登入訊息 ---//
add_action( 'woocommerce_account_dashboard', 'disable_please_logout_message' );
function disable_please_logout_message() {
// Aron 您好 (不是 Aron 嗎? 請登出) ← 隱藏這行訊息
echo '<style type="text/css">.woocommerce-MyAccount-content{
display:none;}</style>';
}
方法二
到woocommerce預設主題資料夾 woocommerce > myaccount > dashboard.php複製,放到自己的佈景主題中並修改。
原本的程式長下面這個樣子
<p><?php
printf(
__( 'From your account dashboard you can view your <a href="%1$s">recent orders</a>, manage your <a href="%2$s">shipping and billing addresses</a>, and <a href="%3$s">edit your password and account details</a>.', 'woocommerce' ),
esc_url( wc_get_endpoint_url( 'orders' ) ),
esc_url( wc_get_endpoint_url( 'edit-address' ) ),
esc_url( wc_get_endpoint_url( 'edit-account' ) )
);
?></p>
把這一段整個註解掉就可以了
<p><?php
// printf(
// __( 'From your account dashboard you can view your <a href="%1$s">recent orders</a>, manage your <a href="%2$s">shipping and billing addresses</a>, and <a href="%3$s">edit your password and account details</a>.', 'woocommerce' ),
// esc_url( wc_get_endpoint_url( 'orders' ) ),
// esc_url( wc_get_endpoint_url( 'edit-address' ) ),
// esc_url( wc_get_endpoint_url( 'edit-account' ) )
// );
?></p>
推薦文章
WordPress客製化網頁設計,複製貼上就搞定的程式碼大全