Strange error where detecting the page (is_page etc) would break the canonical redirect in some instances when hooked into 'wp'. Used the later get_header hook instead.
This commit is contained in:
parent
ba1377933f
commit
8332137cf9
|
@ -147,6 +147,10 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
|
|||
|
||||
== Changelog ==
|
||||
|
||||
==
|
||||
|
||||
* Fix - Strange error where detecting the page (is_page etc) would break the canonical redirect in some instances when hooked into 'wp'. Used the later get_header hook instead.
|
||||
|
||||
= 1.5.6 - 17/05/2012 =
|
||||
* Feature - Default display for shipping methods is radio buttons. Before, when methods were enabled/disabled based on coupons or customer, changed methods could go unnoticed. Radio options are always visible.
|
||||
* Feature - Option to display shipping methods as a select box vs. radio buttons
|
||||
|
|
|
@ -102,7 +102,7 @@ if ( !is_admin() || defined('DOING_AJAX') ) {
|
|||
/* Shop Page Handling and Support */
|
||||
add_action( 'template_redirect', 'woocommerce_redirects' );
|
||||
add_filter( 'wp_nav_menu_objects', 'woocommerce_nav_menu_item_classes', 2, 20 );
|
||||
add_action( 'wp', 'woocommerce_front_page_archive_paging_fix', 1 );
|
||||
add_action( 'get_header', 'woocommerce_front_page_archive_paging_fix', 1 );
|
||||
add_action( 'woocommerce_before_shop_loop', 'woocommerce_front_page_archive', 1 );
|
||||
add_filter( 'wp_list_pages', 'woocommerce_list_pages' );
|
||||
|
||||
|
@ -111,7 +111,7 @@ add_filter( 'wp_nav_menu_items', 'woocommerce_nav_menu_items', 10, 2 );
|
|||
|
||||
/* Clear the cart */
|
||||
if (get_option('woocommerce_clear_cart_on_logout')=='yes') add_action( 'wp_logout', 'woocommerce_empty_cart' );
|
||||
add_action( 'wp', 'woocommerce_clear_cart_after_payment' );
|
||||
add_action( 'get_header', 'woocommerce_clear_cart_after_payment' );
|
||||
|
||||
/* Disable admin bar */
|
||||
add_action( 'init', 'woocommerce_disable_admin_bar' );
|
||||
|
|
|
@ -220,7 +220,7 @@ class Woocommerce {
|
|||
add_filter( 'template_include', array(&$this, 'template_loader') );
|
||||
add_filter( 'comments_template', array(&$this, 'comments_template_loader') );
|
||||
add_filter( 'wp_redirect', array(&$this, 'redirect'), 1, 2 );
|
||||
add_action( 'wp', array(&$this, 'buffer_checkout') );
|
||||
add_action( 'get_header', array(&$this, 'buffer_checkout') );
|
||||
add_action( 'wp_enqueue_scripts', array(&$this, 'frontend_scripts') );
|
||||
add_action( 'wp_head', array(&$this, 'generator') );
|
||||
add_action( 'wp_head', array(&$this, 'wp_head') );
|
||||
|
@ -239,7 +239,7 @@ class Woocommerce {
|
|||
|
||||
// Actions for SSL
|
||||
if ( ! is_admin() || defined('DOING_AJAX') ) {
|
||||
add_action( 'wp', array( &$this, 'ssl_redirect' ) );
|
||||
add_action( 'get_header', array( &$this, 'ssl_redirect' ) );
|
||||
|
||||
$filters = array( 'post_thumbnail_html', 'widget_text', 'wp_get_attachment_url', 'wp_get_attachment_image_attributes', 'wp_get_attachment_url', 'option_siteurl', 'option_homeurl', 'option_home', 'option_url', 'option_wpurl', 'option_stylesheet_url', 'option_template_url', 'script_loader_src', 'style_loader_src', 'template_directory_uri', 'stylesheet_directory_uri', 'site_url' );
|
||||
foreach ( $filters as $filter ) add_filter( $filter, array( &$this, 'force_ssl') );
|
||||
|
|
Loading…
Reference in New Issue