Plugin Directory

Changeset 909582


Ignore:
Timestamp:
05/07/2014 09:54:30 AM (12 years ago)
Author:
madpixels
Message:

Fixed items removal from compare page and added installation instructions.

Location:
woocommerce-compare-list
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • woocommerce-compare-list/tags/1.0.0/readme.txt

    r909566 r909582  
    21211. Go to WooCommerce settings page and open **Compare List** tab
    22221. Select compare page, which will display comparison table
     231. Go to WordPress permalink settings and resave settings to flush rewrite rules
    2324
    2425== Screenshots ==
  • woocommerce-compare-list/trunk/includes/buttons.php

    r909527 r909582  
    3030add_action( 'woocommerce_before_shop_loop', 'wccm_register_add_compare_button_hook' );
    3131add_action( 'woocommerce_single_product_summary', 'wccm_add_single_product_compare_buttton', 35 );
    32 add_action( 'init', 'wccm_process_button_action' );
     32add_action( 'template_redirect', 'wccm_process_button_action' );
    3333
    3434/**
     
    100100 *
    101101 * @since 1.0.0
    102  * @action init
     102 * @action template_redirect
    103103 */
    104104function wccm_process_button_action() {
     
    114114    }
    115115
    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 );
    117121    exit;
    118122}
  • woocommerce-compare-list/trunk/readme.txt

    r909566 r909582  
    21211. Go to WooCommerce settings page and open **Compare List** tab
    22221. Select compare page, which will display comparison table
     231. Go to WordPress permalink settings and resave settings to flush rewrite rules
    2324
    2425== Screenshots ==
Note: See TracChangeset for help on using the changeset viewer.