• Resolved Marcus Karlos

    (@power2009)


    I encountered a problem when I tried to integrate, or rather, add a Sharing panel to the product blocks on the page. However, it uses the actual pages like page 1, 2, 3, and so on. The issue is that in share.php, on line 406, the link was being generated based solely on the current page. Many people like me, or perhaps others, would want to use social sharing not just on the full product or WordPress post pages, but also on any product block, for example, when there are several products on a page. My solution was to create a condition to address these needs. I hope you will include this fix in the next update, as it is quite simple.

    $currentUrl = '';
    
    if ( 'product' === get_post_type($postId) ) {
        // If it's a product, get the correct permalink
        $currentUrl = get_permalink($postId);
    } else {
        // If it's not a product, use the current page's URL
        $currentUrl = (isset($_SERVER['HTTPS']) && sanitize_text_field($_SERVER['HTTPS']) === 'on' ? 'https' : 'http') . '://' . sanitize_text_field($_SERVER['HTTP_HOST']) . sanitize_url($_SERVER['REQUEST_URI']);
    }
    

    This is a good solution to all the issues.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Reedwanul Haque

    (@reedwanul)

    Dear @power2009 ,

    Thanks for reaching out to us.

    I understand your concern and have shared the issue and suggestion with the development team for further review. They are currently investigating it. I will keep you informed as soon as I receive any updates from them. Your patience and cooperation are greatly appreciated.

    Best Regards,
    Reju

    Plugin Support Reedwanul Haque

    (@reedwanul)

    Dear @power2009,

    I hope you are doing well. Currently, our modules do not support loop products. Please consider submitting a feature request by visiting the plugin details page and clicking the “Request a Feature” button. This will help bring more attention to adding this support. Hopefully, this clarifies the process.

    Feel free to let me know if you have any other questions or need clarification.

    Best Regards,
    Reju

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