Merge pull request #4518 from a3rev/master
Apply filter for wc_get_template_part() function
This commit is contained in:
commit
9fe57f9dfe
|
@ -67,6 +67,9 @@ function wc_get_template_part( $slug, $name = '' ) {
|
||||||
if ( !$template )
|
if ( !$template )
|
||||||
$template = locate_template( array ( "{$slug}.php", WC()->template_path() . "{$slug}.php" ) );
|
$template = locate_template( array ( "{$slug}.php", WC()->template_path() . "{$slug}.php" ) );
|
||||||
|
|
||||||
|
// Allow 3rd party plugin filter template file from their plugin
|
||||||
|
$template = apply_filters( 'wc_get_template_part', $template, $slug, $name );
|
||||||
|
|
||||||
if ( $template )
|
if ( $template )
|
||||||
load_template( $template, false );
|
load_template( $template, false );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue