Reputation: 49
in checkout page of woocommerce, i want to create new (block or section), i don't know how to call to OK.
such as live demo : http://tigon.freshbrand.vn/checkout/
or img description my problems : http://prntscr.com/eum61d
i want to create more section like this.
MY SECTION FORM 1 TITLE.
- input 1
- input 2
MY SECTION FORM 2 TITLE
- input 3
- input 4
MY SECTION FORM 3 TITLE
- input 5
- input 6
how to solve this, help me.
Upvotes: 1
Views: 1700
Reputation: 1433
Try the following code to add section in checkout page. I have added only content in the section for you. You can add fields also.
add_action('woocommerce_checkout_before_customer_details','checkout_sections');
function checkout_sections(){
echo '<div>';
echo '<h3 id="order_review_heading">'. __( 'New Section', 'woocommerce' ).'</h3>';
echo '<div>';
echo 'My contents';
echo '</div>';
echo '</div>';
}
Use JS to make your sections toggle.
Upvotes: 2