Please submit a private ticket if you need to share sensitive information, such as license details and admin credentials.

Okay
  Public Ticket #3801962
Free shipping bar ( added with shortcode ) not updating via AJAX in Checkout page
Open

Comments

  •  1
    Lazar started the conversation

    Hello,
    I have WPC Fly Cart for WooCommerce (Premium) and WPC Free Shipping Bar for WooCommerce installed and everything works perfectly except my custom checkout page. I didn't like free shipping bar positions in checkout page offered by the plugin so I used the shortcode, but the problem is when the quantity of items in cart is changed, the shipping bar and shipping message are not updating. Is there a possible solution for this problem ?

    Thank you,
    Lazar

  •  1,500
    Dustin replied

    Hi Lazar,

    Please add the custom code below. (How to add custom code? ↗):

    add_filter( 'woocommerce_update_order_review_fragments', function ( $fragments ) {
    	$fragments['.wpcfb-wrap'] = do_shortcode( '[wpcfb]' );
    
    	return $fragments;
    } );

    Let me know if it works as you expected.

    Best regards,
    Dustin

  •  1
    Lazar replied

    Works perfectly. Thank you very much Dustin.

  •  6
    Samuel replied

    Hey! I'm having this same problem but in the single-product page instead of the checkout page and this code doesn't seem to work for me. Right now I have:

    //Add free shipping bar before add to cart on single product page
    function add_shortcode_fsb() {
      if ( is_product() ) {
     echo do_shortcode( '[wpcfb]' ); 
      }
    }
    add_action('woocommerce_single_variation', 'add_shortcode_fsb', 0);
    

    When changes are made to the cart the free shipping bar on the single product page are not being updated.

    Help?

  •  1,500
    Dustin replied

    Hi Samuel,

    Please open a new ticket for that issue, and I will be happy to assist you.

    Best regards,
    Dustin