Skip to main content

fc_get_checkout_layout

Type: Filter

Filters the checkout layout slug.

Signature​

apply_filters( 'fc_get_checkout_layout', $current_value );

Parameters​

NameTypeDescription
$current_valuemixedCurrent value.

Since​

  • 1.2.0

Source: inc/checkout-steps.php

Examples​

add_filter( 'fc_get_checkout_layout',
/**
* Force single-step layout for mobile devices.
*
* @param mixed $current_value Current value.
* @return mixed Filtered value.
*/
function( $current_value ) {
if ( wp_is_mobile() ) {
return 'single-step';
}
return $current_value;
},
10
);