| | |
| | | |
| | | public function execute(Operation $operation, Progress $progress): Result |
| | | { |
| | | error_log('Executing Content Term.... '); |
| | | // Extract taxonomy from operation type (e.g., "shop_update" -> "shop") |
| | | $data= $operation->requestData; |
| | | $taxonomy = $data['taxonomy']??false; |
| | |
| | | } |
| | | |
| | | // Update metadata |
| | | $meta->setAll($setData); |
| | | $results = $meta->save(); |
| | | $results = $meta->setAll($setData); |
| | | |
| | | if ($results) { |
| | | // Trigger any post-update actions (e.g., thumbnail generation) |
| | | do_action(BASE . "{$taxonomy}_updated", $termID, $userID, $setData); |
| | | |
| | | return Result::success([ |
| | | 'updated_fields' => array_keys($setData), |
| | | 'term_id' => $termID |