• Merhabalar Türkiye’nin 1 nisan itibari ile bazı ürünler online satışı yasaklandı bu yasaya göre sitemdeki bazı ürünler Google’de gösterilmesini ama Sepete ekle butonu kalkmasını istiyorum 113 ürünüm var internetten araştırdığıma göre ek css ile bazı ürünlere (deneme amaçlı https://dostahsap.com.tr/urun/150-m2-tomruk-agac-ev/ bu üründe sepete ekle butonunu kaldırdım ama bu sefer sayfamda tükendi yazıyor) bu sebep ile Google’den ürünüm kalktı mı? nasıl bir yol çizebilirim yardımcı olabilir misiniz.? Saygılarım ile iyi çalışmalar dilerim

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    I understand that you want to hide the “Add to Cart” button without removing the product from Google. Since you mentioned that you hid the button using CSS but it caused the product to appear as out of stock, that is indeed unusual — simply hiding the button with CSS should not affect the stock status.

    However, it’s possible that the stock quantity display is suppressed when the “Add to Cart” button is hidden.

    That said, you can try using the following code to hide the “Add to Cart” button for specific products without affecting their visibility on Google:

    add_filter('woocommerce_is_purchasable', 'custom_make_product_not_purchasable', 10, 2);
    function custom_make_product_not_purchasable($purchasable, $product) {
    $excluded_ids = array(5472, 5462); // Replace with your product IDs
    if (in_array($product->get_id(), $excluded_ids)) {
    return false;
    }
    return $purchasable;
    }

    Note: You’ll need to replace 5472 and 5462 with the product IDs for which you want to hide the “Add to Cart” button.

    If that does not help, I can recommend WooExperts and Codeable.io as options for getting professional help. Alternatively, you can also ask your development questions in the  WooCommerce Community Slack as custom code falls outside our usual scope of support

    Plugin Support Feten L. a11n

    (@fetenlakhal)

    Hi there,

    We haven’t heard back in a bit, so I’ll go ahead and mark this as resolved for now. If you’d like to pick things back up later, we’re just a message away!

    Apart from this, if you have a moment, we’d really appreciate a review: https://ww.wp.xz.cn/support/plugin/woocommerce/reviews/#new-post

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Sepet’ is closed to new replies.