Support » Plugin: MultiStep Checkout for WooCommerce » Template override in theme?

  • Resolved campaz

    (@campaz)


    Hi,
    is it possible to override the template file form-checkout.php in my theme?
    Which path should I choose to place my override?
    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author ThemeHigh

    (@themehigh)

    Unfortunately, it is not possible to override the template because it will break the multistep layouts.

    If you prefer you can override the template using the filter woocommerce_locate_template.

    Thank you!

    Thread Starter campaz

    (@campaz)

    Okay, thanks for your input. I managed to override it (if anyone interested) by using:

    add_filter( 'woocommerce_locate_template', 'custom_woocommerce_locate_template', 11, 3 );
    
    function custom_woocommerce_locate_template( $template, $template_name, $template_path )	{
    	if('checkout/form-checkout.php' == $template_name )	{  
    		$template = './wp-content/themes/<theme-name>/checkout/form-checkout.php';
    	} 
    	return $template;
    }
    Plugin Author ThemeHigh

    (@themehigh)

    Great!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Template override in theme?’ is closed to new replies.