<span style="color: #666666; font-family: 'Open Sans', Arial, sans-serif;">Hi. I need to set a custom class called “custom-checkout” to my checkout shortcode. But I can't find any option to add custom class to specific page. </span>
You can use body_class filter for this. Not sure if this is possible via Shortcode, but something like this should work :
add_filter('body_class',function($classes){
if(function_exists('wc_get_page_id')){
$checkout_id = wc_get_page_id('checkout');
if(!empty($checkout_id)){
if(is_page($checkout_id)){
$classes[]='custom-checkout';
}
}
}
return $classes;
});
p.s : Make sure you have FTP details when you're trying this.