Perform api requests slightly later so that template functions are available.

This commit is contained in:
Mike Jolley 2013-02-06 18:55:41 +00:00
parent d09bc3ad46
commit d6a9f3e460
1 changed files with 1 additions and 3 deletions

View File

@ -147,6 +147,7 @@ class Woocommerce {
add_action( 'widgets_init', array( $this, 'register_widgets' ) );
add_action( 'init', array( $this, 'init' ), 0 );
add_action( 'init', array( $this, 'include_template_functions' ), 25 );
add_action( 'init', array( $this, 'api_requests' ), 50 );
add_action( 'after_setup_theme', array( $this, 'compatibility' ) );
// Loaded action
@ -500,9 +501,6 @@ class Woocommerce {
// Init Images sizes
$this->init_image_sizes();
// Trigger API requests
$this->api_requests();
// Init action
do_action( 'woocommerce_init' );
}