可以选择其他文件夹来覆盖WooCommerce模板。
默认情况下,该文件夹为:theme> woocommerce。
但我想更改为:theme> myShop> templates。
是的,请参阅woocommerce_template_path。未经测试,但我认为应该可以。
function so_34386333_custom_template_path(){
return 'myShop/templates/';
}
add_filter( 'woocommerce_template_path', 'so_34386333_custom_template_path' );
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句