Changeset 909583
- Timestamp:
- 05/07/2014 09:55:03 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-compare-list/tags/1.0.0/includes/buttons.php
r909527 r909583 30 30 add_action( 'woocommerce_before_shop_loop', 'wccm_register_add_compare_button_hook' ); 31 31 add_action( 'woocommerce_single_product_summary', 'wccm_add_single_product_compare_buttton', 35 ); 32 add_action( ' init', 'wccm_process_button_action' );32 add_action( 'template_redirect', 'wccm_process_button_action' ); 33 33 34 34 /** … … 100 100 * 101 101 * @since 1.0.0 102 * @action init102 * @action template_redirect 103 103 */ 104 104 function wccm_process_button_action() { … … 114 114 } 115 115 116 wp_redirect( add_query_arg( array( 'wccm' => false, 'pid' => false, 'nonce' => false ) ) ); 116 $redirect = get_option( 'wccm_compare_page' ) == get_queried_object_id() 117 ? wccm_get_compare_page_link( wccm_get_compare_list() ) 118 : add_query_arg( array( 'wccm' => false, 'pid' => false, 'nonce' => false ) ); 119 120 wp_redirect( $redirect ); 117 121 exit; 118 122 }
Note: See TracChangeset
for help on using the changeset viewer.