How to get woocommerce country select dropdown?

前端 未结 3 1856
刺人心
刺人心 2021-02-10 23:05

I want to display woocommerce countries list some where on website. how can i get the country list like this as image?

3条回答
  •  不知归路
    2021-02-10 23:59

    Here is very simple and minified code:

    global $woocommerce;    
    woocommerce_form_field( 'billing_country', array( 'type' => 'country' ) );
    

提交回复
热议问题