BOOK APPOINTMENT

Add extra payment gateway fees based on country location in WooCommerce

Add extra payment gateway fees based on country location in WooCommerce

We use Advanced Extra Fees for WooCommerce plugin plugin to add extra fee option. Follow the Following Steps:

1. Install and Activate the Plugin:

  • Download the Advanced Extra Fees for WooCommerce plugin from the WooCommerce marketplace or your WordPress dashboard.
  • Activate the plugin through the ‘Plugins’ menu in WordPress.

2. Access the plugin setting:

Go to WooCommerce setting > click on setting > click on advance extra fee

3. Extra Fee Set Up:

  • Go to WooCommerce setting > click on setting > click on advance extra fee > click on add new fee
  • Now add a name for your fee like “PayPal Domestic Payment Gateway Fee”
  • Set Fee Type and Value

Add Conditional Fee Rules

  • Add condition based on Country and add country value with logic “equal to”
  • Add another rule for payment gateway and select your preferred payment option

4. Save and Publish the Fee:

  • After adding all conditions, click on the Publish button to save your settings.
  • Test your configuration by going to a checkout from different countries to ensure that fees are applied correctly.
How to add country code and flag before phone in checkout page of woocoomerce

How to add country code and flag before phone in checkout page of woocoomerce

Imagine you’re buying something online, and when you reach the checkout page, you need to enter your phone number. But wait, where’s the option to choose your country code? It’s a common issue that can be confusing for shoppers.

If you’re running a store with WooCommerce, there’s good news! You can improve your checkout page by adding country codes and flags next to the phone number field. This not only makes it easier for customers to enter their phone numbers but also gives them confidence that they’re doing it right.

In this blog post, we’ll show you how to do just that. Whether you’re new to WooCommerce or already using it, we’ll walk you through the steps to make your checkout process smoother and more user-friendly. Let’s get started on making your WooCommerce store even better!

To add code before phone in phone input in WooCommerce, add following code in functions.php of your child theme.

add_action( 'wp_enqueue_scripts', 'dsrf_add_phone_mask' );

function dsrf_add_phone_mask() {
wp_enqueue_style( 'intltelinput', 'https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.3/css/intlTelInput.min.css' );
wp_enqueue_script( 'intltelinput', 'https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.3/js/intlTelInput-jquery.min.js', array( 'jquery' ), '', true );
}

// Initialize the phone mask script
add_action( 'wp_footer', 'dsrf_init_phone_mask' );

function dsrf_init_phone_mask() {
?>