Home / Admin / Force Billing Address
Duplicate Snippet

Embed Snippet on Your Site

Force Billing Address

This plugin forces the billing address to always be collected at checkout

Code Preview
php
<?php
/**
 * Always force the billing address to show at checkout.
 */
function prefix_edd_force_billing_address() {
	// If the cart already needs tax address fields, don't force the billing address.
	if ( edd_cart_needs_tax_address_fields() ) {
		return;
	}
	if ( ! did_action( 'edd_after_cc_fields', 'edd_default_cc_address_fields' ) ) {
		edd_default_cc_address_fields();
	}
}
add_action( 'edd_purchase_form_after_cc_form', 'prefix_edd_force_billing_address' );

Comments

Add a Comment