Home / Archive / Change Postcode To Zipcode
Duplicate Snippet

Embed Snippet on Your Site

Change Postcode To Zipcode

Change the "Postcode" field into a "ZIP Code" field.

Code Preview
php
<?php
/**
 * Change the "Postcode" field into a "ZIP Code" field.
 *
 * @param   array[] $fields
 * @return  array[]
 */
add_action(
	'init',
	function ( $fields ) {
		$fields       = charitable()->donation_fields();
		$field        = $fields->get_field( 'postcode' );
		$field->label = 'ZIP Code';
		$field->set( 'donation_form', 'label', 'ZIP Code' );
	},
	11
);

Comments

Add a Comment