> For the complete documentation index, see [llms.txt](https://docs.acpt.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.acpt.io/developers/actions/acpt-save_meta_field.md).

# acpt/save\_meta\_field

Fires after a single meta field value is saved

**Type:** Action

Fires after a single meta field value is saved to its location (a post, term, user, comment, option page, or WooCommerce product attribute).

### Parameters

| Parameter     | Type                      | Description                                                                     |
| ------------- | ------------------------- | ------------------------------------------------------------------------------- |
| `$command`    | `AbstractSaveMetaCommand` | The command instance that performed the save                                    |
| `$fieldModel` | `MetaFieldModel`          | The field definition whose value was saved                                      |
| `$elementId`  | `mixed`                   | The ID of the location the value was saved to (post ID, term ID, user ID, etc.) |
| `$belongsTo`  | `string`                  | The location type (e.g. `POST_ID`, `TERM_ID`, `USER_ID`)                        |

### Usage

```php
add_action("acpt/save_meta_field", function(AbstractSaveMetaCommand $command, $fieldModel, $elementId, $belongsTo){
    // do something
}, 10, 4);
```
