-
Notifications
You must be signed in to change notification settings - Fork 1
Bump version v2.8.0 #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump version v2.8.0 #141
Changes from all commits
84a1d12
cc8c4de
8e1d617
2c3b8cf
13d716f
09d538b
1fc3019
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -251,8 +251,13 @@ public static function accessOrderData($order) | |
| } | ||
|
|
||
| foreach ($order->get_items() as $item) { | ||
| if (empty($item)) { | ||
| continue; | ||
| } | ||
|
|
||
| $productId = $item->get_product_id(); | ||
| $product = $item->get_product(); | ||
|
|
||
| $itemData = [ | ||
| 'product_id' => $productId, | ||
| 'variation_id' => $item->get_variation_id() ?? '', | ||
|
|
@@ -263,8 +268,8 @@ public static function accessOrderData($order) | |
| 'subtotal_tax' => $item->get_subtotal_tax() ?? '', | ||
| 'tax_class' => $item->get_tax_class() ?? '', | ||
| 'tax_status' => $item->get_tax_status() ?? '', | ||
| 'product_sku' => $product->get_sku() ?? '', | ||
| 'product_unit_price' => $product->get_price() ?? '', | ||
| 'product_sku' => $product && $product->get_sku() ? $product->get_sku() : '', | ||
| 'product_unit_price' => $product && $product->get_price() ? $product->get_price() : '', | ||
|
Comment on lines
+271
to
+272
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The added checks for the 'product_sku' => $product ? $product->get_sku() : '',
'product_unit_price' => $product ? $product->get_price() : '',
Comment on lines
+271
to
+272
|
||
| ]; | ||
|
|
||
| $acfFieldGroups = Helper::acfGetFieldGroups(['product']); | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -12,7 +12,7 @@ import PayLoadFieldMap from './PayLoadFieldMap' | |||||
| function Body({ webHooks, setWebHooks, isInfo, setTab }) { | ||||||
| const formFields = useRecoilValue($formFields) | ||||||
| const formattedFormFields = useMemo( | ||||||
| () => formFields.map(field => ({ key: field.name, value: `\${${field.name}}` })), | ||||||
| () => formFields?.map(field => ({ key: field.name, value: `\${${field.name}}` })), | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using optional chaining ( To make this more robust, you should check if
Suggested change
|
||||||
| [formFields] | ||||||
| ) | ||||||
|
|
||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This loop makes an individual API request for each tag to be deleted. If a contact has a large number of tags, this can lead to poor performance and potentially hit API rate limits. While the ActiveCampaign API may not offer a bulk delete endpoint for contact tags, it's worth double-checking if a more efficient method is available.
Additionally, the code relies on a static property
HttpHelper::$responseCodeto check the status of the delete operation. This is not a robust pattern as static properties can introduce side effects. It would be better to use the return value fromHttpHelper::delete()to determine the outcome of the request.