Skip to content

Instantly share code, notes, and snippets.

@Musilda
Created February 17, 2019 10:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Musilda/6ce4d4c450643b10fb87410b34b42873 to your computer and use it in GitHub Desktop.
Save Musilda/6ce4d4c450643b10fb87410b34b42873 to your computer and use it in GitHub Desktop.
<?php
define( 'TORETDIR', plugin_dir_path( __FILE__ ) );
add_filter( 'woocommerce_locate_template', 'toret_locate_template', 10, 3 );
function toret_locate_template( $template, $template_name, $template_path ) {
if ( $template_name == 'price.php' ){
$template = TORETDIR . 'price.php';
}
return $template;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment