• Resolved Feather

    (@abhg613)


    Dear plugin author

    i would like to customize the “Extra views” panel, as this part is missing options in the plugin setting

    in my case i would like to exclude the description and the stock status, i want just to show – title, image, price, add to cart button

    Snippet code is perfect, thanks

Viewing 1 replies (of 1 total)
  • Plugin Support Kris

    (@c0nst)

    Hi @abhg613!

    As you wish!

    add_filter( 'dgwt/wcas/suggestion_details/product/html', function( $html ) {
    // Remove dgwt-wcas-details-hr
    $html = str_replace( '<div class="dgwt-wcas-details-hr"></div>', '', $html );
    // Remove description
    $html = preg_replace( '#<div class="dgwt-wcas-details-desc">(.+?)</div>#s', '', $html );
    // Remove stock status
    $html = preg_replace( '#<span class="dgwt-wcas-stock[^"]*">(.+?)</span>#s', '', $html );

    return $html;
    }, 10 );

    You have two ways to add this code to your theme:

    1. Open the functions.php in your child theme and add the code at the end.
    2. or install the Code Snippets plugin and apply this code as a snippet.

    Regards,
    Kris

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