Cleaning the mini cart after payment
-
After payment and return to the site mini cart is not cleared of goods, clear button does not work
Page: /checkout/order-received/
// Mini cart /wp-content/plugins/woocommerce/templates/cart/mini-cart.php<div class="mini-cart" style="height:70px;"> <a href="/cart/" title="View your shopping cart"> <span class="woo_mini-count flaticon-shopcart-icon"><span>1</span></span> </a> <div class="woo_mini_cart"> <ul class="woocommerce-mini-cart cart_list product_list_widget "> <li class="woocommerce-mini-cart-item mini_cart_item"> <a href="/cart/?remove_item=196a7d2998b77fb1abba07ee832a9726&_wpnonce=4622d0b17e">×</a> <a href="/wttt/twtt/?attribute_pa_integrate-template-in-cms=html-css-js"> <img width="540" height="405" src="/wp-content/uploads/2018/11/43533-1-1-540x405.png" alt="Информационный сайт для компании" />Информационный сайт для компании - HTML, CSS, JS </a> <span class="quantity">1 × <span class="woocommerce-Price-amount amount">5?<span class="woocommerce-Price-currencySymbol">?</span></span></span> </li> </ul> <p class="woocommerce-mini-cart__total total"><strong>Подытог:</strong> <span class="woocommerce-Price-amount amount">5?<span class="woocommerce-Price-currencySymbol">?</span></span></p> <p class="woocommerce-mini-cart__buttons buttons"><a href="/cart/">Просмотр корзины</a><a href="/checkout/">Оформление заказа</a></p> </div> </div>
// Payment Gateway
/** * Check Response **/ function check_ipn_response(){ global $woocommerce; if (isset($_GET['yandex']) AND $_GET['yandex'] == 'success'){ if(isset($_GET['yorder'])){ $update_order_id = (int)$_GET['yorder']; $order_object = wc_get_order($update_order_id); $order_object->update_status('completed'); } WC()->cart->empty_cart(); wp_redirect( $this->get_return_url( $order ) ); } }
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Cleaning the mini cart after payment’ is closed to new replies.