functions - Woocommerce checkout field

is it possible to hide certain checkout filed in woo-commerce when user is logged in ? like i have a checkout field of E

is it possible to hide certain checkout filed in woo-commerce when user is logged in ? like i have a checkout field of Email address i do not want my user to see this when the user is logged in Your suggestion would be a great help.

is it possible to hide certain checkout filed in woo-commerce when user is logged in ? like i have a checkout field of Email address i do not want my user to see this when the user is logged in Your suggestion would be a great help.

Share Improve this question asked Jun 22, 2019 at 18:47 Ashiq DipuAshiq Dipu 11 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 1

Try :

add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );

function custom_override_checkout_fields( $fields ) {
   if(is_user_logged_in()){
      unset($fields['billing']['billing_email']);
   }
return $fields;
}

Source : https://docs.woocommerce/document/tutorial-customising-checkout-fields-using-actions-and-filters/

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745372311a4624847.html

相关推荐

  • functions - Woocommerce checkout field

    is it possible to hide certain checkout filed in woo-commerce when user is logged in ? like i have a checkout field of E

    3小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信