add_action('woocommerce_email_classes', 'register_custom_order_status_emails', 20, 1); function register_custom_order_status_emails($emails) { // 🔐 Check that WooCommerce core email class exists if (!class_exists('WC_Email')) { return $emails; } // ✅ Include custom email classes $custom_email_dir = get_stylesheet_directory() . '/emails/'; require_once $custom_email_dir . 'class-wc-email-customer-long-production.php'; require_once $custom_email_dir . 'class-wc-email-customer-ready-collection.php'; require_once $custom_email_dir . 'class-wc-email-customer-ready-shipping.php'; // ✅ Register classes with WooCommerce $emails['WC_Email_Customer_Long_Production'] = new WC_Email_Customer_Long_Production(); $emails['WC_Email_Customer_Ready_Collection'] = new WC_Email_Customer_Ready_Collection(); $emails['WC_Email_Customer_Ready_Shipping'] = new WC_Email_Customer_Ready_Shipping(); return $emails; } African Gift Shop | Africa Goes Local | Local Is Lekker ZA | African Gifts