A Cozmoslabs Product
Documentation / Developer Knowledge Base / Make other Billing Fields required

Make other Billing Fields required

If you’re need to make the ZIP / Postal Code or the State / Province fields required in your form, you can do this with some custom code:

add_filter( 'pms_inv_get_invoice_fields', 'pmsc_require_billing_fields' );
function pmsc_require_billing_fields( $fields ){

    if( isset( $fields['pms_billing_state'] ) )
        $fields['pms_billing_state']['required'] = 1;
        
    if( isset( $fields['pms_billing_zip'] ) )
        $fields['pms_billing_zip']['required'] = 1;
        
    return $fields;
    
}

Paid Member Subscriptions Pro

Accept (recurring) payments, create subscription plans and restrict content on your website. Easily setup a WordPress membership site using Paid Member Subscriptions.

Get Paid Member Subscriptions

The Ultimate Membership Bundle

Combine the power of Profile Builder with Paid Member Subscriptions to set up user registration, memberships, and recurring revenue.

Get 25% off with the bundle

Help & Support

We’re here to help you every step of the way.

Open a Support Ticket