How to get a list of shipping methods without a (filled)shopping cart

Is it possible to get a list of available shipping-methods based on only a total amount and/or country code? I quess it is possible by building my own SQL query, but I was wondering if it is also...

Display the full country name rather than country code in WooCommerce?

Trying to use <?php echo $current_user->billing_country; ?> to display the WooCommerce user billing country. This for example echo’s as AU if the customer has an Australian billing address....

Woocommerce - Products ship to only a few cities locally

How do I go about limiting some products to be shipped locally only (a range of Zip codes)? P.S: Other products may ship locally and/or country-wide. A scenario of this situation would be: the...

Extending WC_Product class in a custom plugin error issue (WC_Product class not found)

I'm trying to extend the WC_Product class to add "property1" and "property2" to the protected array $data but when I try to run my plugin it give me the next error: WC_Product not found. Here is...

Add custom tax value at woocommerce checkout

I want to add custom % value at woocommerce checkout page, but I want to show it only for Swiss country and hide it for others. Now I have the right code working for that, but the problems is that...

WooCommerce - get Geo-IP location working for custom region/province

I have added Northern Ireland as a country to WooCommerce for shipping reasons. For those unfamiliar, Northern Ireland, along with the Republic of Ireland, makeup the island of Ireland but...

Add city name field to shipping zone - Woocommerce

I'm using Departamentos y Ciudades de Colombia para Woocommerce plugin which transforms input field for city/town to select field in the checkout section with the prepopulated list of cities/town...

Turn Woocommerce shop into catalog for geolocated countries?

I'm trying to turn my woocommerce shop into catalog mode depends on country.I only want to show products' price and add to cart function in United States. I'm trying to achieve this by using a...

Get user geolocated country name in Woocommerce 3

I would like to add "We ship to {country name}" in WooCommerce header based on user geoip country name? I would like to write html content in the header of my WooCommerce store, such as We ship to...

Add states for shipping zones instead of postcodes in Woocommerce

I have a woocommerce website. by default in woocommerce i can limit shipping zones by zipcode.... But How can I add states of my country in shipping zones so that customers can choose the state...

I would like to add country of origin to products in woocommerce

Hi I would like to add country of origin while adding products and then sort products based on country of origin Can I achieve this?

Make US first in Woocommerce checkout countries select field

I already have US selected as my default country in the woocommerce checkout. In addition to that, I was asked to move 'US' to the very top of the country list in the checkout form. I created a...

Add pop up and a custom message based on country in Woocommerce checkout

I am using the below code which works well to add a message to the woocommerce checkout when customers choose a country. But i also want to add a pop up using this shortcode echo...

Remove country billing and shipping fields on admin add order in Woocommerce

In the admin, when you click Add Order, I can't figure out how to remove the billing & shipping country fields. I don't want to use CSS to just hide the fields because I need the country hidden...

Make state checkout field required for a Vietnam country in WooCommerce

The country of Vietnam in WooCommerce does not have defined states, so I added some states to my checkout page. This is my code: add_filter( 'woocommerce_states', 'vietnam_cities_woocommerce' ); ...

How to display Country Phone Code in wordpress?

I am not able to edit woocommerce chekcout page. I want to add my country phone number code like ( +88 ) but i am no able to do it. Update: I tried this code from this referece and added below...

Woo-commerce: allow checkout only if the customer is living in a certain city

I am making a woocommerce website for my supermarket which delivers only to one city(Ras Tanura). Since it is a supermarket store, I replaced Shipping with Delivery. I'm trying to restrict...

Woocommerce Shipping Calculation Logic

The plot: I am working with a Dropshipping company that has an API for providing products, the shipping is calculated this way: Every product comes with a shipping size ( S,M,L ... ) and for each...

WooCommerce custom checkout field for 1 country only

I have a webshop in 5 languages now and we sell and ship our products all over Europe. I've made custom checkout fields in WooCommerce without problems. For 1 country (Norway) we need to add an...

Woocommerce Checkout: Add placeholder in country dropdown

in the checkout of my Woocommerce-Shop is a dropdown to choose your country. On default the USA is automatically selected already. How to just have a placeholder with “select your country”...

WooCommerce custom bacs payment gateway not saving bank account details

I build a plugin-based upon gateway BACS, I followed this guide https://docs.woocommerce.com/document/payment-gateway-api/ I also found some other examples which are used some code from, maybe...

Setting up a condition in class-wc-countries.php for WooCommerce checkout (billing state)

I want to streamline and minimize the fields a customer has to fill out on the checkout page. As an example: If a customer is from the UK the billing_state field named as 'County' pops up. It's...

Woocommerce: Making a billing field optional for a specific country does not work

In my Wordpress Woocommerce site I need to skip the required validation for billing city field when the user selects a specific billing country. I have referred answers in the following similar...

WooCommerce drop-down postcode / Zip with (space) or ( _ ) or ( - )?

I am building my website. I have a WooCommerce plugin installed and the country I live in it doesn't have postcode or zip. So to calculate the shipping I use districts. I am adding all districts...

How to add new state(s) for a country to WooCommerce?

I want to add new state in WooCommerce. I used woo-state and snippet plugin and added this code: function woo_add_my_country( $country ) { $country["AE-DU"] = 'Dubai'; return...

Get the name of the shipping state from a state code or if user types it in WooCommerce

In my case I have the following code that shows the name of the state, for countries that do not have added states, (it only shows the text when the user has written it manually). But if the user...

Hide product prices on specific countries WooCommerce

I'm trying to hide the products price and add to cart button from woocommerce pages on specific countries. i've found Turn Woocommerce shop into catalog for geolocated countries? but it works only...

Programmatically created WooCommerce order have no tax for new users

Im using Gravity forms to create an WooCommerce order programmatically. If an email added to the form already exists, it takes the shipping and billing from the users account. This works and it...

Add "VAT REVERSE CHARGE" when company is from EU in WooCommerce

I have a B2B webshop with Wordpress and WooCommerce using WooCommerce Subscriptions. As I am selling digital goods I need to do add special VAT rules to my orders for companies within the EU. My...

Change "no shipping available" message based on selected available shipping country

I'm currently adding the below code in woocommerce/cart/cart-shipping.php to change the no shipping method message for a country that is not in the shipping country list of...