Website Building » WooCommerce » How Do I Show Shipping Address in WooCommerce?

How Do I Show Shipping Address in WooCommerce?

Last updated on January 17, 2023 @ 12:22 pm

There are a few ways that you can show a shipping address in WooCommerce. One way is to use the default WooCommerce settings. To do this, go to your WordPress admin panel and navigate to WooCommerce > Settings.

Click on the Shipping tab and then scroll down to the Shipping Options section. Here, you will see an option to display the shipping address on the checkout page. Simply check the box next to this option and save your changes.

Another way to show a shipping address in WooCommerce is to use a plugin. There are a few plugins that add this functionality to your website.

One plugin that you can use is called Checkout Addresses for WooCommerce. This plugin allows you to add custom fields to your checkout page, which can include a field for the shipping address.

If you want to add a shipping address field to your checkout page without using a plugin, you can do so by editing your theme files. First, you will need to edit the checkout form template file. This file is located in your theme directory at /woocommerce/checkout/form-shipping.php.

At the top of this file, you will see a line of code that looks like this:

$fields = $checkout->get_checkout_fields( 'shipping' );

Replace this line of code with the following:

$fields = $checkout->get_checkout_fields( 'shipping' );
$fields['shipping_address_1']['required'] = true;
$fields['shipping_city']['required'] = true;
$fields['shipping_state']['required'] = true;
$fields['shipping_postcode']['required'] = true;

This code will add the shipping address field to your checkout page and make it required. Save your changes and upload the file to your server.

PRO TIP: If you are using WooCommerce to sell products on your WordPress site, you may want to know how to show the shipping address on your checkout page. By default, WooCommerce does not show the shipping address on the checkout page. However, you can add a custom field to your checkout form to display the shipping address.

To do this, you will need to add the following code to your child theme’s functions.php file:

add_action( ‘woocommerce_after_checkout_billing_form’, ‘my_custom_checkout_field’ );
function my_custom_checkout_field( $checkout ) {
echo ‘<div id=”my_custom_checkout_field”>’;
woocommerce_form_field( ‘shipping_address’, array(
‘type’ => ‘textarea’,
‘class’ => array(‘my-field-class form-row-wide’),
‘label’ => __(‘Shipping Address’),
‘placeholder’ => __(‘Enter your shipping address’),
), $checkout->get_value( ‘shipping_address’ ));
echo ‘</

Kathy McFarland

Kathy McFarland

Devops woman in trade, tech explorer and problem navigator.