Home / Disable / Disable filter added by the Caddy plugin that hides WooCommerce shipping rates
Duplicate Snippet

Embed Snippet on Your Site

Disable filter added by the Caddy plugin that hides WooCommerce shipping rates

Removes the filter that hides other WooCommerce shipping rates when free shipping is available, allowing all rates to show.

Code Preview
php
<?php
/**
 * Removes the 'woocommerce_package_rates' filter added by the Caddy plugin.
 *
 * Removes the filter that hides other WooCommerce shipping rates 
 * when free shipping is available, allowing all rates to show.
 *
 * @author   Mike Valera
 * @plugin   Caddy - Smart Side Cart for WooCommerce
 * @link     https://usecaddy.com
 */
add_action('init', function() {
    global $caddy_public_obj;
    // Ensure $caddy_public_obj is available and is an object
    if (isset($caddy_public_obj) && is_object($caddy_public_obj)) {
        // Remove the specific filter
        remove_filter('woocommerce_package_rates', [$caddy_public_obj, 'cc_shipping_when_free_is_available']);
    }
}, 20);

Comments

Add a Comment