Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // woocommerce/includes/wc-core-functions.php
- // Locate wc_get_template function and add this two lines, line 102 like in the exemple above
- // // Allow 3rd party plugin filter template file from their plugin
- // $located = apply_filters( 'wc_get_template', $located, $template_name, $args, $template_path, $default_path );
- function wc_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) {
- if ( $args && is_array( $args ) ) {
- extract( $args );
- }
- $located = wc_locate_template( $template_name, $template_path, $default_path );
- if ( ! file_exists( $located ) ) {
- _doing_it_wrong( __FUNCTION__, sprintf( '<code>%s</code> does not exist.', $located ), '2.1' );
- return;
- }
- // Allow 3rd party plugin filter template file from their plugin
- $located = apply_filters( 'wc_get_template', $located, $template_name, $args, $template_path, $default_path );
- do_action( 'woocommerce_before_template_part', $template_name, $template_path, $located, $args );
- include( $located );
- do_action( 'woocommerce_after_template_part', $template_name, $template_path, $located, $args );
- }
Advertisement
Add Comment
Please, Sign In to add comment