ASTRA_Ext_WooCommerce_Markup::checkout_form_fields_args_customization( array $args, array $key, array $value )

Modify billing country & state placeholder.


Description


Parameters

$args

(array) (Required) Checkout form field arguments.

$key

(array) (Required) Checkout form field key.

$value

(array) (Required) Checkout form field value.


Return

(array)


Source

File: addons/woocommerce/classes/class-astra-ext-woocommerce-markup.php

		public function checkout_form_fields_args_customization( $args, $key, $value ) {
			if ( is_checkout() && ! is_wc_endpoint_url( 'order-received' ) && 'yes' === get_option( 'woocommerce_checkout_highlight_required_fields' ) && ( astra_get_option( 'checkout-labels-as-placeholders' ) || 'default' === astra_get_option( 'woo-input-style-type' ) ) ) {
				if ( 'country' === $args['type'] && 'billing_country' === $key ) {
					$args['placeholder'] = $args['placeholder'] ? $args['placeholder'] . ' *' : esc_attr__( 'Select a country / region… *', 'astra-addon' );
				}

				if ( 'state' === $args['type'] && 'billing_state' === $key ) {
					$args['placeholder'] = $args['placeholder'] ? $args['placeholder'] . ' *' : esc_attr__( 'Select an option… *', 'astra-addon' );
				}
			}

			return $args;
		}

Changelog

Changelog
Version Description
4.6.8 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.