I run a WordPress store powered by WooCommerce. Right now every category page sorts items alphabetically, which leaves sold-out products sitting in prime position. I’d like that changed so any item that is currently in stock automatically bubbles to the top, while the usual A-to-Z ordering is kept inside each stock group. The second part is about keeping customers in the loop. On every product that is out of stock I need a small “Notify me when available” section where visitors can leave their email address. When we later flip that specific item to “in stock” the system must trigger an email through my existing email service provider, letting only those subscribers know the product is back. Deliverables • Category-page ordering override: in-stock first, then out-of-stock, both alphabetically inside their block. • Opt-in field shown only when stock = 0. • Secure storage of each email tied to the exact product (variant aware). • Automatic, single-send restock email dispatched the moment stock status changes • Brief setup notes so I can adjust wording or styling later. Please rely on standard WooCommerce hooks or a lightweight custom plugin—no heavy third-party add-ons unless essential.