wpsc_action_rel_canonical

Make sure the canonical URL of a single product page is correct.

Description

wpsc_action_rel_canonical(); 

When wpsc_filter_product_permalink() is attached to post_type_link,, the side effect is that canonical URL is not canonical any more because wpsc_product_category query var is taken into account.

This function temporarily removes the original wpsc_filter_product_permalink() function from post_type_link, hook, and replaces it with wpsc_filter_product_permalink_canonical().


Usage

  1. if ( !function_exists( 'wpsc_action_rel_canonical' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'wp-ecommerce/wpsc-components/theme-engine-v2/helpers/template-engine.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wpsc_action_rel_canonical(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wpsc-components/theme-engine-v2/helpers/template-engine.php