• Hello YITH,

    This plugin came with my purchased theme (Barberry) and it works great but the wishlist button shortcode is not rendering on my product listings loop (its just blank where it loads the shortcode).

    I already have AJAX Loading enabled, and I have “Show Add to Wishlist in loop” enabled under Loop Settings.

    I’m using the shortcode [yith_wcwl_add_to_wishlist] inside of another plugin called “Media Grid”. Maybe there a list of parameters/modifiers I can use with this shortcode to get it working?

    The Media Grid plugin allows you to input shortcodes into it’s product gallery custom overlays. Other shortcodes work fine but YITH is not ‘rendering’ anything. No errors, nothing just blank.

    I contacted the creator of Media Grid and he told me the following:

    View post on imgur.com

    He is saying that the YITH Wishlist shortcode is not being “enqueued” into the page.

    Is there a way to force the YITH wishlist shortcode to be enqueued?

    Please let me know if I can provide more information. I think the plugin is great and I’d like to upgrade to premium, but I need to know if it will work with my site first.

    Thank you.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Juan Coronel

    (@juaancmendez)

    Hello there,
    we hope you’re doing well!

    Please try adding the following code in the functions.php file of your active child theme and tell us if its solve the problem:

    if ( ! function_exists( 'yith_wcwl_enqueue_back_required_assets' ) ) {
     function yith_wcwl_enqueue_back_required_assets() {
     $suffix  = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
     $version = defined( 'WC_VERSION' ) ? WC_VERSION : '';
    
     wp_enqueue_style( 'woocommerce_prettyPhoto_css', plugins_url( 'assets/css/prettyPhoto.css', WC_PLUGIN_FILE ), array(), $version );
     wp_enqueue_script( 'prettyPhoto', plugins_url( 'assets/js/prettyPhoto/jquery.prettyPhoto' . $suffix . '.js', WC_PLUGIN_FILE ), array( 'jquery' ), '3.1.6' );
     wp_enqueue_script( 'prettyPhoto-init', plugins_url( 'assets/js/prettyPhoto/jquery.prettyPhoto.init' . $suffix . '.js', WC_PLUGIN_FILE ), array( 'jquery' ), $version );
    
     wp_enqueue_style( 'yith-wcwl-main', YITH_WCWL_URL . 'assets/css/style.css', array( 'jquery-selectBox' ) );
     }
    
       add_action( 'wp_enqueue_scripts', 'yith_wcwl_enqueue_back_required_assets', 99999 );
    }

    If it doesn’t work, please share the link to your site where our container is not displayed. Also, make sure you have our plugin updated to the latest version.

    Let us know any news.

    Best regards.

    Thread Starter spaceblazer

    (@spaceblazer)

    Thanks for the prompt reply Juan. I added the code to my child theme’s functions.php file and it has no effect. The shortcode still does not get ‘rendered’ and is just blank in the code.

    Here’s an example of adding the YITH shortcode into a custom content element:
    https://i.imgur.com/SqQqcd4.png

    On the front end here is where the YITH shortcode is supposed to render:
    https://i.imgur.com/cD6bwlp.png

    I wrapped it in a <div> to make it easier to see in the code.

    From looking at your provided code it appears maybe it is enqueueing just the visual assets?

    It seems like maybe the core code from the shortcode itself is being excluded from being enqueued perhaps?

    Thanks again I appreciate any help or guidance you can provide.

    Plugin Support Pablo Pérez

    (@pperez001)

    Hi,

    We would like to first verify your installation. Could you please send us a screenshot of whole the configuration you have in our plugin for the loop page and code or block with our shortcode to include the button?

    We are looking forward to hear from you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘YITH Wishlist shortcode not getting enqueued’ is closed to new replies.