Fix form cart review shipping updates

4.0/5
<?php
add_action( 'wp_head', 'fix_cart_review_update');

function fix_cart_review_update() {
	?>
<script>
	jQuery(document).ready(function($) {
		$(window).on('load', function () {
			$('.wpmc-step-item:not(.current) .woocommerce-checkout-review-order-table').remove();
			
			$( '.woocommerce-checkout' ).on( 'wpmc_after_switching_tab', function() {
				$appendTo = $('.wpmc-step-item.current .review-wrapper');
				
				if (!$appendTo.length)
					$appendTo = $('.wpmc-step-item.current #order_review');
				
				$('.woocommerce-checkout-review-order-table').appendTo($appendTo);
			});
		});

	});
</script>
	<?php
}

Comments and reviews

{{ reviewsTotal }} Review
{{ reviewsTotal }} Reviews
{{ options.labels.newReviewButton }}
{{ userData.canReview.message }}

Description

This snippet was fetched automatically from WPDistro.cz projects.

Author

Tags

This snippet is untagged