/** * Combine cart and checkout on the same page */ // Places the cart table on top of the checkout form so they display on the same page. // https://www.businessbloomer.com/woocommerce-cart-checkout-same-page/ add_action('woocommerce_before_checkout_form', 'cc_combine_cart_and_checkout_pages', 5); function cc_combine_cart_and_checkout_pages() { if (is_wc_endpoint_url('order-received')) return; echo do_shortcode('[woocommerce_cart]'); }