Customizing Behavior via Hooks

The default behavior of Simpler Checkout is to exactly match the behavior of your wooCommerce store. This affects coupons, discounts and/or available shipping methods.
If you want to modify the checkout behavior only for the customers using Simpler Checkout you can use the programmatic hooks offered by our plugin to dynamically update the behavior of the Simpler Checkout form.

Customizing available shipping methods

The simplerwc_shipping_rates filter allows you to modify the shipping rates & methods available to customers using Simpler Checkout. It accepts the resolved shipping rates & the cart and should return the modified rates.

Example : Removing a shipping rate from Simpler

add_filter(’simplerwc_shipping_rates’, function($methods) { 

  return array_filter($methods, function ($el) {
    return $el->get_id() ≠ “my custom method” 
  });

});

Did this page help you?