Answer the question
In order to leave comments, you need to log in
How to move "payment method" block in Woocommerce?
Now like this:
You need to do this:
I found the code in the sources (/wp-content/plugins/woocommerce/templates/checkout/form-checkout.php):
<form name="checkout" method="post" class="checkout woocommerce-checkout" action="<?php echo esc_url( wc_get_checkout_url() ); ?>" enctype="multipart/form-data">
<?php if ( $checkout->get_checkout_fields() ) : ?>
<?php do_action( 'woocommerce_checkout_before_customer_details' ); ?>
<div class="col2-set" id="customer_details">
<div class="col-1">
<?php do_action( 'woocommerce_checkout_billing' ); ?>
</div>
<div class="col-2">
<?php do_action( 'woocommerce_checkout_shipping' ); ?>
</div>
</div>
<?php do_action( 'woocommerce_checkout_after_customer_details' ); ?>
<?php endif; ?>
<?php do_action( 'woocommerce_checkout_before_order_review_heading' ); ?>
<h3 id="order_review_heading"><?php esc_html_e( 'Your order', 'woocommerce' ); ?></h3>
<?php do_action( 'woocommerce_checkout_before_order_review' ); ?>
<div id="order_review" class="woocommerce-checkout-review-order">
<?php do_action( 'woocommerce_checkout_order_review' ); ?>
</div>
<?php do_action( 'woocommerce_checkout_after_order_review' ); ?>
</form>
Answer the question
In order to leave comments, you need to log in
edited the file /wp-content/plugins/woocommerce/templates/checkout/form-checkout.php
and dropped it into the theme folder /wp-content/themes/rstheme/woocommerce/checkout/form-checkout.php
It turned out what was required:
<form name="checkout" method="post" class="checkout woocommerce-checkout" action="<?php echo esc_url( wc_get_checkout_url() ); ?>" enctype="multipart/form-data">
<?php if ( $checkout->get_checkout_fields() ) : ?>
<?php do_action( 'woocommerce_checkout_before_customer_details' ); ?>
<div class="row" id="customer_details">
<div class="col-md-6">
<?php do_action( 'woocommerce_checkout_billing' ); ?>
</div>
<div class="col-md-6">
<?php do_action( 'woocommerce_checkout_before_order_review_heading' ); ?>
<h3 id="order_review_heading"><?php esc_html_e( 'Your order', 'woocommerce' ); ?></h3>
<p class="ti-0 h5 text-center pb-3" style="font-size: 15px">Чтобы рассчитать стоимость доставки укажите Ваш город</p>
<?php do_action( 'woocommerce_checkout_before_order_review' ); ?>
<div id="order_review" class="woocommerce-checkout-review-order">
<?=woocommerce_order_review();?>
</div>
<?php do_action( 'woocommerce_checkout_after_order_review' ); ?>
</div>
</div>
<?=woocommerce_checkout_payment();?>
<?php endif; ?>
</form>
It's already at the bottom of the form (judging by the code you provided), rearrange columns with styles
Look at the functions that are called by these hooks, check the markup.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question