Skip to main content

fc_checkout_wrapper_inside_element_custom_attributes

Type: Filter

Filters custom attributes added inside the checkout form wrapper.

Signature​

apply_filters( 'fc_checkout_wrapper_inside_element_custom_attributes', $attributes );

Parameters​

NameTypeDescription
$attributesarrayHTML attributes as an associative array. Default empty array.

Since​

  • 3.0.1

Source: templates/fc/checkout-steps/checkout/form-checkout.php

Examples​

Currently does not accept class attributes.

add_filter( 'fc_checkout_wrapper_inside_element_custom_attributes',
/**
* Add custom attributes to checkout wrapper inside element.
*
* @param array $attributes HTML attributes as an associative array. Default empty array.
* @return array Filtered value.
*/
function( $attributes ) {
$attributes['data-custom'] = 'fc-inside-custom-data';
return $attributes;
},
10
);