Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter A.malakar

    (@ayushmalakar)

    Never mind I got the hand of it
    Here is the sample Code

    add_action('woocommerce_after_shop_loop_item', 'show_more_color');
    function show_more_color() {
        global $post, $product;
        if ($product->product_type == 'variable') :
            // Get product variations
    
            $variations = $product->get_available_variations();
            $testVariable = $variations[0];
            $check = $testVariable['attributes']['attribute_color'];
            if ($check) {
                echo '<a href=" ' . get_permalink($post->ID) . '">More Color</a>';
            }
    
        endif;
    }

    Plugin Author YITHEMES

    (@yithemes)

    Hi A.malakar,

    our plugin doesn’t add the “Add to wishlist” button to product loop, so maybe it is your theme to print it.

    Anyway, I’m glad to know you worked your problem around. Marking this as resolved.

    If you have appreciated our plugin, please don’t forget to give us a 5-star vote, and consider buying our premium version: here you can find more information about it, and here you can try a live demo of the plugin. ??

    Have a nice day! ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove on shop page’ is closed to new replies.