Include template functions after the theme is loaded, but before init.

Fixes conflicts with plugins (#5884) when they output content before
init.

2.2 has no fatal error as reported in #5884
This commit is contained in:
Mike Jolley 2014-07-31 07:47:55 +01:00
parent 3f906b1ffa
commit 81d882d34a
1 changed files with 4 additions and 4 deletions

View File

@ -140,11 +140,11 @@ final class WooCommerce {
// Hooks
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'action_links' ) );
add_action( 'widgets_init', array( $this, 'include_widgets' ) );
add_action( 'init', array( $this, 'init' ), 0 );
add_action( 'init', array( $this, 'include_template_functions' ) );
add_action( 'init', array( 'WC_Shortcodes', 'init' ) );
add_action( 'after_setup_theme', array( $this, 'setup_environment' ) );
add_action( 'after_setup_theme', array( $this, 'include_template_functions' ), 11 );
add_action( 'init', array( $this, 'init' ), 0 );
add_action( 'init', array( 'WC_Shortcodes', 'init' ) );
add_action( 'widgets_init', array( $this, 'include_widgets' ) );
// Loaded action
do_action( 'woocommerce_loaded' );