Title: cassiocesio's Replies | WordPress.org

---

# cassiocesio

  [  ](https://wordpress.org/support/users/cassiocesio/)

 *   [Profile](https://wordpress.org/support/users/cassiocesio/)
 *   [Topics Started](https://wordpress.org/support/users/cassiocesio/topics/)
 *   [Replies Created](https://wordpress.org/support/users/cassiocesio/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/cassiocesio/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/cassiocesio/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/cassiocesio/engagements/)
 *   [Favorites](https://wordpress.org/support/users/cassiocesio/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Multi-Step Checkout for WooCommerce] Filter: woocommerce_cart_shipping_packages](https://wordpress.org/support/topic/filter-woocommerce_cart_shipping_packages/)
 *  Thread Starter [cassiocesio](https://wordpress.org/support/users/cassiocesio/)
 * (@cassiocesio)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/filter-woocommerce_cart_shipping_packages/#post-11222365)
 * Diana, I think I failed in communication and you didn’t understand the problem
   that is happening.
 * I put the alert just for you see that the filter is only called when the checkout
   page is updated, when we change the postcode and press the next button to the
   next step the filter never called again. So the shipping price is not updated.
 * The alert will show that it doesn’t enter the filter when you change the step.
   My question is not about using filters, forget the return, just make the test
   to realize that it doesn’t run the filter when changing step.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Multi-Step Checkout for WooCommerce] Filter: woocommerce_cart_shipping_packages](https://wordpress.org/support/topic/filter-woocommerce_cart_shipping_packages/)
 *  Thread Starter [cassiocesio](https://wordpress.org/support/users/cassiocesio/)
 * (@cassiocesio)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/filter-woocommerce_cart_shipping_packages/#post-11220519)
 * Hi Diana, sorry but I know how to use a filter, that’s not the problem (this 
   function is complete on my site and it works). To be able to perform the test
   and check the problem you can put an alert inside the function.
 * You will notice from the alert that the filter only runs when the page refreshes.
   Therefore, if the user updates the zip code in the first step, the filter will
   no longer be called. You can do the test this way:
 *     ```
       add_filter( 'woocommerce_cart_shipping_packages', array($this, 'filter_woocommerce_cart_shipping_packages'), 10);
       function filter_woocommerce_cart_shipping_packages() {
           // Modify here the $shipping_packages variable in some way and then return it.
           // Don't remove the return statement. Very important
             $message = "test";
             echo "<script type='text/javascript'>alert('$message');</script>";
             return "";
       }
       ```
   
 * In order to work, the filter would need to be called again when the user modified
   the cep or when he clicked next. I believe that would solve the problem.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Multi-Step Checkout for WooCommerce] Filter: woocommerce_cart_shipping_packages](https://wordpress.org/support/topic/filter-woocommerce_cart_shipping_packages/)
 *  Thread Starter [cassiocesio](https://wordpress.org/support/users/cassiocesio/)
 * (@cassiocesio)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/filter-woocommerce_cart_shipping_packages/#post-11215244)
 * Yes, I turned everything off. I know that the plugin does not modify the fields
   and that it only displays the data, but when you use the same filter by calling
   an empty function the checkout hangs and no longer updates the data.
 * You can test anywhere in your code:
    add_filter( ‘woocommerce_cart_shipping_packages’,’
   filter_woocommerce_cart_shipping_packages’); public function filter_woocommerce_cart_shipping_packages(){
 * }
 * Somehow updating the data is compromised.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Claudio Sanches - Checkout Cielo for WooCommerce] Não redireciona para cielo](https://wordpress.org/support/topic/nao-redireciona-para-cielo/)
 *  [cassiocesio](https://wordpress.org/support/users/cassiocesio/)
 * (@cassiocesio)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/nao-redireciona-para-cielo/#post-9655735)
 * Eu passei por um problema parecido com o plugin de cache “WP Fastest Cache”.
 * O cliente finalizava a compra e era redirecionado para a pagina do Checkout (
   ou seja, não saia da pagina de checkout). Só descobri esse problema porque uma
   cliente relatou que o site havia cobrado duas vezes.
 * Na verdade quando redirecionou para a pagina de checkout ela colocou os dados
   do cartão novamente, porque não entendeu que havia finalizado.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[YITH WooCommerce Ajax Search] Plugin error with special characters](https://wordpress.org/support/topic/plugin-error-with-special-characters/)
 *  [cassiocesio](https://wordpress.org/support/users/cassiocesio/)
 * (@cassiocesio)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/plugin-error-with-special-characters/#post-6774279)
 * Renan, i’m with the same problem. Did you resolve the problem?

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