Back to list of all filter and action hooks for Fluid Checkout Lite.
Description #
Adds custom HTML attributes to the checkout page body element.
This filter has a limitation when adding CSS classes. Due to how the plugin outputs the body element, adding `class` attributes through this filter will result in invalid HTML (Multiple `class` attributes on the same element).
For CSS classes, use WordPress’s `body_class` filter instead.
Parameters #
$attributes
(array) Array of HTML attributes as key-value pairs. Defaults toarray()
.
Examples #
/**
* Add custom body attributes for theme compatibility
*/
function add_custom_body_attributes( $attributes ) {
$attributes['class'] = 'custom-checkout-body';
return $attributes;
}
add_filter( 'fc_checkout_body_custom_attributes', 'add_custom_body_attributes', 10 );