• Resolved trik79

    (@trik79)


    Hello,

    How to Remove featured and gallery images from out of stock products?
    I only have products in single availability, and images of products out of stock run take up too much space.
    Thank you very much.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Luminus Alabi

    (@luminus)

    Automattic Happiness Engineer

    @trik79,

    Go to WooCommerce → Settings → Products → Inventory and enable the Hide out of stock items from the catalog checkbox.

    This will stop any products that are out of stock from being displayed on the shop.

    Thread Starter trik79

    (@trik79)

    thank you very much, but I wanted to know if there is a way to automatically remove images of out of stock products, not just not show them.

    Not automatically.

    In the media library you’ll find a column called “Uploaded to”, look for lines where it says “unattached” – so not attached to any post or product page. However its possible an unattached image may be attached to say a slider.

    This will only allow you to identify and then delete sold products primary images from the media library. There will still be thumbnails in the files area, wp-content/uploads/… If you have ever switched themes, changed image settings or run regenerate thumbnails there could be dozens of thumbnails of different sizes in there. Housekeeping that area through FTP could be tedious.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Images from out of stock products’ is closed to new replies.