Changeset 3782814 for joinotify/trunk/admin/src/Core/Workflow_Processor.php
- Timestamp:
- 11/03/2026 11:52:29 PM (17 hours ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
joinotify/trunk/admin/src/Core/Workflow_Processor.php
r3771693 r3782814 825 825 * 826 826 * @since 2.0.0 827 * @version 2.7.0 827 828 * @param array $trigger_data | Trigger node ({id,type,data}) 828 829 * @param array $payload | Runtime trigger payload … … 869 870 $match = false; 870 871 } 872 } 873 } elseif ( isset( $payload['hook'] ) && $payload['hook'] === 'woocommerce_created_customer' ) { 874 $trigger_source = isset( $settings['account_source'] ) && is_scalar( $settings['account_source'] ) 875 ? (string) $settings['account_source'] 876 : ''; 877 878 // "none" or an unset filter => an account created anywhere 879 if ( '' !== $trigger_source && 'none' !== $trigger_source && $trigger_source !== (string) ( $payload['account_source'] ?? '' ) ) { 880 $match = false; 871 881 } 872 882 } … … 1193 1203 /** 1194 1204 * Handle with workflow actions 1195 * 1205 * 1196 1206 * @since 1.0.0 1197 * @version 1.4.71207 * @version 2.7.0 1198 1208 * @param array $action | Workflow actions array 1199 1209 * @param int $post_id | Post ID … … 1271 1281 } 1272 1282 } 1283 } 1284 1285 /** 1286 * Actions whose handler writes onto the shared payload. 1287 * 1288 * The handlers in the map below capture a copy of the payload, so whatever they store 1289 * is lost. A handler listed here receives the payload by reference instead, so a value 1290 * it stores (an HTTP response, for example) reaches the actions that run after it and 1291 * travels with the payload through delays. Same arguments and return as the map below, 1292 * with the payload taken by reference. 1293 * 1294 * @since 2.7.0 1295 * @param array $payload_actions Map of action_slug => callable( array $action_data, array $action, int $post_id, array &$event_data ): bool. 1296 * @param array $action Full action item ({id,type,data,children}). 1297 * @param int $post_id Workflow post ID. 1298 */ 1299 $payload_actions = apply_filters( 'Joinotify/Workflow_Processor/Payload_Actions', array(), $action, $post_id ); 1300 1301 if ( is_array( $payload_actions ) && isset( $payload_actions[ $action_data['action'] ] ) && is_callable( $payload_actions[ $action_data['action'] ] ) ) { 1302 $handler = $payload_actions[ $action_data['action'] ]; 1303 1304 // called directly, not through call_user_func(), so the reference holds 1305 return (bool) $handler( $action_data, $action, $post_id, $event_data ); 1273 1306 } 1274 1307
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)