Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. Shop / WooCommerce
  3. Hide button on out of stock product

Hide button on out of stock product

Scheduled Pinned Locked Moved Shop / WooCommerce
3 Posts 2 Posters 119 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Blurred00
    wrote on Jun 7, 2024, 7:45 AM last edited by Blurred00 Jun 7, 2024, 3:46 AM
    #1

    Hi, there is a way to disable a button on out of stock product?
    I ve customized it by "ADD TO CART" plugin with a cart icon and it work well but when product is out of stock it show a empity square.
    I ve added also this css code :

    .woocommerce a.button.add_to_cart_button{
    border-radius: 50%;
    }

    Screenshot 2024-06-07 alle 09.42.53.png

    1 Reply Last reply
    0
    • A Offline
      A Offline
      alasdair17
      wrote on Jun 9, 2024, 8:43 PM last edited by
      #2

      Try using: display: none !important; on the css selector.

      B 1 Reply Last reply Jun 10, 2024, 9:03 AM
      1
      • A alasdair17
        Jun 9, 2024, 8:43 PM

        Try using: display: none !important; on the css selector.

        B Offline
        B Offline
        Blurred00
        wrote on Jun 10, 2024, 9:03 AM last edited by Blurred00 Jun 10, 2024, 5:22 AM
        #3

        @alasdair17 said in Hide button on out of stock product:

        display: none !important;

        thanks for the reply. what is the class that i need to use? i can't found it

        Edit. Solved.

        here the css code:

        .outofstock .button
        {
        display: none !important;
        }

        1 Reply Last reply
        1
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes

        2/3

        Jun 9, 2024, 8:43 PM


        I also code custom websites or custom Lay features.
        💿 Email me here: 💿
        info@laytheme.com

        Before you post:
        1. When using a WordPress Cache plugin, disable it or clear your cache.
        2. Update Lay Theme and all Lay Theme Addons
        3. Disable all Plugins
        4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

        This often solves issues you might run into

        When you post:
        1. Post a link to where the problem is
        2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
        3. If the problem is difficult to explain, post screenshots / link to a video to explain it
        Online Users
        Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
        laytheme.com
        • Login

        • Don't have an account? Register

        • Login or register to search.
        2 out of 3
        • First post
          2/3
          Last post
        0
        • Recent
        • Tags
        • Popular
        • Users
        • Search