• Okay – my wishlist feature was not working at all because it would indicate item was added to Wishlist but when anyone clicked on Browse Wishlist, it was always empty. I kept banging my head for a reason as to why? I scoured the internet for other websites that had the Yith Wishlist plugin and then I began comparing the Index Page SOURCE CODE and I found the problem but I don’t know how to fix it!

    For credit card compliance (PCI Compliance) I was required to have the wp-admin and wp-login pages to be secure (https) and I noticed that in the source code for my site it reads as follows for the Yith Wishlist plugin (I changed my web address below in the code to “mydomain” for privacy):

    <script type=”text/javascript”>
    var yith_wcwl_plugin_ajax_web_url = ‘https://mydomain.com/wp-admin/admin-ajax.php&#8217;;
    var login_redirect_url= ‘https://mydomain.com/wp-login.php?redirect_to=%2F&#8217;;
    </script>

    HOWEVER in other websites using the Yith Wishlist plugin successfully they do NOT have the redirect with “https” for neither the wp-admin nor the wp-login
    This presents a big problem because I MUST have those 2 administrative pages secure with https

    So after discovering this, I tested the Yith Wishlist plugin as any visiting customer but adding an “s” to the browser window so that the shop page was in https mode and then I had no problem viewing the items added to the Wishlist!

    So I have found the ROOT of the problem, but is there any way to FIX this issue without unsecuring my admin and login pages?

    Why does Yith Wishlist need to access those urls?

    Any thoughts would be most appreciated and perhaps can help out any other shop in the same situation Thanks in advance for your valued time and input!

    https://www.ads-software.com/plugins/yith-woocommerce-wishlist/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Mate,

    I don’t know if that’s even the problem, when I first installed it worked great.

    But then it started not adding products to list and also not deleting them either.

    It also fails when you ask it to add to cart.

    Really wanted this plugin to work as it’s free and fast -as apposed to WooCommerce’s own solution : (

    Had to deactivate it so users would not get pissed.

    This is what I have sent to yithemes as they are not really interested in fixing the issue it seems.

    You need to add the following to your coding as the plugin code fails to take in effect the SSL path in your plugin for accessing the ajax admin sections…..

    Filename = class.yith-wcwl-init.php

    You need to change;

    var yith_wcwl_plugin_ajax_web_url = ‘<?php echo admin_url(‘admin-ajax.php’) ?>’;

    TO

    var yith_wcwl_plugin_ajax_web_url = ‘<?php echo admin_url(‘admin-ajax.php’,(is_ssl() ? ‘https’ : ‘http’)) ?>’;

    *******************

    Filename = class.yith-wcwl.php

    You need to change;

    return admin_url( ‘admin-ajax.php?wishlist_item_id=’. $item_id );

    TO

    return admin_url( ‘admin-ajax.php?wishlist_item_id=’,(is_ssl() ? ‘https’ : ‘http’) . $item_id );

    *******************

    I am having trouble with removing the item and it staying removed (it removes, but when going back into the wishlist, it is back) – unfortunately I know nothing about PHP or Javascript, but my next step is to check for any java links or something I have missed

    Ok, I have worked it all out now, everything works perfect, adding and removing.

    Filename = class.yith-wcwl-init.php
    Change;
    var yith_wcwl_plugin_ajax_web_url = '<?php echo admin_url('admin-ajax.php') ?>';

    TO

    var yith_wcwl_plugin_ajax_web_url = '<?php echo admin_url('admin-ajax.php', (is_ssl() ? 'https' : 'http')) ?>';

    Filename = class.yith-wcwl-init.php
    Change;
    var login_redirect_url = '<?php echo wp_login_url() . '?redirect_to=' . urlencode( $_SERVER['REQUEST_URI']) ?>';

    TO

    var login_redirect_url = '<?php echo wp_login_url() . '?redirect_to=', (is_ssl() ? 'https' : 'http') . urlencode( $_SERVER['REQUEST_URI']) ?>';

    Filename = class.yith-wcwl-init.php
    Change;
    '<a href="' . admin_url( 'admin.php?page=' . $wc_settings_page . '&tab=yith_wcwl' ) . '">' . __( 'Settings', 'yit' ) . '</a>',

    TO

    '<a href="'http') . $wc_settings_page . '&tab=yith_wcwl' ) . '">' . __( 'Settings', 'yit' ) . '</a>',

    Filename = class.yith-wcwl-ui.php
    Change;
    $html .= '<img src="' . esc_url( admin_url( 'images/wpspin_light.gif' ) ) . '" class="ajax-loading" id="add-items-ajax-loading" alt="" width="16" height="16" style="visibility:hidden" />';

    TO

    $html .= '<img src="' . esc_url( admin_url( 'images/wpspin_light.gif', (is_ssl() ? 'https' : 'http') ) ) . '" class="ajax-loading" id="add-items-ajax-loading" alt="" width="16" height="16" style="visibility:hidden" />';

    Filename = class.yith-wcwl.php
    Change;
    return admin_url( 'admin-ajax.php?wishlist_item_id=' . $item_id);

    TO

    return admin_url( 'admin-ajax.php?wishlist_item_id=' . $item_id, (is_ssl() ? 'https' : 'http'));

    The plugin now works PERFECTLY for me now, I am no longer having issues with it working, on FORCE ADMIN SSL or otherwise.
    For someone who knows nothing about PHP, I have done what the makers of the plugin could not do it seems.

    I have tested this on two different themes that were not working previously – both now work.

    If you have a cache plugin such as WP Super Cache, make sure you clear the cache (I removed mine totally from wp-config and disabled the plugin).

    It is scary that the people who made this plugin also make e-commerce themes and are not using SSL or even testing their plugins with SSL active.

    Hi damiafaw,

    Thanks for responding. There’s one thing that doesn’t seem correct. I am getting an error.

    Filename = class.yith-wcwl-init.php
    Change;
    ‘ . __( ‘Settings’, ‘yit’ ) . ‘‘,

    TO

    ‘ . __( ‘Settings’, ‘yit’ ) . ‘‘,

    It has something to do with <a href=”‘http’). Anything after this is showing up as text and not a php function. Any clue what it could be.

    Thank you so much! I appreciate this.

    Make sure your not missing the ‘ at the very front of the coding for that line.

    '<a href="'http') . $wc_settings_page . '&tab=yith_wcwl' ) . '">' . __( 'Settings', 'yit' ) . '</a>',

    Thanks for responding.

    The ‘ is at the beginning.

    Here’s a screenshot of how the code is looking. You can see that $wc_settings_page in not in white the way it should be.

    https://d.pr/i/o99V

    Hope this helps.

    Why do you have http in the href= section of the active code?
    Should be able to copy and paste this directly in over the top of what is there already.

    '<a href="' . admin_url( 'admin.php?page=', (is_ssl() ? 'https' : 'http') . $wc_settings_page . '&tab=yith_wcwl' ) . '">' . __( 'Settings', 'yit' ) . '</a>',

    Otherwise, just paste this part in only after the admin.php?page=' part;
    , (is_ssl() ? 'https' : 'http')

    Oops I pasted the wrong thing earlier in the thread for that file.
    My apologies…..

    Filename = class.yith-wcwl-init.php
    Change;
    '<a href="' . admin_url( 'admin.php?page=' . $wc_settings_page . '&tab=yith_wcwl' ) . '">' . __( 'Settings', 'yit' ) . '</a>',

    TO

    '<a href="' . admin_url( 'admin.php?page=', (is_ssl() ? 'https' : 'http') . $wc_settings_page . '&tab=yith_wcwl' ) . '">' . __( 'Settings', 'yit' ) . '</a>',

    Apologies everyone, there was a small typo (incorrect copy/paste) in the earlier one.
    Please see the below.

    Filename = class.yith-wcwl-init.php
    Change;
    var yith_wcwl_plugin_ajax_web_url = '<?php echo admin_url('admin-ajax.php') ?>';

    TO

    var yith_wcwl_plugin_ajax_web_url = '<?php echo admin_url('admin-ajax.php', (is_ssl() ? 'https' : 'http')) ?>';

    Filename = class.yith-wcwl-init.php
    Change;
    var login_redirect_url = '<?php echo wp_login_url() . '?redirect_to=' . urlencode( $_SERVER['REQUEST_URI']) ?>';

    TO

    var login_redirect_url = '<?php echo wp_login_url() . '?redirect_to=', (is_ssl() ? 'https' : 'http') . urlencode( $_SERVER['REQUEST_URI']) ?>';

    Filename = class.yith-wcwl-init.php
    Change;
    '<a href="' . admin_url( 'admin.php?page=' . $wc_settings_page . '&tab=yith_wcwl' ) . '">' . __( 'Settings', 'yit' ) . '</a>',

    TO

    '<a href="' . admin_url( 'admin.php?page=', (is_ssl() ? 'https' : 'http') . $wc_settings_page . '&tab=yith_wcwl' ) . '">' . __( 'Settings', 'yit' ) . '</a>',

    Filename = class.yith-wcwl-ui.php
    Change;
    $html .= '<img src="' . esc_url( admin_url( 'images/wpspin_light.gif' ) ) . '" class="ajax-loading" id="add-items-ajax-loading" alt="" width="16" height="16" style="visibility:hidden" />';

    TO

    $html .= '<img src="' . esc_url( admin_url( 'images/wpspin_light.gif', (is_ssl() ? 'https' : 'http') ) ) . '" class="ajax-loading" id="add-items-ajax-loading" alt="" width="16" height="16" style="visibility:hidden" />';

    Filename = class.yith-wcwl.php
    Change;
    return admin_url( 'admin-ajax.php?wishlist_item_id=' . $item_id);

    TO

    return admin_url( 'admin-ajax.php?wishlist_item_id=' . $item_id, (is_ssl() ? 'https' : 'http'));

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Found CAUSE of Problem – Now How can I Fix it’ is closed to new replies.