Skip to content

For Developers

[wpify_woo_free_shipping_notice]

Displays the complete notice including the progress bar and text.

[wpify_woo_amount_for_free_shipping]

Displays only the formatted remaining amount (e.g., 500 Kč).

Allows conditionally hiding the notice.

apply_filters( 'wpify_woo_free_shipping_render_notice', bool $render );
ParameterTypeDescription
$renderboolDisplay notice (default: true)
add_filter( 'wpify_woo_free_shipping_render_notice', function( $render ) {
if ( is_user_logged_in() ) {
return false;
}
return $render;
} );

Modifies the free shipping limit value.

apply_filters( 'wpify_woo_free_shipping_amount', float $amount, object $module );
ParameterTypeDescription
$amountfloatFree shipping amount
$moduleobjectFreeShippingNoticeModule instance
add_filter( 'wpify_woo_free_shipping_amount', function( $amount, $module ) {
$country = WC()->customer->get_shipping_country()
?? WC()->customer->get_billing_country();
if ( $country === 'SK' ) {
return 50; // 50 EUR for Slovakia
}
return $amount; // Default for other countries
}, 10, 2 );

wpify_woo_free_shipping_amount_for_free_shipping

Section titled “wpify_woo_free_shipping_amount_for_free_shipping”

Modifies the remaining amount until free shipping.

apply_filters( 'wpify_woo_free_shipping_amount_for_free_shipping', float $remaining );
ParameterTypeDescription
$remainingfloatRemaining amount (can be negative)

Determines whether shipping is free.

apply_filters( 'wpify_woo_free_shipping_is_free', bool $is_free );
ParameterTypeDescription
$is_freeboolShipping is free (default: $remaining <= 0)
add_filter( 'wpify_woo_free_shipping_is_free', function( $is_free ) {
$user = wp_get_current_user();
if ( in_array( 'vip_customer', $user->roles ) ) {
return true;
}
return $is_free;
} );
ClassElement
.wpify-woo-free-shipping-notice__wrapperOuter wrapper (used for AJAX fragments)
.wpify-woo-free-shipping-noticeMain notice container
.progressProgress bar container
.progress-valueFilled part of the progress bar
.wpify-woo-free-shipping-notice {
border-radius: 8px;
margin-bottom: 20px;
}
.wpify-woo-free-shipping-notice .progress {
height: 15px;
margin-top: 10px;
}
.wpify-woo-free-shipping-notice .progress-value {
background: linear-gradient(90deg, #4CAF50, #8BC34A);
}

The notice automatically updates when:

  • Adding a product to cart
  • Changing quantity in cart
  • Removing a product from cart
  • Updating checkout

The module uses WooCommerce fragments (woocommerce_add_to_cart_fragments and woocommerce_update_order_review_fragments).

The module is compatible with the Woo Currency Switcher plugin. The free shipping limit is automatically recalculated using the woocs_exchange_value filter.

You can add custom functions to:

  • The functions.php file in your child theme
  • The Code Snippets plugin