Skip to content

Instantly share code, notes, and snippets.

@thecodepoetry
Created December 4, 2020 09:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thecodepoetry/7d7383618fce3ce151398ddf1515e452 to your computer and use it in GitHub Desktop.
Save thecodepoetry/7d7383618fce3ce151398ddf1515e452 to your computer and use it in GitHub Desktop.
Add Billing and Additonal info header in WC checkout
add_action( 'woocommerce_before_checkout_billing_form', 'dt_wc_billing_header', 10 );
function dt_wc_billing_header() {
if ( wc_ship_to_billing_address_only() && WC()->cart->needs_shipping() ) : ?>
<h3><?php esc_html_e( 'Billing &amp; Shipping', 'woocommerce' ); ?></h3>
<?php else : ?>
<h3><?php esc_html_e( 'Billing details', 'woocommerce' ); ?></h3>
<?php endif;
}
add_action( 'woocommerce_before_order_notes', 'dt_wc_additonal_header', 10 );
function dt_wc_additonal_header() {
?>
<h3><?php esc_html_e( 'Additional information', 'woocommerce' ); ?></h3>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment