====== Dynamically Require Shipping Phone Number ====== The following functionality allows you to dynamically require the shipping phone number depending on the shipping country of the customer. ==== Set phone to optional ==== To dynamically require the phone, it will need to be set as optional by default. You can do that from the Settings > Checkout page in the admin, or the "configuration" page in the legacy admin within the "Customize which checkout fields are shown and required" option. ==== Add Javascript ==== Copy and paste the following code into your store's "custom footer" option. This can be found on the Settings > Templates page in the admin, or on the "configuration" page of the legacy admin within the "Add custom header and footer code to your templates" option. {% if context == "checkout" %} {% endif %}