• Resolved enmanueltorras

    (@enmanueltorras)


    When I do a search for an attribute or tag the ‘Add to wishlist, compare and preview’ plugin stops coming up, there is an incompatibility error with the Yith Compare plugin.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author annastaa

    (@annastaa)

    Hello Enmanueltorras,

    I hope you understand that it is unfortunately impossible for a plugin to provide compatibility with all the 3d party code that may exist out there!

    We have looked into compatibility issues with the particular YITH plugins that you refer to. The first and most general recommendation that can be given in cases of 3d party code malfunction in AJAX mode is this: any issues encountered in AJAX mode can be fixed by changing your preset’s Filtering style to URL filters.

    If you wish to try and leave the AJAX mode on:

    1. The YITH WooCommerce Quick View doesn’t seem to have any problems with AJAX filtering mode, please let us know how we can reproduce the issue if you have any!

    2. The YITH WooCommerce Wishlist plugin will work in AJAX mode if you disable the Enable AJAX loading option in YITH > Wishlist section of your WP admin.

    3. The YITH WooCommerce Compare is the trickiest of all, because its routines are uncatchable via the functions.php file of a child theme (IF you had any!).

    If you are a developer and happen to have some kind of a custom plugin of your own, you can attach this code to the plugins_loaded action (at priority #10):

    if( defined( 'YITH_WOOCOMPARE' ) ) {
      if( wp_doing_ajax() && isset( $_REQUEST['awf_front'] ) && isset( $_GET['awf_action'] ) && 'filter' === $_GET['awf_action'] ) {
        $_REQUEST['context'] = 'frontend';
        $_REQUEST['action'] = 'annasta_woocommerce_product_filters';
    
        add_filter( 'yith_woocompare_actions_to_check_frontend', function( $actions ) {
          $actions[] = 'annasta_woocommerce_product_filters';
          return $actions;
        } );
      }    
    }

    If you are comfortable with PHP code editing, for a quick test you can add the above code in wp-content/plugins/annasta-woocommerce-product-filters/code/class-a-w-f.php file, somewhere inside the __construct() function, for example after the line that reads (line #80 of the current plugin version):

    self::$plugin_version = A_W_F_VERSION;

    Problem is, it wouldn’t be a permanent fix because any custom code will get erased during the next plugin update.

    I will take a note for us to look into a way to provide some kind of mechanism to treat such special cases, like we already do with some themes!

    Plugin Author annastaa

    (@annastaa)

    Dear Enmanueltorras,

    Thank you for bringing your issue to our attention! Your post here has helped us develop a 3d party support mechanism that has been introduced in the version 1.5.0 of our filters. The YITH WooCommerce Compare compatibility support has become the pilot feature of this new enhancement, for our users to be able to enjoy the built-in compatibility adjustment with annasta Filters.

    I will close this inactive thread, but please don’t hesitate to open a new one if you have any further questions or comments!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Incompatibility with Yith compare’ is closed to new replies.