Changeset 3434381
- Timestamp:
- 01/07/2026 01:29:20 PM (3 months ago)
- Location:
- runthings-wc-order-departments
- Files:
-
- 54 added
- 16 deleted
- 14 edited
- 1 copied
-
assets/screenshot-1.png (added)
-
assets/screenshot-2.png (added)
-
assets/screenshot-3.png (added)
-
assets/screenshot-4.png (added)
-
tags/1.1.1 (copied) (copied from runthings-wc-order-departments/trunk)
-
tags/1.1.1/assets/js/settings.js (added)
-
tags/1.1.1/languages/runthings-wc-order-departments.pot (modified) (5 diffs)
-
tags/1.1.1/lib/actions (deleted)
-
tags/1.1.1/lib/automatewoo (added)
-
tags/1.1.1/lib/automatewoo-integration.php (modified) (4 diffs)
-
tags/1.1.1/lib/automatewoo/actions (added)
-
tags/1.1.1/lib/automatewoo/actions/aw-action-add-order-department.php (added)
-
tags/1.1.1/lib/automatewoo/actions/aw-action-clear-order-departments.php (added)
-
tags/1.1.1/lib/automatewoo/actions/aw-action-remove-order-department.php (added)
-
tags/1.1.1/lib/automatewoo/actions/aw-action-set-order-department.php (added)
-
tags/1.1.1/lib/automatewoo/rules (added)
-
tags/1.1.1/lib/automatewoo/rules/aw-rule-order-department-count.php (added)
-
tags/1.1.1/lib/automatewoo/rules/aw-rule-order-department-is.php (added)
-
tags/1.1.1/lib/automatewoo/rules/aw-rule-order-has-department.php (added)
-
tags/1.1.1/lib/automatewoo/triggers (added)
-
tags/1.1.1/lib/automatewoo/triggers/aw-trigger-order-department-added.php (added)
-
tags/1.1.1/lib/automatewoo/triggers/aw-trigger-order-department-changed.php (added)
-
tags/1.1.1/lib/automatewoo/triggers/aw-trigger-order-department-removed.php (added)
-
tags/1.1.1/lib/automatewoo/variables (added)
-
tags/1.1.1/lib/automatewoo/variables/aw-variable-order-department-count.php (added)
-
tags/1.1.1/lib/automatewoo/variables/aw-variable-order-department-emails.php (added)
-
tags/1.1.1/lib/automatewoo/variables/aw-variable-order-department-names.php (added)
-
tags/1.1.1/lib/automatewoo/variables/aw-variable-order-departments-emails.php (added)
-
tags/1.1.1/lib/automatewoo/variables/aw-variable-order-departments-names.php (added)
-
tags/1.1.1/lib/email (added)
-
tags/1.1.1/lib/email-interceptor.php (modified) (2 diffs)
-
tags/1.1.1/lib/email/admin-email-interceptor.php (added)
-
tags/1.1.1/lib/email/customer-email-interceptor.php (added)
-
tags/1.1.1/lib/rules (deleted)
-
tags/1.1.1/lib/settings.php (added)
-
tags/1.1.1/lib/triggers (deleted)
-
tags/1.1.1/lib/utils/department-matcher.php (modified) (3 diffs)
-
tags/1.1.1/lib/variables (deleted)
-
tags/1.1.1/readme.md (modified) (5 diffs)
-
tags/1.1.1/readme.txt (modified) (6 diffs)
-
tags/1.1.1/runthings-wc-order-departments.php (modified) (5 diffs)
-
tags/1.1.1/screenshot-1.png (deleted)
-
tags/1.1.1/screenshot-2.png (deleted)
-
tags/1.1.1/screenshot-3.png (deleted)
-
tags/1.1.1/screenshot-4.png (deleted)
-
trunk/assets/js/settings.js (added)
-
trunk/languages/runthings-wc-order-departments.pot (modified) (5 diffs)
-
trunk/lib/actions (deleted)
-
trunk/lib/automatewoo (added)
-
trunk/lib/automatewoo-integration.php (modified) (4 diffs)
-
trunk/lib/automatewoo/actions (added)
-
trunk/lib/automatewoo/actions/aw-action-add-order-department.php (added)
-
trunk/lib/automatewoo/actions/aw-action-clear-order-departments.php (added)
-
trunk/lib/automatewoo/actions/aw-action-remove-order-department.php (added)
-
trunk/lib/automatewoo/actions/aw-action-set-order-department.php (added)
-
trunk/lib/automatewoo/rules (added)
-
trunk/lib/automatewoo/rules/aw-rule-order-department-count.php (added)
-
trunk/lib/automatewoo/rules/aw-rule-order-department-is.php (added)
-
trunk/lib/automatewoo/rules/aw-rule-order-has-department.php (added)
-
trunk/lib/automatewoo/triggers (added)
-
trunk/lib/automatewoo/triggers/aw-trigger-order-department-added.php (added)
-
trunk/lib/automatewoo/triggers/aw-trigger-order-department-changed.php (added)
-
trunk/lib/automatewoo/triggers/aw-trigger-order-department-removed.php (added)
-
trunk/lib/automatewoo/variables (added)
-
trunk/lib/automatewoo/variables/aw-variable-order-department-count.php (added)
-
trunk/lib/automatewoo/variables/aw-variable-order-department-emails.php (added)
-
trunk/lib/automatewoo/variables/aw-variable-order-department-names.php (added)
-
trunk/lib/automatewoo/variables/aw-variable-order-departments-emails.php (added)
-
trunk/lib/automatewoo/variables/aw-variable-order-departments-names.php (added)
-
trunk/lib/email (added)
-
trunk/lib/email-interceptor.php (modified) (2 diffs)
-
trunk/lib/email/admin-email-interceptor.php (added)
-
trunk/lib/email/customer-email-interceptor.php (added)
-
trunk/lib/rules (deleted)
-
trunk/lib/settings.php (added)
-
trunk/lib/triggers (deleted)
-
trunk/lib/utils/department-matcher.php (modified) (3 diffs)
-
trunk/lib/variables (deleted)
-
trunk/readme.md (modified) (5 diffs)
-
trunk/readme.txt (modified) (6 diffs)
-
trunk/runthings-wc-order-departments.php (modified) (5 diffs)
-
trunk/screenshot-1.png (deleted)
-
trunk/screenshot-2.png (deleted)
-
trunk/screenshot-3.png (deleted)
-
trunk/screenshot-4.png (deleted)
Legend:
- Unmodified
- Added
- Removed
-
runthings-wc-order-departments/tags/1.1.1/languages/runthings-wc-order-departments.pot
r3318971 r3434381 1 # Copyright (C) 202 5runthingsdev1 # Copyright (C) 2026 runthingsdev 2 2 # This file is distributed under the GPLv3 or later. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Order Departments for WooCommerce 1. 0.1\n"5 "Project-Id-Version: Order Departments for WooCommerce 1.1.1\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/runthings-wc-order-departments\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 5-06-27T20:54:36+00:00\n"12 "POT-Creation-Date: 2026-01-07T13:27:40+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2.1 1.0\n"14 "X-Generator: WP-CLI 2.12.0\n" 15 15 "X-Domain: runthings-wc-order-departments\n" 16 16 … … 40 40 msgstr "" 41 41 42 #: lib/a ctions/aw-action-add-order-department.php:2042 #: lib/automatewoo/actions/aw-action-add-order-department.php:20 43 43 msgid "Add Order Department" 44 44 msgstr "" 45 45 46 #: lib/a ctions/aw-action-add-order-department.php:2146 #: lib/automatewoo/actions/aw-action-add-order-department.php:21 47 47 msgid "Add a department to the order (keeps existing departments)." 48 48 msgstr "" 49 49 50 #: lib/a ctions/aw-action-add-order-department.php:2251 #: lib/a ctions/aw-action-clear-order-departments.php:2152 #: lib/a ctions/aw-action-remove-order-department.php:2253 #: lib/a ctions/aw-action-set-order-department.php:2254 #: lib/ triggers/aw-trigger-order-department-added.php:2255 #: lib/ triggers/aw-trigger-order-department-changed.php:2156 #: lib/ triggers/aw-trigger-order-department-removed.php:2250 #: lib/automatewoo/actions/aw-action-add-order-department.php:22 51 #: lib/automatewoo/actions/aw-action-clear-order-departments.php:21 52 #: lib/automatewoo/actions/aw-action-remove-order-department.php:22 53 #: lib/automatewoo/actions/aw-action-set-order-department.php:22 54 #: lib/automatewoo/triggers/aw-trigger-order-department-added.php:22 55 #: lib/automatewoo/triggers/aw-trigger-order-department-changed.php:21 56 #: lib/automatewoo/triggers/aw-trigger-order-department-removed.php:22 57 57 msgid "Order" 58 58 msgstr "" 59 59 60 #: lib/a ctions/aw-action-add-order-department.php:3261 #: lib/a ctions/aw-action-remove-order-department.php:3262 #: lib/a ctions/aw-action-set-order-department.php:3263 #: lib/ triggers/aw-trigger-order-department-added.php:3264 #: lib/ triggers/aw-trigger-order-department-removed.php:3260 #: lib/automatewoo/actions/aw-action-add-order-department.php:32 61 #: lib/automatewoo/actions/aw-action-remove-order-department.php:32 62 #: lib/automatewoo/actions/aw-action-set-order-department.php:32 63 #: lib/automatewoo/triggers/aw-trigger-order-department-added.php:32 64 #: lib/automatewoo/triggers/aw-trigger-order-department-removed.php:32 65 65 msgid "Department" 66 66 msgstr "" 67 67 68 68 #. translators: %1$s: Workflow ID, %2$s: Department name 69 #: lib/actions/aw-action-add-order-department.php:89 69 #: lib/automatewoo/actions/aw-action-add-order-department.php:89 70 #, php-format 70 71 msgid "[AutomateWoo] Workflow #%1$s added department: %2$s" 71 72 msgstr "" 72 73 73 #: lib/a ctions/aw-action-clear-order-departments.php:1974 #: lib/automatewoo/actions/aw-action-clear-order-departments.php:19 74 75 msgid "Clear Order Departments" 75 76 msgstr "" 76 77 77 #: lib/a ctions/aw-action-clear-order-departments.php:2078 #: lib/automatewoo/actions/aw-action-clear-order-departments.php:20 78 79 msgid "Remove all departments from the order." 79 80 msgstr "" 80 81 81 82 #. translators: %s: Workflow ID 82 #: lib/actions/aw-action-clear-order-departments.php:50 83 #: lib/automatewoo/actions/aw-action-clear-order-departments.php:50 84 #, php-format 83 85 msgid "[AutomateWoo] Workflow #%s cleared all departments" 84 86 msgstr "" 85 87 86 #: lib/a ctions/aw-action-remove-order-department.php:2088 #: lib/automatewoo/actions/aw-action-remove-order-department.php:20 87 89 msgid "Remove Order Department" 88 90 msgstr "" 89 91 90 #: lib/a ctions/aw-action-remove-order-department.php:2192 #: lib/automatewoo/actions/aw-action-remove-order-department.php:21 91 93 msgid "Remove a department from the order." 92 94 msgstr "" 93 95 94 96 #. translators: %1$s: Workflow ID, %2$s: Department name 95 #: lib/actions/aw-action-remove-order-department.php:89 97 #: lib/automatewoo/actions/aw-action-remove-order-department.php:89 98 #, php-format 96 99 msgid "[AutomateWoo] Workflow #%1$s removed department: %2$s" 97 100 msgstr "" 98 101 99 #: lib/a ctions/aw-action-set-order-department.php:20102 #: lib/automatewoo/actions/aw-action-set-order-department.php:20 100 103 msgid "Set Order Department" 101 104 msgstr "" 102 105 103 #: lib/a ctions/aw-action-set-order-department.php:21106 #: lib/automatewoo/actions/aw-action-set-order-department.php:21 104 107 msgid "Set a department for the order (replaces all existing departments)." 105 108 msgstr "" 106 109 107 110 #. translators: %1$s: Workflow ID, %2$s: Department name 108 #: lib/actions/aw-action-set-order-department.php:89 111 #: lib/automatewoo/actions/aw-action-set-order-department.php:89 112 #, php-format 109 113 msgid "[AutomateWoo] Workflow #%1$s set department to: %2$s" 110 114 msgstr "" 111 115 112 #: lib/ rules/aw-rule-order-department-count.php:22116 #: lib/automatewoo/rules/aw-rule-order-department-count.php:22 113 117 msgid "Order - Department Count" 114 118 msgstr "" 115 119 116 #: lib/ rules/aw-rule-order-department-is.php:22120 #: lib/automatewoo/rules/aw-rule-order-department-is.php:22 117 121 msgid "Order - Department Is" 118 122 msgstr "" 119 123 120 #: lib/ rules/aw-rule-order-has-department.php:22124 #: lib/automatewoo/rules/aw-rule-order-has-department.php:22 121 125 msgid "Order - Has Department" 126 msgstr "" 127 128 #: lib/automatewoo/triggers/aw-trigger-order-department-added.php:20 129 msgid "Order Department Added" 130 msgstr "" 131 132 #: lib/automatewoo/triggers/aw-trigger-order-department-added.php:21 133 msgid "Triggers when a department is added to an order." 134 msgstr "" 135 136 #: lib/automatewoo/triggers/aw-trigger-order-department-added.php:33 137 #: lib/automatewoo/triggers/aw-trigger-order-department-removed.php:33 138 msgid "Leave blank to trigger for any department." 139 msgstr "" 140 141 #: lib/automatewoo/triggers/aw-trigger-order-department-added.php:45 142 #: lib/automatewoo/triggers/aw-trigger-order-department-removed.php:45 143 msgid "Any department" 144 msgstr "" 145 146 #: lib/automatewoo/triggers/aw-trigger-order-department-changed.php:19 147 msgid "Order Department Changed" 148 msgstr "" 149 150 #: lib/automatewoo/triggers/aw-trigger-order-department-changed.php:20 151 msgid "Triggers when order departments are modified in any way." 152 msgstr "" 153 154 #: lib/automatewoo/triggers/aw-trigger-order-department-removed.php:20 155 msgid "Order Department Removed" 156 msgstr "" 157 158 #: lib/automatewoo/triggers/aw-trigger-order-department-removed.php:21 159 msgid "Triggers when a department is removed from an order." 160 msgstr "" 161 162 #: lib/automatewoo/variables/aw-variable-order-department-count.php:23 163 msgid "Displays the number of departments assigned to the order. Useful for conditional logic." 164 msgstr "" 165 166 #: lib/automatewoo/variables/aw-variable-order-department-emails.php:26 167 msgid "Displays department email addresses with flexible access options. Use index for specific departments, \"all\" for all departments, or \"count\" for the number of departments." 168 msgstr "" 169 170 #: lib/automatewoo/variables/aw-variable-order-department-emails.php:30 171 msgid "How to access the department emails." 172 msgstr "" 173 174 #: lib/automatewoo/variables/aw-variable-order-department-emails.php:32 175 #: lib/automatewoo/variables/aw-variable-order-department-names.php:32 176 msgid "By Index (default)" 177 msgstr "" 178 179 #: lib/automatewoo/variables/aw-variable-order-department-emails.php:33 180 #: lib/automatewoo/variables/aw-variable-order-department-names.php:33 181 msgid "All Departments" 182 msgstr "" 183 184 #: lib/automatewoo/variables/aw-variable-order-department-emails.php:34 185 #: lib/automatewoo/variables/aw-variable-order-department-names.php:34 186 msgid "Count of Departments" 187 msgstr "" 188 189 #: lib/automatewoo/variables/aw-variable-order-department-emails.php:41 190 #: lib/automatewoo/variables/aw-variable-order-department-names.php:41 191 msgid "The index of the department to retrieve (1-based). Default is 1 (first department). Only used when mode is \"index\"." 192 msgstr "" 193 194 #: lib/automatewoo/variables/aw-variable-order-department-emails.php:48 195 #: lib/automatewoo/variables/aw-variable-order-departments-emails.php:28 196 msgid "The separator to use between email addresses. Default is \", \" (comma space). Use \";\" for semicolon separation." 197 msgstr "" 198 199 #: lib/automatewoo/variables/aw-variable-order-department-emails.php:55 200 #: lib/automatewoo/variables/aw-variable-order-departments-emails.php:35 201 msgid "Text to add before each email address." 202 msgstr "" 203 204 #: lib/automatewoo/variables/aw-variable-order-department-emails.php:62 205 #: lib/automatewoo/variables/aw-variable-order-departments-emails.php:42 206 msgid "Text to add after each email address." 207 msgstr "" 208 209 #: lib/automatewoo/variables/aw-variable-order-department-names.php:26 210 msgid "Displays department names with flexible access options. Use index for specific departments, \"all\" for all departments, or \"count\" for the number of departments." 211 msgstr "" 212 213 #: lib/automatewoo/variables/aw-variable-order-department-names.php:30 214 msgid "How to access the department names." 215 msgstr "" 216 217 #: lib/automatewoo/variables/aw-variable-order-department-names.php:48 218 msgid "The separator to use between department names when mode is \"all\". Default is \", \" (comma space)." 219 msgstr "" 220 221 #: lib/automatewoo/variables/aw-variable-order-department-names.php:55 222 #: lib/automatewoo/variables/aw-variable-order-departments-names.php:34 223 msgid "Text to add before each department name. Example: \"Dept: \" would turn \"Sales\" into \"Dept: Sales\"." 224 msgstr "" 225 226 #: lib/automatewoo/variables/aw-variable-order-department-names.php:62 227 #: lib/automatewoo/variables/aw-variable-order-departments-names.php:41 228 msgid "Text to add after each department name. Example: \" Dept\" would turn \"Sales\" into \"Sales Dept\"." 229 msgstr "" 230 231 #: lib/automatewoo/variables/aw-variable-order-departments-emails.php:24 232 msgid "Displays a list of all department email addresses assigned to the order. Useful for the \"To\" field in email actions." 233 msgstr "" 234 235 #: lib/automatewoo/variables/aw-variable-order-departments-names.php:23 236 msgid "Displays a list of all department names assigned to the order." 237 msgstr "" 238 239 #: lib/automatewoo/variables/aw-variable-order-departments-names.php:27 240 msgid "The separator to use between department names. Default is \", \" (comma space)." 241 msgstr "" 242 243 #: lib/settings.php:33 244 msgid "Order Departments Settings" 245 msgstr "" 246 247 #: lib/settings.php:34 248 msgid "Order Departments" 249 msgstr "" 250 251 #: lib/settings.php:60 252 msgid "Customer Email Reply-To Settings" 253 msgstr "" 254 255 #: lib/settings.php:68 256 msgid "Override Reply-To with Department Emails" 257 msgstr "" 258 259 #: lib/settings.php:77 260 msgid "For Multi-Department Orders" 261 msgstr "" 262 263 #. translators: %s: Link to WooCommerce email settings 264 #: lib/settings.php:150 265 #, php-format 266 msgid "Configure how customer email replies are routed based on order departments. When disabled, emails use the %s." 267 msgstr "" 268 269 #: lib/settings.php:151 270 #: lib/settings.php:212 271 msgid "WooCommerce email settings" 272 msgstr "" 273 274 #: lib/settings.php:168 275 msgid "Override reply-to with department email addresses" 276 msgstr "" 277 278 #: lib/settings.php:171 279 msgid "When enabled, customer emails will use department email addresses in the reply-to field instead of the default WooCommerce setting." 280 msgstr "" 281 282 #: lib/settings.php:186 283 msgid "Multi-Department Mode" 284 msgstr "" 285 286 #: lib/settings.php:193 287 msgid "Use all department emails" 288 msgstr "" 289 290 #: lib/settings.php:196 291 msgid "Add all unique department email addresses to the reply-to field. All departments will receive customer replies and need to coordinate who responds." 292 msgstr "" 293 294 #: lib/settings.php:205 295 msgid "Skip override - fall back to WooCommerce default" 296 msgstr "" 297 298 #. translators: %s: Link to WooCommerce email settings 299 #: lib/settings.php:211 300 #, php-format 301 msgid "Use the default reply-to address from %s instead of department emails when multiple unique email addresses are involved." 302 msgstr "" 303 304 #: lib/settings.php:218 305 msgid "Note:" 306 msgstr "" 307 308 #: lib/settings.php:219 309 msgid "Multi-department is determined by the number of unique email addresses, not the number of departments. If multiple departments share the same email address, they are treated as a single department." 122 310 msgstr "" 123 311 … … 171 359 #. translators: %s: Product name 172 360 #: lib/taxonomy.php:456 361 #, php-format 173 362 msgid "First product: %s" 174 363 msgstr "" … … 176 365 #. translators: %d: Number of products 177 366 #: lib/taxonomy.php:458 367 #, php-format 178 368 msgid "%d product" 179 369 msgid_plural "%d products" 180 370 msgstr[0] "" 181 371 msgstr[1] "" 182 183 #: lib/triggers/aw-trigger-order-department-added.php:20184 msgid "Order Department Added"185 msgstr ""186 187 #: lib/triggers/aw-trigger-order-department-added.php:21188 msgid "Triggers when a department is added to an order."189 msgstr ""190 191 #: lib/triggers/aw-trigger-order-department-added.php:33192 #: lib/triggers/aw-trigger-order-department-removed.php:33193 msgid "Leave blank to trigger for any department."194 msgstr ""195 196 #: lib/triggers/aw-trigger-order-department-added.php:45197 #: lib/triggers/aw-trigger-order-department-removed.php:45198 msgid "Any department"199 msgstr ""200 201 #: lib/triggers/aw-trigger-order-department-changed.php:19202 msgid "Order Department Changed"203 msgstr ""204 205 #: lib/triggers/aw-trigger-order-department-changed.php:20206 msgid "Triggers when order departments are modified in any way."207 msgstr ""208 209 #: lib/triggers/aw-trigger-order-department-removed.php:20210 msgid "Order Department Removed"211 msgstr ""212 213 #: lib/triggers/aw-trigger-order-department-removed.php:21214 msgid "Triggers when a department is removed from an order."215 msgstr ""216 217 #: lib/variables/aw-variable-order-department-count.php:23218 msgid "Displays the number of departments assigned to the order. Useful for conditional logic."219 msgstr ""220 221 #: lib/variables/aw-variable-order-department-emails.php:26222 msgid "Displays department email addresses with flexible access options. Use index for specific departments, \"all\" for all departments, or \"count\" for the number of departments."223 msgstr ""224 225 #: lib/variables/aw-variable-order-department-emails.php:30226 msgid "How to access the department emails."227 msgstr ""228 229 #: lib/variables/aw-variable-order-department-emails.php:32230 #: lib/variables/aw-variable-order-department-names.php:32231 msgid "By Index (default)"232 msgstr ""233 234 #: lib/variables/aw-variable-order-department-emails.php:33235 #: lib/variables/aw-variable-order-department-names.php:33236 msgid "All Departments"237 msgstr ""238 239 #: lib/variables/aw-variable-order-department-emails.php:34240 #: lib/variables/aw-variable-order-department-names.php:34241 msgid "Count of Departments"242 msgstr ""243 244 #: lib/variables/aw-variable-order-department-emails.php:41245 #: lib/variables/aw-variable-order-department-names.php:41246 msgid "The index of the department to retrieve (1-based). Default is 1 (first department). Only used when mode is \"index\"."247 msgstr ""248 249 #: lib/variables/aw-variable-order-department-emails.php:48250 #: lib/variables/aw-variable-order-departments-emails.php:28251 msgid "The separator to use between email addresses. Default is \", \" (comma space). Use \";\" for semicolon separation."252 msgstr ""253 254 #: lib/variables/aw-variable-order-department-emails.php:55255 #: lib/variables/aw-variable-order-departments-emails.php:35256 msgid "Text to add before each email address."257 msgstr ""258 259 #: lib/variables/aw-variable-order-department-emails.php:62260 #: lib/variables/aw-variable-order-departments-emails.php:42261 msgid "Text to add after each email address."262 msgstr ""263 264 #: lib/variables/aw-variable-order-department-names.php:26265 msgid "Displays department names with flexible access options. Use index for specific departments, \"all\" for all departments, or \"count\" for the number of departments."266 msgstr ""267 268 #: lib/variables/aw-variable-order-department-names.php:30269 msgid "How to access the department names."270 msgstr ""271 272 #: lib/variables/aw-variable-order-department-names.php:48273 msgid "The separator to use between department names when mode is \"all\". Default is \", \" (comma space)."274 msgstr ""275 276 #: lib/variables/aw-variable-order-department-names.php:55277 #: lib/variables/aw-variable-order-departments-names.php:34278 msgid "Text to add before each department name. Example: \"Dept: \" would turn \"Sales\" into \"Dept: Sales\"."279 msgstr ""280 281 #: lib/variables/aw-variable-order-department-names.php:62282 #: lib/variables/aw-variable-order-departments-names.php:41283 msgid "Text to add after each department name. Example: \" Dept\" would turn \"Sales\" into \"Sales Dept\"."284 msgstr ""285 286 #: lib/variables/aw-variable-order-departments-emails.php:24287 msgid "Displays a list of all department email addresses assigned to the order. Useful for the \"To\" field in email actions."288 msgstr ""289 290 #: lib/variables/aw-variable-order-departments-names.php:23291 msgid "Displays a list of all department names assigned to the order."292 msgstr ""293 294 #: lib/variables/aw-variable-order-departments-names.php:27295 msgid "The separator to use between department names. Default is \", \" (comma space)."296 msgstr "" -
runthings-wc-order-departments/tags/1.1.1/lib/automatewoo-integration.php
r3318971 r3434381 23 23 } 24 24 25 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/a ctions/aw-action-set-order-department.php';26 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/a ctions/aw-action-add-order-department.php';27 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/a ctions/aw-action-remove-order-department.php';28 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/a ctions/aw-action-clear-order-departments.php';25 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/actions/aw-action-set-order-department.php'; 26 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/actions/aw-action-add-order-department.php'; 27 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/actions/aw-action-remove-order-department.php'; 28 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/actions/aw-action-clear-order-departments.php'; 29 29 30 30 $actions['runthings_set_order_department'] = 'RunthingsWCOrderDepartments\Actions\Set_Order_Department'; … … 45 45 } 46 46 47 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/ triggers/aw-trigger-order-department-added.php';48 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/ triggers/aw-trigger-order-department-removed.php';49 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/ triggers/aw-trigger-order-department-changed.php';47 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/triggers/aw-trigger-order-department-added.php'; 48 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/triggers/aw-trigger-order-department-removed.php'; 49 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/triggers/aw-trigger-order-department-changed.php'; 50 50 51 51 $triggers['runthings_order_department_added'] = 'RunthingsWCOrderDepartments\Triggers\Order_Department_Added'; … … 65 65 } 66 66 67 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/ rules/aw-rule-order-has-department.php';68 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/ rules/aw-rule-order-department-count.php';69 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/ rules/aw-rule-order-department-is.php';67 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/rules/aw-rule-order-has-department.php'; 68 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/rules/aw-rule-order-department-count.php'; 69 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/rules/aw-rule-order-department-is.php'; 70 70 71 71 $rules['runthings_order_has_department'] = 'RunthingsWCOrderDepartments\Rules\Order_Has_Department'; … … 85 85 } 86 86 87 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/ variables/aw-variable-order-departments-names.php';88 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/ variables/aw-variable-order-departments-emails.php';89 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/ variables/aw-variable-order-department-names.php';90 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/ variables/aw-variable-order-department-emails.php';91 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/ variables/aw-variable-order-department-count.php';87 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/variables/aw-variable-order-departments-names.php'; 88 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/variables/aw-variable-order-departments-emails.php'; 89 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/variables/aw-variable-order-department-names.php'; 90 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/variables/aw-variable-order-department-emails.php'; 91 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/variables/aw-variable-order-department-count.php'; 92 92 93 93 // Add department variables to the order group -
runthings-wc-order-departments/tags/1.1.1/lib/email-interceptor.php
r3318971 r3434381 4 4 5 5 use RunthingsWCOrderDepartments\Utils\DepartmentMatcher; 6 use RunthingsWCOrderDepartments\Email\CustomerEmailInterceptor; 7 use RunthingsWCOrderDepartments\Email\AdminEmailInterceptor; 6 8 7 9 if (!defined('WPINC')) { … … 9 11 } 10 12 13 // Include email interceptor classes 14 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/email/customer-email-interceptor.php'; 15 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/email/admin-email-interceptor.php'; 16 17 /** 18 * Manager class that coordinates customer and admin email interception 19 */ 11 20 class EmailInterceptor 12 21 { 13 22 private $department_matcher; 14 23 15 public function __construct($taxonomy = 'order_department') 24 private $settings; 25 26 private $customer_interceptor; 27 28 private $admin_interceptor; 29 30 public function __construct($taxonomy = 'order_department', $settings = null) 16 31 { 17 32 $this->department_matcher = new DepartmentMatcher($taxonomy); 33 $this->settings = $settings; 18 34 19 // Hook into WooCommerce email filters to modify recipients for admin notifications 20 add_filter('woocommerce_email_recipient_new_order', [$this, 'modify_email_recipient'], 10, 2); 21 add_filter('woocommerce_email_recipient_cancelled_order', [$this, 'modify_email_recipient'], 10, 2); 22 add_filter('woocommerce_email_recipient_failed_order', [$this, 'modify_email_recipient'], 10, 2); 23 } 24 25 /** 26 * Modify email recipients based on order department 27 * 28 * @param string $recipient Default recipient email(s) 29 * @param \WC_Order $order Order object 30 * @return string Modified recipient email(s) 31 */ 32 public function modify_email_recipient($recipient, $order) 33 { 34 // Make sure we have a valid order 35 if (!$order instanceof \WC_Order) { 36 return $recipient; 37 } 38 39 // Get department recipients using the utility class 40 $department_emails = $this->department_matcher->get_department_emails($order); 41 42 // If department emails were found, use them instead 43 if (!empty($department_emails)) { 44 return $department_emails; 45 } 46 47 // Otherwise return the original recipient 48 return $recipient; 35 // Initialize specialized interceptors 36 $this->customer_interceptor = new CustomerEmailInterceptor($this->department_matcher, $this->settings); 37 $this->admin_interceptor = new AdminEmailInterceptor($this->department_matcher); 49 38 } 50 39 } -
runthings-wc-order-departments/tags/1.1.1/lib/utils/department-matcher.php
r3318971 r3434381 14 14 { 15 15 private $taxonomy; 16 16 17 private $meta_prefix = 'runthings_wc_od_'; 17 18 … … 180 181 181 182 /** 182 * Get department email addresses for an order183 * Get unique department email addresses for an order 183 184 * 184 185 * @param \WC_Order $order Order object 185 * @return string Email addresses separated by commas186 */ 187 public function get_ department_emails($order)186 * @return array Array of clean, unique email addresses 187 */ 188 public function get_unique_department_emails($order) 188 189 { 189 190 $matching_departments = $this->get_matching_departments($order); 190 191 191 192 // Collect emails from all matching departments 192 193 $destination_emails = []; 193 194 194 195 foreach ($matching_departments as $department) { 195 196 if (!empty($department['emails'])) { … … 197 198 } 198 199 } 199 200 // Remove duplicates and filter out empty values 201 $destination_emails = array_unique(array_filter($destination_emails)); 202 203 // Return comma-separated list of emails (WordPress email format) 204 return implode(', ', $destination_emails); 200 201 // Clean emails: trim whitespace, remove newlines, validate and filter 202 $clean_emails = []; 203 foreach ($destination_emails as $email) { 204 $clean_email = trim(str_replace(["\r", "\n", "\t"], '', $email)); 205 if (!empty($clean_email) && filter_var($clean_email, FILTER_VALIDATE_EMAIL)) { 206 $clean_emails[] = $clean_email; 207 } 208 } 209 210 // Remove duplicates and return 211 return array_unique($clean_emails); 205 212 } 206 213 -
runthings-wc-order-departments/tags/1.1.1/readme.md
r3318971 r3434381 26 26 27 27 1. **Department Taxonomy Management Screen** - Main interface for managing departments, viewing assigned orders, and configuring department settings. 28 28  29 29 30 30 2. **Custom Department Menus** - Quick access menus in WooCommerce admin for filtering orders by department. 31 31  32 32 33 33 3. **Department Meta Box on Order Screen** - View and manage department assignments directly from individual order pages. 34 34  35 35 36 36 4. **Edit Department Screen** - Configure department email addresses, product categories, and specific product assignments. 37 37  38 38 39 39 ## AutomateWoo Integration … … 109 109 - **`{{ order.department_emails | separator: '; ' }}`** → Multiple emails separated by semicolon 110 110 111 ## Use Cases111 #### Variable Use Cases 112 112 113 113 - **Sales & Technical Support**: Route orders containing software to Technical, hardware to Sales … … 129 129 - Pass `{{ order.departments_names }}` to CRM systems for proper lead assignment 130 130 - Use `{{ order.departments_emails }}` for automated follow-up sequences 131 132 ## Developer Filters 133 134 The plugin provides filters to customize email handling behavior: 135 136 ### Email ID Filters 137 138 **`runthings_wc_order_departments_customer_email_ids`** 139 140 Customize which customer-facing email IDs have their reply-to headers modified by department emails. 141 142 ```php 143 add_filter('runthings_wc_order_departments_customer_email_ids', function($email_ids) { 144 // Add custom customer email ID 145 $email_ids[] = 'custom_customer_email'; 146 147 // Remove an email ID if you don't want it modified 148 $key = array_search('customer_new_account', $email_ids); 149 if ($key !== false) { 150 unset($email_ids[$key]); 151 } 152 153 return $email_ids; 154 }); 155 ``` 156 157 **Default customer email IDs**: `customer_completed_order`, `customer_cancelled_order`, `customer_failed_order`, `customer_on_hold_order`, `customer_invoice`, `customer_note`, `customer_refunded_order`, `customer_processing_order`, `customer_new_account`, `customer_reset_password` 158 159 **`runthings_wc_order_departments_admin_email_ids`** 160 161 Customize which admin-facing email IDs have their recipients modified to use department emails. 162 163 ```php 164 add_filter('runthings_wc_order_departments_admin_email_ids', function($email_ids) { 165 // Add custom admin email ID 166 $email_ids[] = 'custom_admin_notification'; 167 168 // Remove an email ID if you don't want it modified 169 $key = array_search('backorder', $email_ids); 170 if ($key !== false) { 171 unset($email_ids[$key]); 172 } 173 174 return $email_ids; 175 }); 176 ``` 177 178 **Default admin email IDs**: `new_order`, `cancelled_order`, `failed_order`, `backorder` 179 180 ### Use Cases for Email Filters 181 182 - **Custom Email Types**: Add support for emails from other plugins or custom implementations 183 - **Selective Email Routing**: Exclude specific email types from department-based routing 184 - **Third-party Integration**: Ensure compatibility with other email-related plugins 131 185 132 186 ## Installation … … 151 205 ### Email Routing 152 206 153 **Important**: Email routing behavior depends on whether the order's assigned departments have email addresses configured: 154 155 - **If the order's assigned departments have email addresses**: The plugin will override WooCommerce admin emails and send them to the department's email addresses instead 207 The plugin provides two types of email routing: 208 209 #### Admin Email Routing 210 211 **Admin emails** (new order notifications, etc.) are automatically routed to department email addresses when departments are assigned to orders. 212 213 #### Customer Email Reply-To Override 214 215 **Customer emails** can have their reply-to headers modified based on department assignments. Configure this at **Settings > Order Departments**: 216 217 - **Override reply-to with department emails**: Enable/disable the reply-to override feature 218 - **For multi-department orders**: Choose behavior when multiple unique email addresses are involved: 219 - **Use all department emails**: Add all unique department emails to reply-to header 220 - **Skip override - fall back to WooCommerce default**: Use WooCommerce's default reply-to setting 221 222 **Email routing behavior**: 223 224 - **Single department orders**: Always use that department's email for reply-to (when override enabled) 225 - **Multi-department orders with same email**: Treated as single department 226 - **Multi-department orders with different emails**: Behavior depends on settings choice 156 227 - **If the order's assigned departments have NO email addresses**: The plugin does not attempt to override emails and WooCommerce emails work normally 157 228 - **If WooCommerce emails are disabled**: No emails will be sent regardless of department email configuration … … 210 281 ## Changelog 211 282 283 ### 1.1.1 - 7th January 2026 284 285 - Bump tested up to 6.9 286 287 ### 1.1.0 - 31st July 2025 288 289 - **New Feature**: Customer email reply-to override system 290 - Configure reply-to behavior for customer emails based on department assignments 291 - Settings page at Settings > Order Departments with override toggle and multi-department handling options 292 - Single department orders always use department email for reply-to 293 - Multi-department orders can use all department emails or fall back to WooCommerce default 294 - **New Feature**: Email customization filters 295 - `runthings_wc_order_departments_customer_email_ids` filter to customize which customer emails are modified 296 - `runthings_wc_order_departments_admin_email_ids` filter to customize which admin emails are modified 297 - **Improvement**: Refactored email system with separate CustomerEmailInterceptor and AdminEmailInterceptor classes 298 - **Improvement**: Enhanced email address validation and cleaning using PHP's filter_var() 299 - **Improvement**: Robust email header manipulation with proper newline handling 300 301 ### 1.0.1 - 27th June 2025 302 303 - WordPress Plugin Directory release 304 - Update contributors meta in readme.txt to match username 305 212 306 ### 1.0.0 - 17th June 2025 213 307 -
runthings-wc-order-departments/tags/1.1.1/readme.txt
r3318971 r3434381 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 1. 0.17 Stable tag: 1.1.1 8 8 License: GPLv3 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 97 97 * `{{ order.department_emails | separator: '; ' }}` → Multiple emails separated by semicolon 98 98 99 = Use Cases =99 = Variable Use Cases = 100 100 101 101 * **Sales & Technical Support**: Route orders containing software to Technical, hardware to Sales … … 114 114 * Pass `{{ order.departments_names }}` to CRM systems for proper lead assignment 115 115 * Use `{{ order.departments_emails }}` for automated follow-up sequences 116 117 == Developer Filters == 118 119 The plugin provides filters to customize email handling behavior: 120 121 = Email ID Filters = 122 123 **runthings_wc_order_departments_customer_email_ids** 124 125 Customize which customer-facing email IDs have their reply-to headers modified by department emails. 126 127 `add_filter('runthings_wc_order_departments_customer_email_ids', function($email_ids) { // Add custom customer email ID $email_ids[] = 'custom_customer_email'; // Remove an email ID if you don't want it modified $key = array_search('customer_new_account', $email_ids); if ($key !== false) { unset($email_ids[$key]); } return $email_ids; });` 128 129 **Default customer email IDs**: `customer_completed_order`, `customer_cancelled_order`, `customer_failed_order`, `customer_on_hold_order`, `customer_invoice`, `customer_note`, `customer_refunded_order`, `customer_processing_order`, `customer_new_account`, `customer_reset_password` 130 131 **runthings_wc_order_departments_admin_email_ids** 132 133 Customize which admin-facing email IDs have their recipients modified to use department emails. 134 135 `add_filter('runthings_wc_order_departments_admin_email_ids', function($email_ids) { // Add custom admin email ID $email_ids[] = 'custom_admin_notification'; // Remove an email ID if you don't want it modified $key = array_search('backorder', $email_ids); if ($key !== false) { unset($email_ids[$key]); } return $email_ids; });` 136 137 **Default admin email IDs**: `new_order`, `cancelled_order`, `failed_order`, `backorder` 138 139 = Use Cases for Email Filters = 140 141 * **Custom Email Types**: Add support for emails from other plugins or custom implementations 142 * **Selective Email Routing**: Exclude specific email types from department-based routing 143 * **Third-party Integration**: Ensure compatibility with other email-related plugins 116 144 117 145 == Installation == … … 136 164 = Email Routing = 137 165 138 **Important**: Email routing behavior depends on whether the order's assigned departments have email addresses configured: 139 140 * **If the order's assigned departments have email addresses**: The plugin will override WooCommerce admin emails and send them to the department's email addresses instead 166 The plugin provides two types of email routing: 167 168 = Admin Email Routing = 169 170 **Admin emails** (new order notifications, etc.) are automatically routed to department email addresses when departments are assigned to orders. 171 172 = Customer Email Reply-To Override = 173 174 **Customer emails** can have their reply-to headers modified based on department assignments. Configure this at **Settings > Order Departments**: 175 176 * **Override reply-to with department emails**: Enable/disable the reply-to override feature 177 * **For multi-department orders**: Choose behavior when multiple unique email addresses are involved: 178 * **Use all department emails**: Add all unique department emails to reply-to header 179 * **Skip override - fall back to WooCommerce default**: Use WooCommerce's default reply-to setting 180 181 **Email routing behavior**: 182 183 * **Single department orders**: Always use that department's email for reply-to (when override enabled) 184 * **Multi-department orders with same email**: Treated as single department 185 * **Multi-department orders with different emails**: Behavior depends on settings choice 141 186 * **If the order's assigned departments have NO email addresses**: The plugin does not attempt to override emails and WooCommerce emails work normally 142 187 * **If WooCommerce emails are disabled**: No emails will be sent regardless of department email configuration … … 201 246 202 247 == Changelog == 248 249 = 1.1.1 - 7th January 2026 = 250 * Bump tested up to 6.9 251 252 = 1.1.0 - 31st July 2025 = 253 * **New Feature**: Customer email reply-to override system 254 * Configure reply-to behavior for customer emails based on department assignments 255 * Settings page at Settings > Order Departments with override toggle and multi-department handling options 256 * Single department orders always use department email for reply-to 257 * Multi-department orders can use all department emails or fall back to WooCommerce default 258 * **New Feature**: Email customization filters 259 * `runthings_wc_order_departments_customer_email_ids` filter to customize which customer emails are modified 260 * `runthings_wc_order_departments_admin_email_ids` filter to customize which admin emails are modified 261 * **Improvement**: Refactored email system with separate CustomerEmailInterceptor and AdminEmailInterceptor classes 262 * **Improvement**: Enhanced email address validation and cleaning using PHP's filter_var() 263 * **Improvement**: Robust email header manipulation with proper newline handling 203 264 204 265 = 1.0.1 - 27th June 2025 = … … 235 296 == Upgrade Notice == 236 297 298 = 1.1.1 = 299 Bump tested up to 6.9 300 301 = 1.1.0 = 302 Major update with customer email reply-to override system and new settings page. Configure reply-to behavior for customer emails based on department assignments. Includes new developer filters for email customization. 303 237 304 = 1.0.1 = 238 305 Initial release of plugin on WordPress Plugin Directory. Fixed readme.txt contributors meta. 239 240 = 1.0.0 =241 Initial release of Order Departments for WooCommerce plugin. -
runthings-wc-order-departments/tags/1.1.1/runthings-wc-order-departments.php
r3318971 r3434381 5 5 * Plugin URI: https://runthings.dev/wordpress-plugins/runthings-wc-order-departments/ 6 6 * Description: Split WooCommerce orders by departments, with AutomateWoo support 7 * Version: 1. 0.17 * Version: 1.1.1 8 8 * Author: runthingsdev 9 9 * Author URI: https://runthings.dev/ 10 10 * Requires at least: 6.3 11 * Tested up to: 6. 811 * Tested up to: 6.9 12 12 * Requires PHP: 7.4 13 13 * Requires Plugins: woocommerce 14 14 * WC requires at least: 8.2 15 * WC tested up to: 9.916 15 * Text Domain: runthings-wc-order-departments 17 16 * Domain Path: /languages … … 42 41 } 43 42 44 define('RUNTHINGS_WC_ORDER_DEPARTMENTS_VERSION', '1. 0.1');43 define('RUNTHINGS_WC_ORDER_DEPARTMENTS_VERSION', '1.1.1'); 45 44 define('RUNTHINGS_WC_ORDER_DEPARTMENTS_URL', plugin_dir_url(__FILE__)); 46 45 define('RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR', plugin_dir_path(__FILE__)); … … 51 50 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/order-department-assigner.php'; 52 51 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo-integration.php'; 52 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/settings.php'; 53 53 54 54 class RunthingsWCOrderDepartments … … 56 56 public $taxonomy = 'order_department'; 57 57 58 private $settings; 59 58 60 public function __construct() 59 61 { … … 65 67 add_action('admin_menu', [$this, 'add_departments_management_menu'], 99); 66 68 69 // Initialize settings first 70 $this->settings = new Settings(); 71 72 // Initialize other components, passing settings where needed 67 73 new Taxonomy($this->taxonomy); 68 new EmailInterceptor($this->taxonomy );74 new EmailInterceptor($this->taxonomy, $this->settings); 69 75 new OrderDepartmentAssigner($this->taxonomy); 70 76 new AutomateWooIntegration(); -
runthings-wc-order-departments/trunk/languages/runthings-wc-order-departments.pot
r3318971 r3434381 1 # Copyright (C) 202 5runthingsdev1 # Copyright (C) 2026 runthingsdev 2 2 # This file is distributed under the GPLv3 or later. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Order Departments for WooCommerce 1. 0.1\n"5 "Project-Id-Version: Order Departments for WooCommerce 1.1.1\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/runthings-wc-order-departments\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 5-06-27T20:54:36+00:00\n"12 "POT-Creation-Date: 2026-01-07T13:27:40+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2.1 1.0\n"14 "X-Generator: WP-CLI 2.12.0\n" 15 15 "X-Domain: runthings-wc-order-departments\n" 16 16 … … 40 40 msgstr "" 41 41 42 #: lib/a ctions/aw-action-add-order-department.php:2042 #: lib/automatewoo/actions/aw-action-add-order-department.php:20 43 43 msgid "Add Order Department" 44 44 msgstr "" 45 45 46 #: lib/a ctions/aw-action-add-order-department.php:2146 #: lib/automatewoo/actions/aw-action-add-order-department.php:21 47 47 msgid "Add a department to the order (keeps existing departments)." 48 48 msgstr "" 49 49 50 #: lib/a ctions/aw-action-add-order-department.php:2251 #: lib/a ctions/aw-action-clear-order-departments.php:2152 #: lib/a ctions/aw-action-remove-order-department.php:2253 #: lib/a ctions/aw-action-set-order-department.php:2254 #: lib/ triggers/aw-trigger-order-department-added.php:2255 #: lib/ triggers/aw-trigger-order-department-changed.php:2156 #: lib/ triggers/aw-trigger-order-department-removed.php:2250 #: lib/automatewoo/actions/aw-action-add-order-department.php:22 51 #: lib/automatewoo/actions/aw-action-clear-order-departments.php:21 52 #: lib/automatewoo/actions/aw-action-remove-order-department.php:22 53 #: lib/automatewoo/actions/aw-action-set-order-department.php:22 54 #: lib/automatewoo/triggers/aw-trigger-order-department-added.php:22 55 #: lib/automatewoo/triggers/aw-trigger-order-department-changed.php:21 56 #: lib/automatewoo/triggers/aw-trigger-order-department-removed.php:22 57 57 msgid "Order" 58 58 msgstr "" 59 59 60 #: lib/a ctions/aw-action-add-order-department.php:3261 #: lib/a ctions/aw-action-remove-order-department.php:3262 #: lib/a ctions/aw-action-set-order-department.php:3263 #: lib/ triggers/aw-trigger-order-department-added.php:3264 #: lib/ triggers/aw-trigger-order-department-removed.php:3260 #: lib/automatewoo/actions/aw-action-add-order-department.php:32 61 #: lib/automatewoo/actions/aw-action-remove-order-department.php:32 62 #: lib/automatewoo/actions/aw-action-set-order-department.php:32 63 #: lib/automatewoo/triggers/aw-trigger-order-department-added.php:32 64 #: lib/automatewoo/triggers/aw-trigger-order-department-removed.php:32 65 65 msgid "Department" 66 66 msgstr "" 67 67 68 68 #. translators: %1$s: Workflow ID, %2$s: Department name 69 #: lib/actions/aw-action-add-order-department.php:89 69 #: lib/automatewoo/actions/aw-action-add-order-department.php:89 70 #, php-format 70 71 msgid "[AutomateWoo] Workflow #%1$s added department: %2$s" 71 72 msgstr "" 72 73 73 #: lib/a ctions/aw-action-clear-order-departments.php:1974 #: lib/automatewoo/actions/aw-action-clear-order-departments.php:19 74 75 msgid "Clear Order Departments" 75 76 msgstr "" 76 77 77 #: lib/a ctions/aw-action-clear-order-departments.php:2078 #: lib/automatewoo/actions/aw-action-clear-order-departments.php:20 78 79 msgid "Remove all departments from the order." 79 80 msgstr "" 80 81 81 82 #. translators: %s: Workflow ID 82 #: lib/actions/aw-action-clear-order-departments.php:50 83 #: lib/automatewoo/actions/aw-action-clear-order-departments.php:50 84 #, php-format 83 85 msgid "[AutomateWoo] Workflow #%s cleared all departments" 84 86 msgstr "" 85 87 86 #: lib/a ctions/aw-action-remove-order-department.php:2088 #: lib/automatewoo/actions/aw-action-remove-order-department.php:20 87 89 msgid "Remove Order Department" 88 90 msgstr "" 89 91 90 #: lib/a ctions/aw-action-remove-order-department.php:2192 #: lib/automatewoo/actions/aw-action-remove-order-department.php:21 91 93 msgid "Remove a department from the order." 92 94 msgstr "" 93 95 94 96 #. translators: %1$s: Workflow ID, %2$s: Department name 95 #: lib/actions/aw-action-remove-order-department.php:89 97 #: lib/automatewoo/actions/aw-action-remove-order-department.php:89 98 #, php-format 96 99 msgid "[AutomateWoo] Workflow #%1$s removed department: %2$s" 97 100 msgstr "" 98 101 99 #: lib/a ctions/aw-action-set-order-department.php:20102 #: lib/automatewoo/actions/aw-action-set-order-department.php:20 100 103 msgid "Set Order Department" 101 104 msgstr "" 102 105 103 #: lib/a ctions/aw-action-set-order-department.php:21106 #: lib/automatewoo/actions/aw-action-set-order-department.php:21 104 107 msgid "Set a department for the order (replaces all existing departments)." 105 108 msgstr "" 106 109 107 110 #. translators: %1$s: Workflow ID, %2$s: Department name 108 #: lib/actions/aw-action-set-order-department.php:89 111 #: lib/automatewoo/actions/aw-action-set-order-department.php:89 112 #, php-format 109 113 msgid "[AutomateWoo] Workflow #%1$s set department to: %2$s" 110 114 msgstr "" 111 115 112 #: lib/ rules/aw-rule-order-department-count.php:22116 #: lib/automatewoo/rules/aw-rule-order-department-count.php:22 113 117 msgid "Order - Department Count" 114 118 msgstr "" 115 119 116 #: lib/ rules/aw-rule-order-department-is.php:22120 #: lib/automatewoo/rules/aw-rule-order-department-is.php:22 117 121 msgid "Order - Department Is" 118 122 msgstr "" 119 123 120 #: lib/ rules/aw-rule-order-has-department.php:22124 #: lib/automatewoo/rules/aw-rule-order-has-department.php:22 121 125 msgid "Order - Has Department" 126 msgstr "" 127 128 #: lib/automatewoo/triggers/aw-trigger-order-department-added.php:20 129 msgid "Order Department Added" 130 msgstr "" 131 132 #: lib/automatewoo/triggers/aw-trigger-order-department-added.php:21 133 msgid "Triggers when a department is added to an order." 134 msgstr "" 135 136 #: lib/automatewoo/triggers/aw-trigger-order-department-added.php:33 137 #: lib/automatewoo/triggers/aw-trigger-order-department-removed.php:33 138 msgid "Leave blank to trigger for any department." 139 msgstr "" 140 141 #: lib/automatewoo/triggers/aw-trigger-order-department-added.php:45 142 #: lib/automatewoo/triggers/aw-trigger-order-department-removed.php:45 143 msgid "Any department" 144 msgstr "" 145 146 #: lib/automatewoo/triggers/aw-trigger-order-department-changed.php:19 147 msgid "Order Department Changed" 148 msgstr "" 149 150 #: lib/automatewoo/triggers/aw-trigger-order-department-changed.php:20 151 msgid "Triggers when order departments are modified in any way." 152 msgstr "" 153 154 #: lib/automatewoo/triggers/aw-trigger-order-department-removed.php:20 155 msgid "Order Department Removed" 156 msgstr "" 157 158 #: lib/automatewoo/triggers/aw-trigger-order-department-removed.php:21 159 msgid "Triggers when a department is removed from an order." 160 msgstr "" 161 162 #: lib/automatewoo/variables/aw-variable-order-department-count.php:23 163 msgid "Displays the number of departments assigned to the order. Useful for conditional logic." 164 msgstr "" 165 166 #: lib/automatewoo/variables/aw-variable-order-department-emails.php:26 167 msgid "Displays department email addresses with flexible access options. Use index for specific departments, \"all\" for all departments, or \"count\" for the number of departments." 168 msgstr "" 169 170 #: lib/automatewoo/variables/aw-variable-order-department-emails.php:30 171 msgid "How to access the department emails." 172 msgstr "" 173 174 #: lib/automatewoo/variables/aw-variable-order-department-emails.php:32 175 #: lib/automatewoo/variables/aw-variable-order-department-names.php:32 176 msgid "By Index (default)" 177 msgstr "" 178 179 #: lib/automatewoo/variables/aw-variable-order-department-emails.php:33 180 #: lib/automatewoo/variables/aw-variable-order-department-names.php:33 181 msgid "All Departments" 182 msgstr "" 183 184 #: lib/automatewoo/variables/aw-variable-order-department-emails.php:34 185 #: lib/automatewoo/variables/aw-variable-order-department-names.php:34 186 msgid "Count of Departments" 187 msgstr "" 188 189 #: lib/automatewoo/variables/aw-variable-order-department-emails.php:41 190 #: lib/automatewoo/variables/aw-variable-order-department-names.php:41 191 msgid "The index of the department to retrieve (1-based). Default is 1 (first department). Only used when mode is \"index\"." 192 msgstr "" 193 194 #: lib/automatewoo/variables/aw-variable-order-department-emails.php:48 195 #: lib/automatewoo/variables/aw-variable-order-departments-emails.php:28 196 msgid "The separator to use between email addresses. Default is \", \" (comma space). Use \";\" for semicolon separation." 197 msgstr "" 198 199 #: lib/automatewoo/variables/aw-variable-order-department-emails.php:55 200 #: lib/automatewoo/variables/aw-variable-order-departments-emails.php:35 201 msgid "Text to add before each email address." 202 msgstr "" 203 204 #: lib/automatewoo/variables/aw-variable-order-department-emails.php:62 205 #: lib/automatewoo/variables/aw-variable-order-departments-emails.php:42 206 msgid "Text to add after each email address." 207 msgstr "" 208 209 #: lib/automatewoo/variables/aw-variable-order-department-names.php:26 210 msgid "Displays department names with flexible access options. Use index for specific departments, \"all\" for all departments, or \"count\" for the number of departments." 211 msgstr "" 212 213 #: lib/automatewoo/variables/aw-variable-order-department-names.php:30 214 msgid "How to access the department names." 215 msgstr "" 216 217 #: lib/automatewoo/variables/aw-variable-order-department-names.php:48 218 msgid "The separator to use between department names when mode is \"all\". Default is \", \" (comma space)." 219 msgstr "" 220 221 #: lib/automatewoo/variables/aw-variable-order-department-names.php:55 222 #: lib/automatewoo/variables/aw-variable-order-departments-names.php:34 223 msgid "Text to add before each department name. Example: \"Dept: \" would turn \"Sales\" into \"Dept: Sales\"." 224 msgstr "" 225 226 #: lib/automatewoo/variables/aw-variable-order-department-names.php:62 227 #: lib/automatewoo/variables/aw-variable-order-departments-names.php:41 228 msgid "Text to add after each department name. Example: \" Dept\" would turn \"Sales\" into \"Sales Dept\"." 229 msgstr "" 230 231 #: lib/automatewoo/variables/aw-variable-order-departments-emails.php:24 232 msgid "Displays a list of all department email addresses assigned to the order. Useful for the \"To\" field in email actions." 233 msgstr "" 234 235 #: lib/automatewoo/variables/aw-variable-order-departments-names.php:23 236 msgid "Displays a list of all department names assigned to the order." 237 msgstr "" 238 239 #: lib/automatewoo/variables/aw-variable-order-departments-names.php:27 240 msgid "The separator to use between department names. Default is \", \" (comma space)." 241 msgstr "" 242 243 #: lib/settings.php:33 244 msgid "Order Departments Settings" 245 msgstr "" 246 247 #: lib/settings.php:34 248 msgid "Order Departments" 249 msgstr "" 250 251 #: lib/settings.php:60 252 msgid "Customer Email Reply-To Settings" 253 msgstr "" 254 255 #: lib/settings.php:68 256 msgid "Override Reply-To with Department Emails" 257 msgstr "" 258 259 #: lib/settings.php:77 260 msgid "For Multi-Department Orders" 261 msgstr "" 262 263 #. translators: %s: Link to WooCommerce email settings 264 #: lib/settings.php:150 265 #, php-format 266 msgid "Configure how customer email replies are routed based on order departments. When disabled, emails use the %s." 267 msgstr "" 268 269 #: lib/settings.php:151 270 #: lib/settings.php:212 271 msgid "WooCommerce email settings" 272 msgstr "" 273 274 #: lib/settings.php:168 275 msgid "Override reply-to with department email addresses" 276 msgstr "" 277 278 #: lib/settings.php:171 279 msgid "When enabled, customer emails will use department email addresses in the reply-to field instead of the default WooCommerce setting." 280 msgstr "" 281 282 #: lib/settings.php:186 283 msgid "Multi-Department Mode" 284 msgstr "" 285 286 #: lib/settings.php:193 287 msgid "Use all department emails" 288 msgstr "" 289 290 #: lib/settings.php:196 291 msgid "Add all unique department email addresses to the reply-to field. All departments will receive customer replies and need to coordinate who responds." 292 msgstr "" 293 294 #: lib/settings.php:205 295 msgid "Skip override - fall back to WooCommerce default" 296 msgstr "" 297 298 #. translators: %s: Link to WooCommerce email settings 299 #: lib/settings.php:211 300 #, php-format 301 msgid "Use the default reply-to address from %s instead of department emails when multiple unique email addresses are involved." 302 msgstr "" 303 304 #: lib/settings.php:218 305 msgid "Note:" 306 msgstr "" 307 308 #: lib/settings.php:219 309 msgid "Multi-department is determined by the number of unique email addresses, not the number of departments. If multiple departments share the same email address, they are treated as a single department." 122 310 msgstr "" 123 311 … … 171 359 #. translators: %s: Product name 172 360 #: lib/taxonomy.php:456 361 #, php-format 173 362 msgid "First product: %s" 174 363 msgstr "" … … 176 365 #. translators: %d: Number of products 177 366 #: lib/taxonomy.php:458 367 #, php-format 178 368 msgid "%d product" 179 369 msgid_plural "%d products" 180 370 msgstr[0] "" 181 371 msgstr[1] "" 182 183 #: lib/triggers/aw-trigger-order-department-added.php:20184 msgid "Order Department Added"185 msgstr ""186 187 #: lib/triggers/aw-trigger-order-department-added.php:21188 msgid "Triggers when a department is added to an order."189 msgstr ""190 191 #: lib/triggers/aw-trigger-order-department-added.php:33192 #: lib/triggers/aw-trigger-order-department-removed.php:33193 msgid "Leave blank to trigger for any department."194 msgstr ""195 196 #: lib/triggers/aw-trigger-order-department-added.php:45197 #: lib/triggers/aw-trigger-order-department-removed.php:45198 msgid "Any department"199 msgstr ""200 201 #: lib/triggers/aw-trigger-order-department-changed.php:19202 msgid "Order Department Changed"203 msgstr ""204 205 #: lib/triggers/aw-trigger-order-department-changed.php:20206 msgid "Triggers when order departments are modified in any way."207 msgstr ""208 209 #: lib/triggers/aw-trigger-order-department-removed.php:20210 msgid "Order Department Removed"211 msgstr ""212 213 #: lib/triggers/aw-trigger-order-department-removed.php:21214 msgid "Triggers when a department is removed from an order."215 msgstr ""216 217 #: lib/variables/aw-variable-order-department-count.php:23218 msgid "Displays the number of departments assigned to the order. Useful for conditional logic."219 msgstr ""220 221 #: lib/variables/aw-variable-order-department-emails.php:26222 msgid "Displays department email addresses with flexible access options. Use index for specific departments, \"all\" for all departments, or \"count\" for the number of departments."223 msgstr ""224 225 #: lib/variables/aw-variable-order-department-emails.php:30226 msgid "How to access the department emails."227 msgstr ""228 229 #: lib/variables/aw-variable-order-department-emails.php:32230 #: lib/variables/aw-variable-order-department-names.php:32231 msgid "By Index (default)"232 msgstr ""233 234 #: lib/variables/aw-variable-order-department-emails.php:33235 #: lib/variables/aw-variable-order-department-names.php:33236 msgid "All Departments"237 msgstr ""238 239 #: lib/variables/aw-variable-order-department-emails.php:34240 #: lib/variables/aw-variable-order-department-names.php:34241 msgid "Count of Departments"242 msgstr ""243 244 #: lib/variables/aw-variable-order-department-emails.php:41245 #: lib/variables/aw-variable-order-department-names.php:41246 msgid "The index of the department to retrieve (1-based). Default is 1 (first department). Only used when mode is \"index\"."247 msgstr ""248 249 #: lib/variables/aw-variable-order-department-emails.php:48250 #: lib/variables/aw-variable-order-departments-emails.php:28251 msgid "The separator to use between email addresses. Default is \", \" (comma space). Use \";\" for semicolon separation."252 msgstr ""253 254 #: lib/variables/aw-variable-order-department-emails.php:55255 #: lib/variables/aw-variable-order-departments-emails.php:35256 msgid "Text to add before each email address."257 msgstr ""258 259 #: lib/variables/aw-variable-order-department-emails.php:62260 #: lib/variables/aw-variable-order-departments-emails.php:42261 msgid "Text to add after each email address."262 msgstr ""263 264 #: lib/variables/aw-variable-order-department-names.php:26265 msgid "Displays department names with flexible access options. Use index for specific departments, \"all\" for all departments, or \"count\" for the number of departments."266 msgstr ""267 268 #: lib/variables/aw-variable-order-department-names.php:30269 msgid "How to access the department names."270 msgstr ""271 272 #: lib/variables/aw-variable-order-department-names.php:48273 msgid "The separator to use between department names when mode is \"all\". Default is \", \" (comma space)."274 msgstr ""275 276 #: lib/variables/aw-variable-order-department-names.php:55277 #: lib/variables/aw-variable-order-departments-names.php:34278 msgid "Text to add before each department name. Example: \"Dept: \" would turn \"Sales\" into \"Dept: Sales\"."279 msgstr ""280 281 #: lib/variables/aw-variable-order-department-names.php:62282 #: lib/variables/aw-variable-order-departments-names.php:41283 msgid "Text to add after each department name. Example: \" Dept\" would turn \"Sales\" into \"Sales Dept\"."284 msgstr ""285 286 #: lib/variables/aw-variable-order-departments-emails.php:24287 msgid "Displays a list of all department email addresses assigned to the order. Useful for the \"To\" field in email actions."288 msgstr ""289 290 #: lib/variables/aw-variable-order-departments-names.php:23291 msgid "Displays a list of all department names assigned to the order."292 msgstr ""293 294 #: lib/variables/aw-variable-order-departments-names.php:27295 msgid "The separator to use between department names. Default is \", \" (comma space)."296 msgstr "" -
runthings-wc-order-departments/trunk/lib/automatewoo-integration.php
r3318971 r3434381 23 23 } 24 24 25 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/a ctions/aw-action-set-order-department.php';26 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/a ctions/aw-action-add-order-department.php';27 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/a ctions/aw-action-remove-order-department.php';28 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/a ctions/aw-action-clear-order-departments.php';25 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/actions/aw-action-set-order-department.php'; 26 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/actions/aw-action-add-order-department.php'; 27 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/actions/aw-action-remove-order-department.php'; 28 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/actions/aw-action-clear-order-departments.php'; 29 29 30 30 $actions['runthings_set_order_department'] = 'RunthingsWCOrderDepartments\Actions\Set_Order_Department'; … … 45 45 } 46 46 47 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/ triggers/aw-trigger-order-department-added.php';48 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/ triggers/aw-trigger-order-department-removed.php';49 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/ triggers/aw-trigger-order-department-changed.php';47 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/triggers/aw-trigger-order-department-added.php'; 48 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/triggers/aw-trigger-order-department-removed.php'; 49 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/triggers/aw-trigger-order-department-changed.php'; 50 50 51 51 $triggers['runthings_order_department_added'] = 'RunthingsWCOrderDepartments\Triggers\Order_Department_Added'; … … 65 65 } 66 66 67 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/ rules/aw-rule-order-has-department.php';68 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/ rules/aw-rule-order-department-count.php';69 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/ rules/aw-rule-order-department-is.php';67 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/rules/aw-rule-order-has-department.php'; 68 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/rules/aw-rule-order-department-count.php'; 69 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/rules/aw-rule-order-department-is.php'; 70 70 71 71 $rules['runthings_order_has_department'] = 'RunthingsWCOrderDepartments\Rules\Order_Has_Department'; … … 85 85 } 86 86 87 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/ variables/aw-variable-order-departments-names.php';88 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/ variables/aw-variable-order-departments-emails.php';89 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/ variables/aw-variable-order-department-names.php';90 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/ variables/aw-variable-order-department-emails.php';91 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/ variables/aw-variable-order-department-count.php';87 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/variables/aw-variable-order-departments-names.php'; 88 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/variables/aw-variable-order-departments-emails.php'; 89 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/variables/aw-variable-order-department-names.php'; 90 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/variables/aw-variable-order-department-emails.php'; 91 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo/variables/aw-variable-order-department-count.php'; 92 92 93 93 // Add department variables to the order group -
runthings-wc-order-departments/trunk/lib/email-interceptor.php
r3318971 r3434381 4 4 5 5 use RunthingsWCOrderDepartments\Utils\DepartmentMatcher; 6 use RunthingsWCOrderDepartments\Email\CustomerEmailInterceptor; 7 use RunthingsWCOrderDepartments\Email\AdminEmailInterceptor; 6 8 7 9 if (!defined('WPINC')) { … … 9 11 } 10 12 13 // Include email interceptor classes 14 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/email/customer-email-interceptor.php'; 15 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/email/admin-email-interceptor.php'; 16 17 /** 18 * Manager class that coordinates customer and admin email interception 19 */ 11 20 class EmailInterceptor 12 21 { 13 22 private $department_matcher; 14 23 15 public function __construct($taxonomy = 'order_department') 24 private $settings; 25 26 private $customer_interceptor; 27 28 private $admin_interceptor; 29 30 public function __construct($taxonomy = 'order_department', $settings = null) 16 31 { 17 32 $this->department_matcher = new DepartmentMatcher($taxonomy); 33 $this->settings = $settings; 18 34 19 // Hook into WooCommerce email filters to modify recipients for admin notifications 20 add_filter('woocommerce_email_recipient_new_order', [$this, 'modify_email_recipient'], 10, 2); 21 add_filter('woocommerce_email_recipient_cancelled_order', [$this, 'modify_email_recipient'], 10, 2); 22 add_filter('woocommerce_email_recipient_failed_order', [$this, 'modify_email_recipient'], 10, 2); 23 } 24 25 /** 26 * Modify email recipients based on order department 27 * 28 * @param string $recipient Default recipient email(s) 29 * @param \WC_Order $order Order object 30 * @return string Modified recipient email(s) 31 */ 32 public function modify_email_recipient($recipient, $order) 33 { 34 // Make sure we have a valid order 35 if (!$order instanceof \WC_Order) { 36 return $recipient; 37 } 38 39 // Get department recipients using the utility class 40 $department_emails = $this->department_matcher->get_department_emails($order); 41 42 // If department emails were found, use them instead 43 if (!empty($department_emails)) { 44 return $department_emails; 45 } 46 47 // Otherwise return the original recipient 48 return $recipient; 35 // Initialize specialized interceptors 36 $this->customer_interceptor = new CustomerEmailInterceptor($this->department_matcher, $this->settings); 37 $this->admin_interceptor = new AdminEmailInterceptor($this->department_matcher); 49 38 } 50 39 } -
runthings-wc-order-departments/trunk/lib/utils/department-matcher.php
r3318971 r3434381 14 14 { 15 15 private $taxonomy; 16 16 17 private $meta_prefix = 'runthings_wc_od_'; 17 18 … … 180 181 181 182 /** 182 * Get department email addresses for an order183 * Get unique department email addresses for an order 183 184 * 184 185 * @param \WC_Order $order Order object 185 * @return string Email addresses separated by commas186 */ 187 public function get_ department_emails($order)186 * @return array Array of clean, unique email addresses 187 */ 188 public function get_unique_department_emails($order) 188 189 { 189 190 $matching_departments = $this->get_matching_departments($order); 190 191 191 192 // Collect emails from all matching departments 192 193 $destination_emails = []; 193 194 194 195 foreach ($matching_departments as $department) { 195 196 if (!empty($department['emails'])) { … … 197 198 } 198 199 } 199 200 // Remove duplicates and filter out empty values 201 $destination_emails = array_unique(array_filter($destination_emails)); 202 203 // Return comma-separated list of emails (WordPress email format) 204 return implode(', ', $destination_emails); 200 201 // Clean emails: trim whitespace, remove newlines, validate and filter 202 $clean_emails = []; 203 foreach ($destination_emails as $email) { 204 $clean_email = trim(str_replace(["\r", "\n", "\t"], '', $email)); 205 if (!empty($clean_email) && filter_var($clean_email, FILTER_VALIDATE_EMAIL)) { 206 $clean_emails[] = $clean_email; 207 } 208 } 209 210 // Remove duplicates and return 211 return array_unique($clean_emails); 205 212 } 206 213 -
runthings-wc-order-departments/trunk/readme.md
r3318971 r3434381 26 26 27 27 1. **Department Taxonomy Management Screen** - Main interface for managing departments, viewing assigned orders, and configuring department settings. 28 28  29 29 30 30 2. **Custom Department Menus** - Quick access menus in WooCommerce admin for filtering orders by department. 31 31  32 32 33 33 3. **Department Meta Box on Order Screen** - View and manage department assignments directly from individual order pages. 34 34  35 35 36 36 4. **Edit Department Screen** - Configure department email addresses, product categories, and specific product assignments. 37 37  38 38 39 39 ## AutomateWoo Integration … … 109 109 - **`{{ order.department_emails | separator: '; ' }}`** → Multiple emails separated by semicolon 110 110 111 ## Use Cases111 #### Variable Use Cases 112 112 113 113 - **Sales & Technical Support**: Route orders containing software to Technical, hardware to Sales … … 129 129 - Pass `{{ order.departments_names }}` to CRM systems for proper lead assignment 130 130 - Use `{{ order.departments_emails }}` for automated follow-up sequences 131 132 ## Developer Filters 133 134 The plugin provides filters to customize email handling behavior: 135 136 ### Email ID Filters 137 138 **`runthings_wc_order_departments_customer_email_ids`** 139 140 Customize which customer-facing email IDs have their reply-to headers modified by department emails. 141 142 ```php 143 add_filter('runthings_wc_order_departments_customer_email_ids', function($email_ids) { 144 // Add custom customer email ID 145 $email_ids[] = 'custom_customer_email'; 146 147 // Remove an email ID if you don't want it modified 148 $key = array_search('customer_new_account', $email_ids); 149 if ($key !== false) { 150 unset($email_ids[$key]); 151 } 152 153 return $email_ids; 154 }); 155 ``` 156 157 **Default customer email IDs**: `customer_completed_order`, `customer_cancelled_order`, `customer_failed_order`, `customer_on_hold_order`, `customer_invoice`, `customer_note`, `customer_refunded_order`, `customer_processing_order`, `customer_new_account`, `customer_reset_password` 158 159 **`runthings_wc_order_departments_admin_email_ids`** 160 161 Customize which admin-facing email IDs have their recipients modified to use department emails. 162 163 ```php 164 add_filter('runthings_wc_order_departments_admin_email_ids', function($email_ids) { 165 // Add custom admin email ID 166 $email_ids[] = 'custom_admin_notification'; 167 168 // Remove an email ID if you don't want it modified 169 $key = array_search('backorder', $email_ids); 170 if ($key !== false) { 171 unset($email_ids[$key]); 172 } 173 174 return $email_ids; 175 }); 176 ``` 177 178 **Default admin email IDs**: `new_order`, `cancelled_order`, `failed_order`, `backorder` 179 180 ### Use Cases for Email Filters 181 182 - **Custom Email Types**: Add support for emails from other plugins or custom implementations 183 - **Selective Email Routing**: Exclude specific email types from department-based routing 184 - **Third-party Integration**: Ensure compatibility with other email-related plugins 131 185 132 186 ## Installation … … 151 205 ### Email Routing 152 206 153 **Important**: Email routing behavior depends on whether the order's assigned departments have email addresses configured: 154 155 - **If the order's assigned departments have email addresses**: The plugin will override WooCommerce admin emails and send them to the department's email addresses instead 207 The plugin provides two types of email routing: 208 209 #### Admin Email Routing 210 211 **Admin emails** (new order notifications, etc.) are automatically routed to department email addresses when departments are assigned to orders. 212 213 #### Customer Email Reply-To Override 214 215 **Customer emails** can have their reply-to headers modified based on department assignments. Configure this at **Settings > Order Departments**: 216 217 - **Override reply-to with department emails**: Enable/disable the reply-to override feature 218 - **For multi-department orders**: Choose behavior when multiple unique email addresses are involved: 219 - **Use all department emails**: Add all unique department emails to reply-to header 220 - **Skip override - fall back to WooCommerce default**: Use WooCommerce's default reply-to setting 221 222 **Email routing behavior**: 223 224 - **Single department orders**: Always use that department's email for reply-to (when override enabled) 225 - **Multi-department orders with same email**: Treated as single department 226 - **Multi-department orders with different emails**: Behavior depends on settings choice 156 227 - **If the order's assigned departments have NO email addresses**: The plugin does not attempt to override emails and WooCommerce emails work normally 157 228 - **If WooCommerce emails are disabled**: No emails will be sent regardless of department email configuration … … 210 281 ## Changelog 211 282 283 ### 1.1.1 - 7th January 2026 284 285 - Bump tested up to 6.9 286 287 ### 1.1.0 - 31st July 2025 288 289 - **New Feature**: Customer email reply-to override system 290 - Configure reply-to behavior for customer emails based on department assignments 291 - Settings page at Settings > Order Departments with override toggle and multi-department handling options 292 - Single department orders always use department email for reply-to 293 - Multi-department orders can use all department emails or fall back to WooCommerce default 294 - **New Feature**: Email customization filters 295 - `runthings_wc_order_departments_customer_email_ids` filter to customize which customer emails are modified 296 - `runthings_wc_order_departments_admin_email_ids` filter to customize which admin emails are modified 297 - **Improvement**: Refactored email system with separate CustomerEmailInterceptor and AdminEmailInterceptor classes 298 - **Improvement**: Enhanced email address validation and cleaning using PHP's filter_var() 299 - **Improvement**: Robust email header manipulation with proper newline handling 300 301 ### 1.0.1 - 27th June 2025 302 303 - WordPress Plugin Directory release 304 - Update contributors meta in readme.txt to match username 305 212 306 ### 1.0.0 - 17th June 2025 213 307 -
runthings-wc-order-departments/trunk/readme.txt
r3318971 r3434381 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 1. 0.17 Stable tag: 1.1.1 8 8 License: GPLv3 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 97 97 * `{{ order.department_emails | separator: '; ' }}` → Multiple emails separated by semicolon 98 98 99 = Use Cases =99 = Variable Use Cases = 100 100 101 101 * **Sales & Technical Support**: Route orders containing software to Technical, hardware to Sales … … 114 114 * Pass `{{ order.departments_names }}` to CRM systems for proper lead assignment 115 115 * Use `{{ order.departments_emails }}` for automated follow-up sequences 116 117 == Developer Filters == 118 119 The plugin provides filters to customize email handling behavior: 120 121 = Email ID Filters = 122 123 **runthings_wc_order_departments_customer_email_ids** 124 125 Customize which customer-facing email IDs have their reply-to headers modified by department emails. 126 127 `add_filter('runthings_wc_order_departments_customer_email_ids', function($email_ids) { // Add custom customer email ID $email_ids[] = 'custom_customer_email'; // Remove an email ID if you don't want it modified $key = array_search('customer_new_account', $email_ids); if ($key !== false) { unset($email_ids[$key]); } return $email_ids; });` 128 129 **Default customer email IDs**: `customer_completed_order`, `customer_cancelled_order`, `customer_failed_order`, `customer_on_hold_order`, `customer_invoice`, `customer_note`, `customer_refunded_order`, `customer_processing_order`, `customer_new_account`, `customer_reset_password` 130 131 **runthings_wc_order_departments_admin_email_ids** 132 133 Customize which admin-facing email IDs have their recipients modified to use department emails. 134 135 `add_filter('runthings_wc_order_departments_admin_email_ids', function($email_ids) { // Add custom admin email ID $email_ids[] = 'custom_admin_notification'; // Remove an email ID if you don't want it modified $key = array_search('backorder', $email_ids); if ($key !== false) { unset($email_ids[$key]); } return $email_ids; });` 136 137 **Default admin email IDs**: `new_order`, `cancelled_order`, `failed_order`, `backorder` 138 139 = Use Cases for Email Filters = 140 141 * **Custom Email Types**: Add support for emails from other plugins or custom implementations 142 * **Selective Email Routing**: Exclude specific email types from department-based routing 143 * **Third-party Integration**: Ensure compatibility with other email-related plugins 116 144 117 145 == Installation == … … 136 164 = Email Routing = 137 165 138 **Important**: Email routing behavior depends on whether the order's assigned departments have email addresses configured: 139 140 * **If the order's assigned departments have email addresses**: The plugin will override WooCommerce admin emails and send them to the department's email addresses instead 166 The plugin provides two types of email routing: 167 168 = Admin Email Routing = 169 170 **Admin emails** (new order notifications, etc.) are automatically routed to department email addresses when departments are assigned to orders. 171 172 = Customer Email Reply-To Override = 173 174 **Customer emails** can have their reply-to headers modified based on department assignments. Configure this at **Settings > Order Departments**: 175 176 * **Override reply-to with department emails**: Enable/disable the reply-to override feature 177 * **For multi-department orders**: Choose behavior when multiple unique email addresses are involved: 178 * **Use all department emails**: Add all unique department emails to reply-to header 179 * **Skip override - fall back to WooCommerce default**: Use WooCommerce's default reply-to setting 180 181 **Email routing behavior**: 182 183 * **Single department orders**: Always use that department's email for reply-to (when override enabled) 184 * **Multi-department orders with same email**: Treated as single department 185 * **Multi-department orders with different emails**: Behavior depends on settings choice 141 186 * **If the order's assigned departments have NO email addresses**: The plugin does not attempt to override emails and WooCommerce emails work normally 142 187 * **If WooCommerce emails are disabled**: No emails will be sent regardless of department email configuration … … 201 246 202 247 == Changelog == 248 249 = 1.1.1 - 7th January 2026 = 250 * Bump tested up to 6.9 251 252 = 1.1.0 - 31st July 2025 = 253 * **New Feature**: Customer email reply-to override system 254 * Configure reply-to behavior for customer emails based on department assignments 255 * Settings page at Settings > Order Departments with override toggle and multi-department handling options 256 * Single department orders always use department email for reply-to 257 * Multi-department orders can use all department emails or fall back to WooCommerce default 258 * **New Feature**: Email customization filters 259 * `runthings_wc_order_departments_customer_email_ids` filter to customize which customer emails are modified 260 * `runthings_wc_order_departments_admin_email_ids` filter to customize which admin emails are modified 261 * **Improvement**: Refactored email system with separate CustomerEmailInterceptor and AdminEmailInterceptor classes 262 * **Improvement**: Enhanced email address validation and cleaning using PHP's filter_var() 263 * **Improvement**: Robust email header manipulation with proper newline handling 203 264 204 265 = 1.0.1 - 27th June 2025 = … … 235 296 == Upgrade Notice == 236 297 298 = 1.1.1 = 299 Bump tested up to 6.9 300 301 = 1.1.0 = 302 Major update with customer email reply-to override system and new settings page. Configure reply-to behavior for customer emails based on department assignments. Includes new developer filters for email customization. 303 237 304 = 1.0.1 = 238 305 Initial release of plugin on WordPress Plugin Directory. Fixed readme.txt contributors meta. 239 240 = 1.0.0 =241 Initial release of Order Departments for WooCommerce plugin. -
runthings-wc-order-departments/trunk/runthings-wc-order-departments.php
r3318971 r3434381 5 5 * Plugin URI: https://runthings.dev/wordpress-plugins/runthings-wc-order-departments/ 6 6 * Description: Split WooCommerce orders by departments, with AutomateWoo support 7 * Version: 1. 0.17 * Version: 1.1.1 8 8 * Author: runthingsdev 9 9 * Author URI: https://runthings.dev/ 10 10 * Requires at least: 6.3 11 * Tested up to: 6. 811 * Tested up to: 6.9 12 12 * Requires PHP: 7.4 13 13 * Requires Plugins: woocommerce 14 14 * WC requires at least: 8.2 15 * WC tested up to: 9.916 15 * Text Domain: runthings-wc-order-departments 17 16 * Domain Path: /languages … … 42 41 } 43 42 44 define('RUNTHINGS_WC_ORDER_DEPARTMENTS_VERSION', '1. 0.1');43 define('RUNTHINGS_WC_ORDER_DEPARTMENTS_VERSION', '1.1.1'); 45 44 define('RUNTHINGS_WC_ORDER_DEPARTMENTS_URL', plugin_dir_url(__FILE__)); 46 45 define('RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR', plugin_dir_path(__FILE__)); … … 51 50 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/order-department-assigner.php'; 52 51 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/automatewoo-integration.php'; 52 require_once RUNTHINGS_WC_ORDER_DEPARTMENTS_DIR . 'lib/settings.php'; 53 53 54 54 class RunthingsWCOrderDepartments … … 56 56 public $taxonomy = 'order_department'; 57 57 58 private $settings; 59 58 60 public function __construct() 59 61 { … … 65 67 add_action('admin_menu', [$this, 'add_departments_management_menu'], 99); 66 68 69 // Initialize settings first 70 $this->settings = new Settings(); 71 72 // Initialize other components, passing settings where needed 67 73 new Taxonomy($this->taxonomy); 68 new EmailInterceptor($this->taxonomy );74 new EmailInterceptor($this->taxonomy, $this->settings); 69 75 new OrderDepartmentAssigner($this->taxonomy); 70 76 new AutomateWooIntegration();
Note: See TracChangeset
for help on using the changeset viewer.