Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Janilyn T

    (@janilyn409)

    Hi @websy ,

    For your information, with functionalities such as Wishlist/Compare/Quick View, in order for these to work properly, the theme or template plays a crucial role. These plugins are heavily dependent on the theme elements so they can appear or function properly.

    If you meant you could not add the Wishlist button using Elementor, you might need to add it by using the shortcode [woosw id=”{product id}”]. If the button couldn’t work, probably the theme or template is interfering with our plugins.

    Best regards.

    Hi there, @websy

    To use in elementor loop item or to make the plugin’s [woosw id=”{product id}”] shortcode dynamically for the current product ID you can add a small code so that it will work.

    function woosw_dynamic_shortcode() {
    if (is_singular('product')) {
    $product_id = get_the_ID();
    } else {
    global $product;
    $product_id = $product ? $product->get_id() : null;
    }
    if ($product_id) {
    return do_shortcode('[woosw id="' . $product_id . '"]');
    }

    return '';
    }
    add_shortcode('dynamic_woosw', 'woosw_dynamic_shortcode');

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.