Skip to content

Commit be3f27f

Browse files
authored
Update hooks.md
1 parent a3e9a7f commit be3f27f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/pages/webhooks/hooks.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ The following example configures the webhook described above.
138138

139139
You can implement a converter class to convert a field to a different data type. For example, Commerce stores order IDs as numeric values. If the hook endpoint expects order IDs to be text values, you must convert the numeric value to a string representation before sending the payload.
140140

141-
All converter classes must implement `Magento\AdobeCommerceWebhooks\Model\Filter\Converter\FieldConverterInterface`. The `toExternalFormat` method of a converter class is used to convert a field value before sending a request to the hook endpoint.
141+
All converter classes must implement `Magento\AdobeCommerceWebhooks\Model\Filter\Converter\FieldConverterInterface`. The `toExternalFormat` method of a converter class converts a field value before sending a request to the hook endpoint.
142142

143143
```xml
144144
<fields>
@@ -147,9 +147,9 @@ All converter classes must implement `Magento\AdobeCommerceWebhooks\Model\Filter
147147
</fields>
148148
```
149149

150-
A converter class can also convert the value in a hook endpoint response object with an operation status of `replace`. A value in a `replace` response object will only be converted if the path in the object corresponds to the source of a field with a configured converter class.
150+
A converter class can also convert the value in a hook endpoint response object that has an operation status of `replace`. A value in a `replace` response object will be converted only if the path in the object corresponds to the source of a field with a configured converter class.
151151

152-
For example, given the above hook field configuration, conversion will only occur if a `replace` response object specifies a path of `data/order/status`. In this case, the `fromExternalFormat` method of the configured converter class will be called to convert the value in the response object.
152+
For example, given the above hook field configuration, conversion occurs only if a `replace` response object specifies a path of `data/order/status`. In this case, the `fromExternalFormat` method of the configured converter class will be called to convert the value in the response object.
153153

154154
### Context fields
155155

0 commit comments

Comments
 (0)