# HYROS Installation: WooCommerce ## IMPORTANT NOTES BEFORE STARTING **Read these warnings first:** 1. **Recurring Sales:** WooCommerce does not currently send recurring sales into HYROS by default. HYROS currently tracks recurring sales for WooCommerce users who also use the **YITH Subscription plugin**. If you're using a different plugin for recurring sales, contact support. 2. **Track Cost of Goods:** To accurately track cost of goods, install the FREE plugin: [Cost of Goods for WooCommerce](https://wordpress.org/plugins/cost-of-goods-for-woocommerce/#installation). See Optional Steps section below. --- ## REQUIREMENTS - Collect Before Starting | Item | Ask User | |------|----------| | WordPress Admin Access | "Do you have admin access to your WordPress dashboard?" | | WooCommerce Installed | "Is WooCommerce installed and active on your site?" | | YITH Subscription? | "Are you using YITH Subscription plugin for recurring sales?" | --- ## STEP 1: Install the Universal Script **If automating:** Get the HYROS Universal Script from the tracking section. In WordPress, navigate to Appearance → Theme File Editor. Select the active theme and open header.php. Paste the Universal Script as high as possible within the `` section. Click Update File. **If guiding user:** 1. "Log in to your HYROS account." 2. "Go to the Tracking section." 3. "Copy the Universal Tracking Script provided there." 4. "Log in to your WordPress admin dashboard." 5. "Navigate to Appearance → Theme File Editor." 6. "In the Theme Editor, select the active theme you're using." 7. "Open the Theme Header file (commonly named `header.php`)." 8. "Paste the HYROS Universal Script as high as possible within the `` section of the code." 9. "Click Update File to save the changes." → Confirm: "Is the Universal Script installed in your theme header?" --- ## STEP 2: Connect WooCommerce to HYROS **If automating:** In HYROS, go to Settings → Integrations → WooCommerce. Click Configure. In WordPress, go to WooCommerce → Settings → Advanced → REST API. Click Add Key to generate API credentials. Copy Consumer Key and Consumer Secret. Paste into HYROS along with store name and domain. **If guiding user:** 1. "Log in to your HYROS account." 2. "Navigate to Settings → Integrations." 3. "Search for 'WooCommerce' in the list." 4. "Click Configure." 5. "Now go to your WordPress admin dashboard." 6. "Navigate to WooCommerce → Settings." 7. "Click on the Advanced tab." 8. "Select REST API from the submenu." 9. "Click Add Key to generate a new API key." 10. "After generating the API key, copy the Consumer Key and Consumer Secret." 11. "Return to the WooCommerce integration page in HYROS." 12. "Paste the Consumer Key and Consumer Secret into the appropriate fields." 13. "Also enter your store name and domain." → Confirm: "Is WooCommerce connected in HYROS?" --- ## OPTIONAL: Sales Mapping Configure which order statuses count as sales in HYROS: 1. "Access your WooCommerce integration settings from HYROS → Settings → Integrations." 2. "Click Configure below WooCommerce, then click the Edit button." 3. "Type in the different order states you would like HYROS to consider as Sales." 4. "Click 'Change State Values'." --- ## OPTIONAL: Track Cash on Delivery By default, HYROS ignores "Cash on Delivery" events because money is not actually received. To track these as sales: 1. "Go to your WooCommerce integration in HYROS." 2. "Toggle on the Cash on Delivery option." 3. "These events will be processed as sales once the order has 'PROCESSING' status." --- ## OPTIONAL: Cost of Goods Plugin To track cost of goods: 1. "Navigate to the Plugins area in your WordPress dashboard." 2. "Click on 'Add New'." 3. "Search for 'Cost of Goods for WooCommerce'." 4. "Click 'Install' and then 'Activate'." 5. "Once activated, a new 'Cost of Goods' tab appears in WooCommerce settings." --- ## TROUBLESHOOTING ### Script not firing? - Check code is before `` - Clear WordPress and browser cache - Ensure you're editing the active theme ### Orders not tracking? - Verify WooCommerce integration is connected - Check webhook settings are correct - Confirm API keys have proper permissions (Read-only for: Customers, Orders, Order Transactions, Products) ### Recurring sales not tracking? - Currently only supported with YITH Subscription plugin - Contact HYROS support for other subscription plugins --- ## Source Synced from: docsContent.ts (woocommerceGuide) Last synced: 2026-01-03