|

srfm_address_before_fields

Description

Fires inside the Address field markup, immediately before the individual address sub-fields are rendered. Use it to inject custom markup at the top of an address field.

Parameters

  • $attributes (array) – The address block attributes. $block_id (string) – The unique block ID of the address field.

Hook Source

PHP
/**
* hook source
 */
do_action( 'srfm_address_before_fields', $this->attributes, $this->block_id );

Hook Usage

PHP
add_action( 'srfm_address_before_fields', 'my_callback', 10, 2 ); function my_callback( $attributes, $block_id ) { 
// Output custom markup before address sub-fields. 
}

Hook Example

PHP
add_action( 'srfm_address_before_fields', 'my_callback', 10, 2 ); function my_callback( $attributes, $block_id ) { 
// Output custom markup before address sub-fields. 
}
Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
Table of Contents
Scroll to Top