Title: Specific plugin
Last modified: February 4, 2025

---

# Specific plugin

 *  Resolved [dpm21](https://wordpress.org/support/users/dpm21/)
 * (@dpm21)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/specific-plugin-2/)
 * Hello,
 * I am writing to you because I am experiencing an issue using your plugin alongside
   another specific plugin.
 * I am using the plugin called **“WooCommerce Advanced Free Shipping”** because
   I have specific products that I do not want to be included in the free shipping
   option. In your plugin’s general settings, I selected my **“Initial Shipping 
   Zone”**, which is **“France Métropolitaine”**. However, I deactivated the **“
   Free Shipping” method** in the WooCommerce settings, as it only allows me to 
   set simple requirements such as a promo code or a minimum order amount.
 * That is why I rely on **“WooCommerce Advanced Free Shipping”**, which enables
   me to exclude certain products (such as heavy items) from the free shipping option.
 * My question is: **Is it possible for your plugin to work with the information
   specified in the “WooCommerce Advanced Free Shipping” plugin?**
 * Unfortunately, I am unable to attach screenshots to illustrate the issue more
   clearly.
 * Thank you for your help.

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Author [Marin Matosevic](https://wordpress.org/support/users/marinmatosevic/)
 * (@marinmatosevic)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/specific-plugin-2/#post-18284703)
 * Hi,
 * Our plugin is fully compatible with _WooCommerce Advanced Free Shipping_. Could
   you clarify the exact issue you’re experiencing? For example, is the progress
   bar not displaying correctly, or is free shipping showing when it shouldn’t (
   or vice versa)?
 * Additionally, please make sure to enable the **“Allow zero shipping cost”** option
   in the Progress Bar settings. This setting ensures that free shipping provided
   by the AFS plugin is correctly recognized.
 *  Thread Starter [dpm21](https://wordpress.org/support/users/dpm21/)
 * (@dpm21)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/specific-plugin-2/#post-18284741)
 * Hello,
 * thank you for coming back to me.
 * The bar is displaying but free shipping is validated for some products that should
   not be include in the free shipping condition. I enabled the option you told 
   me, but it still not working.
 * Regards
 *  Plugin Author [Marin Matosevic](https://wordpress.org/support/users/marinmatosevic/)
 * (@marinmatosevic)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/specific-plugin-2/#post-18286066)
 * Have you enabled the Custom Threshold option in our plugin, or is it pulling 
   free shipping information directly from Advanced Free Shipping?
 * Also, do you have complex free shipping conditions? Are the products that should
   be excluded part of a specific category or tag? If so, I can provide you with
   a code snippet to exclude products from a certain category or tag from free shipping.
 *  Thread Starter [dpm21](https://wordpress.org/support/users/dpm21/)
 * (@dpm21)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/specific-plugin-2/#post-18286306)
 * I had to “Enable Custim Threshold” in order for the bar to appear in my cart 
   yes. If this option is “off”, the progress bar doesn’t appear.
 * Yes, the condition for having free shipping is to order at least 90€, and some
   products are not eligible (products such as heavy products, gift box…). Some 
   of them are registred in a specific category (gift box) but some of them not.
 * Thank you
 *  Plugin Author [Marin Matosevic](https://wordpress.org/support/users/marinmatosevic/)
 * (@marinmatosevic)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/specific-plugin-2/#post-18286375)
 * Maybe the best approach would be to add tags to those products that should be
   excluded from free shipping. That way, we can check the cart for product tag 
   slugs and prevent the progress bar from appearing if those products are in the
   cart.
 * Here’s a code snippet that does this by checking for specific product tags and
   disabling free shipping if they are present. Add code to your child theme’s functions.
   php file or via a plugin that allows custom functions to be added, such as the
   [Code snippets](https://wordpress.org/plugins/code-snippets/) plugin. Avoid adding
   custom code directly to your parent theme’s functions.php file as this will be
   wiped entirely when you update the theme.
 *     ```wp-block-code
       add_filter('fsl_min_amount', function ($amount) {    if (!WC()->cart) {        return;    }    // Define the product tags to exclude from free shipping.    $excluded_tags = [        'exclude-tag-1',        'exclude-tag-2',    ];    $taxonomy = 'product_tag';    foreach (WC()->cart->get_cart() as $cart_item_key => $cart_item) {        // Check if the product belongs to any of the excluded tags.        if (has_term($excluded_tags, $taxonomy, $cart_item['product_id'])) {            // Set the amount to null and exit the loop.            $amount = null;            break;        }    }    return $amount;});
       ```
   
 * You just need to replace `'exclude-tag-1'` and `'exclude-tag-2'` with the actual
   tag slugs you assign to those products.
 *  Thread Starter [dpm21](https://wordpress.org/support/users/dpm21/)
 * (@dpm21)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/specific-plugin-2/#post-18286646)
 * It works ! Thank you for that !
 * But I noticed that even tho on your plugin’s general settings, I mentionned “
   Intial shipping zone : France Métropolitaine”, the progress bar appears even 
   if the customer choose a shipping to “Luxembourg” which is not included in the
   free shipping condition.
 * is there anything I can add to the code you sent me earlier ?
 *  Plugin Author [Marin Matosevic](https://wordpress.org/support/users/marinmatosevic/)
 * (@marinmatosevic)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/specific-plugin-2/#post-18288260)
 * Yes, we can modify the code to ensure the progress bar only appears for your 
   initial shipping zone. Here’s the updated version:
 *     ```wp-block-code
       add_filter('fsl_min_amount', function ($amount) {    if (!WC()->cart) {        return;    }    $initial_zone_id = DEVNET_FSL_OPTIONS['general']['initial_zone'] ?? 1;    $shipping_packages = WC()->cart->get_shipping_packages();    $shipping_zone     = wc_get_shipping_zone(reset($shipping_packages));    $zone_id           = $shipping_zone->get_id();    if ($zone_id !== $initial_zone_id) {        return null;    }    // Define the product tags to exclude from free shipping.    $excluded_tags = [        'exclude-tag-1',        'exclude-tag-2',    ];    $taxonomy = 'product_tag';    foreach (WC()->cart->get_cart() as $cart_item_key => $cart_item) {        // Check if the product belongs to any of the excluded tags.        if (has_term($excluded_tags, $taxonomy, $cart_item['product_id'])) {            // Set the amount to null and exit the loop.            $amount = null;            break;        }    }    return $amount;});
       ```
   
 *  Thread Starter [dpm21](https://wordpress.org/support/users/dpm21/)
 * (@dpm21)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/specific-plugin-2/#post-18295644)
 * Hello Marin,
 * Do I have to specify something in this part of the code :
 *     ```wp-block-code
        $initial_zone_id = DEVNET_FSL_OPTIONS['general']['initial_zone'] ?? 1;
       ```
   
 * Because, the code you sent me doesn’t work even tho i specified the product tag.
   When I check my cart, the progress bar doesn’t appear anymore now.
 * Thank you
 *  Plugin Author [Marin Matosevic](https://wordpress.org/support/users/marinmatosevic/)
 * (@marinmatosevic)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/specific-plugin-2/#post-18295870)
 * No, you don’t need to change anything in that part of the code. The code automatically
   checks the initial shipping zone set in the general settings and disables the
   progress bar if the customer’s selected zone isn’t the same as the initial zone.
   If the zone matches, then it performs an additional check on the product tags.
 * To troubleshoot further, could you please share:
    1. A link to your website.
    2. The name of one product with an excluded tag and one that should pass the free
       shipping condition.
    3. The shipping details (e.g., postal code or other specific input) that will place
       me in the France Métropolitaine zone.
 *  Thread Starter [dpm21](https://wordpress.org/support/users/dpm21/)
 * (@dpm21)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/specific-plugin-2/#post-18296263)
 * Yes sure:
    - [https://lesvignoblesdemaxime.com/](https://lesvignoblesdemaxime.com/)
    - Should be excluded from the free shipping condition ([https://lesvignoblesdemaxime.com/produit/chateau-grand-lartigue-2014-saint-emilion-grand-cru-rouge-600-cl/](https://lesvignoblesdemaxime.com/produit/chateau-grand-lartigue-2014-saint-emilion-grand-cru-rouge-600-cl/))
    - Should be included from the free shipping condition ([https://lesvignoblesdemaxime.com/produit/chateau-grand-lartigue-2011-saint-emilion-grand-cru/](https://lesvignoblesdemaxime.com/produit/chateau-grand-lartigue-2011-saint-emilion-grand-cru/))
    - Shipping details (FRANCE – city : BORDEAUX – zip code : 33000)
 * Thank you
 *  Plugin Author [Marin Matosevic](https://wordpress.org/support/users/marinmatosevic/)
 * (@marinmatosevic)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/specific-plugin-2/#post-18298099)
 * Thank you for providing the details. I see what might be causing the issue. Please
   update the code with the corrected part below:
 *     ```wp-block-code
       $initial_zone_id = (int)(DEVNET_FSL_OPTIONS['general']['initial_zone'] ?? 1);
       ```
   
 * This ensures the initial zone ID is properly interpreted as an integer, which
   could have been the source of the issue.
 *  Thread Starter [dpm21](https://wordpress.org/support/users/dpm21/)
 * (@dpm21)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/specific-plugin-2/#post-18319910)
 * Thank you very much for your help, it works !
 *  Plugin Author [Marin Matosevic](https://wordpress.org/support/users/marinmatosevic/)
 * (@marinmatosevic)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/specific-plugin-2/#post-18320397)
 * Great! I’m glad I could help. 🙂
 * In the upcoming release, we’ll include full support for the Advanced Free Shipping
   plugin, so you won’t need the custom code anymore. If you decide to leave it,
   no harm done—it just won’t be necessary, as all custom conditions will be read
   directly from the Advanced Free Shipping plugin.
 * P.S. If you’re enjoying the plugin, we’d really appreciate it if you could take
   a moment to leave a [review](https://wordpress.org/support/plugin/free-shipping-label/reviews/#new-post).
   Your feedback means a lot to us. Thank you!
 * Best regards

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Specific plugin’ is closed to new replies.

 * ![](https://ps.w.org/free-shipping-label/assets/icon-256x256.gif?rev=2822194)
 * [Free Shipping Label and Progress Bar for WooCommerce](https://wordpress.org/plugins/free-shipping-label/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/free-shipping-label/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/free-shipping-label/)
 * [Active Topics](https://wordpress.org/support/plugin/free-shipping-label/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/free-shipping-label/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/free-shipping-label/reviews/)

 * 13 replies
 * 2 participants
 * Last reply from: [Marin Matosevic](https://wordpress.org/support/users/marinmatosevic/)
 * Last activity: [1 year, 1 month ago](https://wordpress.org/support/topic/specific-plugin-2/#post-18320397)
 * Status: resolved