How to add custom div to checkout page?

Picture of Woocoders
Woocoders
2nd September 2020
/* Add custom div to checkout page */
// Hook in

add_filter( 'woocommerce_before_order_notes' , 'custom_override_checkout_fields' );

// Our hooked in function - $fields is passed via the filter!

function custom_override_checkout_fields( $fields ) {

    echo '<div id="customdiv">';  

 echo '</div>';
return $fields;
}

Share this post: