fluentcart-developer 3.0.0 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (612) hide show
  1. package/LICENSE.md +26 -26
  2. package/README.md +59 -59
  3. package/dist/cards/fluentcart/templates-native.js +1087 -1087
  4. package/dist/cards/fluentcart/tools.js +2309 -2309
  5. package/dist/server.d.ts.map +1 -1
  6. package/dist/server.js +37 -1
  7. package/dist/server.js.map +1 -1
  8. package/dist/skills/fluentcart-developer/SKILL.md +108 -108
  9. package/dist/skills/fluentcart-developer/examples/README.md +30 -30
  10. package/dist/skills/fluentcart-developer/examples/fluentcart-starter-child-theme/fluent-cart/checkout.php +32 -32
  11. package/dist/skills/fluentcart-developer/examples/fluentcart-starter-child-theme/functions.php +40 -40
  12. package/dist/skills/fluentcart-developer/examples/sample-custom-addon/fluentcart-custom-addon.php +113 -113
  13. package/dist/skills/fluentcart-developer/examples/sample-custom-payment-gateway/fluentcart-custom-gateway-example.php +148 -148
  14. package/dist/skills/fluentcart-developer/examples/sample-fee-surcharge-plugin/fluentcart-fee-surcharge.php +38 -38
  15. package/dist/skills/fluentcart-developer/examples/sample-plugin-with-licensing-sdk/README.md +22 -22
  16. package/dist/skills/fluentcart-developer/examples/sample-plugin-with-licensing-sdk/sample-plugin-with-licensing-sdk.php +79 -79
  17. package/dist/skills/fluentcart-developer/examples/sample-plugin-with-licensing-sdk/updater/FluentLicensing.php +303 -303
  18. package/dist/skills/fluentcart-developer/examples/sample-plugin-with-licensing-sdk/updater/LicenseSettings.php +566 -566
  19. package/dist/skills/fluentcart-developer/examples/sample-plugin-with-licensing-sdk/updater/PluginUpdater.php +304 -304
  20. package/dist/skills/fluentcart-developer/examples/sample-shipping-carrier/fluentcart-custom-shipping-carrier.php +61 -61
  21. package/dist/skills/fluentcart-developer/references/api/authentication.md +452 -452
  22. package/dist/skills/fluentcart-developer/references/api/coupons.md +786 -786
  23. package/dist/skills/fluentcart-developer/references/api/customers.md +889 -889
  24. package/dist/skills/fluentcart-developer/references/api/files.md +609 -609
  25. package/dist/skills/fluentcart-developer/references/api/index.md +432 -432
  26. package/dist/skills/fluentcart-developer/references/api/licensing.md +633 -633
  27. package/dist/skills/fluentcart-developer/references/api/order-bump.md +384 -384
  28. package/dist/skills/fluentcart-developer/references/api/orders.md +814 -814
  29. package/dist/skills/fluentcart-developer/references/api/products.md +866 -866
  30. package/dist/skills/fluentcart-developer/references/api/roles-permissions.md +536 -536
  31. package/dist/skills/fluentcart-developer/references/api/subscriptions.md +827 -827
  32. package/dist/skills/fluentcart-developer/references/database/index.md +44 -44
  33. package/dist/skills/fluentcart-developer/references/database/models/activity.md +178 -178
  34. package/dist/skills/fluentcart-developer/references/database/models/applied-coupon.md +291 -291
  35. package/dist/skills/fluentcart-developer/references/database/models/attribute-group.md +239 -239
  36. package/dist/skills/fluentcart-developer/references/database/models/attribute-relation.md +181 -181
  37. package/dist/skills/fluentcart-developer/references/database/models/attribute-term.md +219 -219
  38. package/dist/skills/fluentcart-developer/references/database/models/cart.md +645 -645
  39. package/dist/skills/fluentcart-developer/references/database/models/coupon.md +427 -427
  40. package/dist/skills/fluentcart-developer/references/database/models/customer-addresses.md +348 -348
  41. package/dist/skills/fluentcart-developer/references/database/models/customer-meta.md +156 -156
  42. package/dist/skills/fluentcart-developer/references/database/models/customer.md +584 -584
  43. package/dist/skills/fluentcart-developer/references/database/models/dynamic-model.md +163 -163
  44. package/dist/skills/fluentcart-developer/references/database/models/label-relationship.md +155 -155
  45. package/dist/skills/fluentcart-developer/references/database/models/label.md +153 -153
  46. package/dist/skills/fluentcart-developer/references/database/models/license-activation.md +182 -182
  47. package/dist/skills/fluentcart-developer/references/database/models/license-meta.md +163 -163
  48. package/dist/skills/fluentcart-developer/references/database/models/license-site.md +208 -208
  49. package/dist/skills/fluentcart-developer/references/database/models/license.md +640 -640
  50. package/dist/skills/fluentcart-developer/references/database/models/meta.md +233 -233
  51. package/dist/skills/fluentcart-developer/references/database/models/order-address.md +391 -391
  52. package/dist/skills/fluentcart-developer/references/database/models/order-download-permission.md +144 -144
  53. package/dist/skills/fluentcart-developer/references/database/models/order-item.md +383 -383
  54. package/dist/skills/fluentcart-developer/references/database/models/order-meta.md +303 -303
  55. package/dist/skills/fluentcart-developer/references/database/models/order-operation.md +158 -158
  56. package/dist/skills/fluentcart-developer/references/database/models/order-promotion-stat.md +175 -175
  57. package/dist/skills/fluentcart-developer/references/database/models/order-promotion.md +250 -250
  58. package/dist/skills/fluentcart-developer/references/database/models/order-tax-rate.md +172 -172
  59. package/dist/skills/fluentcart-developer/references/database/models/order-transaction.md +440 -440
  60. package/dist/skills/fluentcart-developer/references/database/models/order.md +727 -727
  61. package/dist/skills/fluentcart-developer/references/database/models/product-detail.md +397 -397
  62. package/dist/skills/fluentcart-developer/references/database/models/product-download.md +258 -258
  63. package/dist/skills/fluentcart-developer/references/database/models/product-meta.md +153 -153
  64. package/dist/skills/fluentcart-developer/references/database/models/product-variation.md +556 -556
  65. package/dist/skills/fluentcart-developer/references/database/models/product.md +580 -580
  66. package/dist/skills/fluentcart-developer/references/database/models/relationships.md +427 -427
  67. package/dist/skills/fluentcart-developer/references/database/models/scheduled-action.md +175 -175
  68. package/dist/skills/fluentcart-developer/references/database/models/shipping-class.md +148 -148
  69. package/dist/skills/fluentcart-developer/references/database/models/shipping-method.md +280 -280
  70. package/dist/skills/fluentcart-developer/references/database/models/shipping-zone.md +205 -205
  71. package/dist/skills/fluentcart-developer/references/database/models/subscription-meta.md +173 -173
  72. package/dist/skills/fluentcart-developer/references/database/models/subscription.md +528 -528
  73. package/dist/skills/fluentcart-developer/references/database/models/tax-class.md +195 -195
  74. package/dist/skills/fluentcart-developer/references/database/models/tax-rate.md +225 -225
  75. package/dist/skills/fluentcart-developer/references/database/models/user-meta.md +166 -166
  76. package/dist/skills/fluentcart-developer/references/database/models/user.md +220 -220
  77. package/dist/skills/fluentcart-developer/references/database/models.md +404 -404
  78. package/dist/skills/fluentcart-developer/references/database/query-builder.md +860 -860
  79. package/dist/skills/fluentcart-developer/references/database/readme.md +276 -276
  80. package/dist/skills/fluentcart-developer/references/database/schema.md +1002 -1002
  81. package/dist/skills/fluentcart-developer/references/engineering/adding-custom-pages-to-the-customer-dashboard.md +395 -395
  82. package/dist/skills/fluentcart-developer/references/engineering/index.md +4 -4
  83. package/dist/skills/fluentcart-developer/references/engineering.md +4 -4
  84. package/dist/skills/fluentcart-developer/references/getting-started.md +249 -249
  85. package/dist/skills/fluentcart-developer/references/guides/frontend.md +519 -519
  86. package/dist/skills/fluentcart-developer/references/guides/index.md +107 -107
  87. package/dist/skills/fluentcart-developer/references/guides/integrations.md +600 -600
  88. package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/index.md +237 -237
  89. package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/labels-and-tracking.md +481 -481
  90. package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/live-rates.md +269 -269
  91. package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/reference.md +223 -223
  92. package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/settings.md +370 -370
  93. package/dist/skills/fluentcart-developer/references/guides/shipping-carrier.md +237 -237
  94. package/dist/skills/fluentcart-developer/references/guides/subscriptions.md +217 -217
  95. package/dist/skills/fluentcart-developer/references/hooks/actions/admin-and-templates.md +1079 -1079
  96. package/dist/skills/fluentcart-developer/references/hooks/actions/cart-and-checkout.md +1795 -1795
  97. package/dist/skills/fluentcart-developer/references/hooks/actions/customers-and-users.md +327 -327
  98. package/dist/skills/fluentcart-developer/references/hooks/actions/licenses.md +829 -829
  99. package/dist/skills/fluentcart-developer/references/hooks/actions/modules.md +81 -81
  100. package/dist/skills/fluentcart-developer/references/hooks/actions/orders.md +757 -757
  101. package/dist/skills/fluentcart-developer/references/hooks/actions/payments-and-integrations.md +1163 -1163
  102. package/dist/skills/fluentcart-developer/references/hooks/actions/pro-modules.md +219 -219
  103. package/dist/skills/fluentcart-developer/references/hooks/actions/products-and-coupons.md +1019 -1019
  104. package/dist/skills/fluentcart-developer/references/hooks/actions/subscriptions.md +1290 -1290
  105. package/dist/skills/fluentcart-developer/references/hooks/actions.md +16 -16
  106. package/dist/skills/fluentcart-developer/references/hooks/deprecated.md +60 -60
  107. package/dist/skills/fluentcart-developer/references/hooks/filters/cart-and-checkout.md +2032 -2032
  108. package/dist/skills/fluentcart-developer/references/hooks/filters/customers-and-subscriptions.md +1746 -1746
  109. package/dist/skills/fluentcart-developer/references/hooks/filters/integrations-and-advanced.md +2439 -2439
  110. package/dist/skills/fluentcart-developer/references/hooks/filters/modules.md +464 -464
  111. package/dist/skills/fluentcart-developer/references/hooks/filters/orders-and-payments.md +2658 -2658
  112. package/dist/skills/fluentcart-developer/references/hooks/filters/pro-modules.md +502 -502
  113. package/dist/skills/fluentcart-developer/references/hooks/filters/products-and-pricing.md +1785 -1785
  114. package/dist/skills/fluentcart-developer/references/hooks/filters/settings-and-configuration.md +2966 -2966
  115. package/dist/skills/fluentcart-developer/references/hooks/filters.md +14 -14
  116. package/dist/skills/fluentcart-developer/references/hooks/index.md +35 -35
  117. package/dist/skills/fluentcart-developer/references/index.md +625 -625
  118. package/dist/skills/fluentcart-developer/references/modules/fee-system.md +427 -427
  119. package/dist/skills/fluentcart-developer/references/modules/ghost-product-selling.md +440 -440
  120. package/dist/skills/fluentcart-developer/references/modules/index.md +484 -484
  121. package/dist/skills/fluentcart-developer/references/modules/licensing.md +342 -342
  122. package/dist/skills/fluentcart-developer/references/modules/order-bump.md +433 -433
  123. package/dist/skills/fluentcart-developer/references/modules/payment-methods.md +129 -129
  124. package/dist/skills/fluentcart-developer/references/modules/refunds.md +170 -170
  125. package/dist/skills/fluentcart-developer/references/modules/shipping.md +846 -846
  126. package/dist/skills/fluentcart-developer/references/modules/storage.md +986 -986
  127. package/dist/skills/fluentcart-developer/references/modules/subscription-vendor-ids.md +186 -186
  128. package/dist/skills/fluentcart-developer/references/modules/subscriptions.md +678 -678
  129. package/dist/skills/fluentcart-developer/references/payment-methods-integration/index.md +164 -164
  130. package/dist/skills/fluentcart-developer/references/payment-methods-integration/paddle-example.md +1648 -1648
  131. package/dist/skills/fluentcart-developer/references/payment-methods-integration/payment/setting/fields.md +353 -353
  132. package/dist/skills/fluentcart-developer/references/payment-methods-integration/quick-implementation.md +1079 -1079
  133. package/dist/skills/fluentcart-developer/references/payment-methods-integration.md +164 -164
  134. package/dist/skills/fluentcart-developer/references/restapi/checkout.md +573 -573
  135. package/dist/skills/fluentcart-developer/references/restapi/coupons.md +958 -958
  136. package/dist/skills/fluentcart-developer/references/restapi/customer-profile.md +1423 -1423
  137. package/dist/skills/fluentcart-developer/references/restapi/customers.md +1103 -1103
  138. package/dist/skills/fluentcart-developer/references/restapi/dashboard.md +1083 -1083
  139. package/dist/skills/fluentcart-developer/references/restapi/data-export.md +132 -132
  140. package/dist/skills/fluentcart-developer/references/restapi/email-notifications.md +846 -846
  141. package/dist/skills/fluentcart-developer/references/restapi/files.md +313 -313
  142. package/dist/skills/fluentcart-developer/references/restapi/index.md +127 -127
  143. package/dist/skills/fluentcart-developer/references/restapi/integrations.md +1000 -1000
  144. package/dist/skills/fluentcart-developer/references/restapi/inventory.md +192 -192
  145. package/dist/skills/fluentcart-developer/references/restapi/labels-and-attributes.md +797 -797
  146. package/dist/skills/fluentcart-developer/references/restapi/licensing.md +1733 -1733
  147. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-available-shipping-methods.md +30 -30
  148. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-checkout-summary.md +28 -28
  149. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-country-info.md +29 -29
  150. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-order-info.md +28 -28
  151. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-shipping-methods-list-view.md +30 -30
  152. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/login.md +66 -66
  153. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/place-order.md +179 -179
  154. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/apply-coupon.md +83 -83
  155. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/cancel-coupon.md +87 -87
  156. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/check-product-eligibility.md +59 -59
  157. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/create-coupon.md +230 -230
  158. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/delete-coupon.md +29 -29
  159. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/get-coupon-settings.md +20 -20
  160. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/get-coupon.md +27 -27
  161. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/list-coupon-codes.md +20 -20
  162. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/list-coupons.md +37 -37
  163. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/re-apply-coupons.md +75 -75
  164. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/store-coupon-settings.md +40 -40
  165. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/update-coupon.md +133 -133
  166. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/create-address-checkout.md +138 -138
  167. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/create-profile-address.md +119 -119
  168. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/dashboard-overview.md +22 -22
  169. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/delete-profile-address.md +46 -46
  170. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-order-details.md +30 -30
  171. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-portal-sections.md +29 -29
  172. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-profile-details.md +22 -22
  173. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-transaction-billing-address.md +30 -30
  174. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-upgrade-paths.md +31 -31
  175. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/list-downloads.md +29 -29
  176. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/list-orders.md +28 -28
  177. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/make-profile-address-primary.md +55 -55
  178. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/pause-subscription.md +29 -29
  179. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/resume-subscription.md +29 -29
  180. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/save-transaction-billing-address.md +92 -92
  181. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/select-address-for-checkout.md +32 -32
  182. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/update-profile-address.md +115 -115
  183. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/update-profile-details.md +69 -69
  184. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/attach-user.md +50 -50
  185. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/bulk-actions.md +65 -65
  186. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/create-address.md +135 -135
  187. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/create-customer.md +108 -108
  188. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/delete-address.md +62 -62
  189. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/detach-user.md +28 -28
  190. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/find-customer-order.md +27 -27
  191. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-attachable-users.md +20 -20
  192. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-customer-addresses.md +28 -28
  193. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-customer-orders.md +37 -37
  194. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-customer-stats.md +27 -27
  195. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-customer.md +32 -32
  196. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/list-customers.md +37 -37
  197. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/recalculate-ltv.md +28 -28
  198. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/set-primary-address.md +72 -72
  199. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/update-additional-info.md +55 -55
  200. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/update-address.md +144 -144
  201. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/update-customer.md +123 -123
  202. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/attach-note-to-order.md +49 -49
  203. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/create-all-pages.md +21 -21
  204. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/create-single-page.md +55 -55
  205. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/delete-activity.md +28 -28
  206. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-country-info.md +29 -29
  207. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-dashboard-stats.md +22 -22
  208. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-filter-options.md +31 -31
  209. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-onboarding-data.md +20 -20
  210. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-onboarding-settings.md +20 -20
  211. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-print-templates.md +20 -20
  212. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-search-options.md +27 -27
  213. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-widgets.md +28 -28
  214. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/initialize-app.md +20 -20
  215. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/list-activities.md +33 -33
  216. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/list-attachments.md +21 -21
  217. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/list-countries.md +20 -20
  218. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/mark-activity-read.md +53 -53
  219. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/run-data-backfills.md +21 -21
  220. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/save-onboarding-settings.md +54 -54
  221. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/save-onboarding-tax-settings.md +73 -73
  222. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/save-print-templates.md +64 -64
  223. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/upload-attachment.md +42 -42
  224. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/export-customers-batch.md +129 -129
  225. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/export-licenses-batch.md +133 -133
  226. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/export-orders-batch.md +129 -129
  227. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/export-subscriptions-batch.md +129 -129
  228. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/get-customers-export-schema.md +21 -21
  229. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/get-licenses-export-schema.md +26 -26
  230. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/get-orders-export-schema.md +21 -21
  231. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/get-subscriptions-export-schema.md +21 -21
  232. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/enable-notification.md +57 -57
  233. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-digest-settings.md +22 -22
  234. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-notification.md +30 -30
  235. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-reminders.md +22 -22
  236. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-settings.md +22 -22
  237. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-shortcodes.md +22 -22
  238. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/list-notifications.md +20 -20
  239. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/preview-default-template.md +66 -66
  240. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/preview-notification.md +50 -50
  241. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/save-digest-settings.md +101 -101
  242. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/save-reminders.md +162 -162
  243. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/save-settings.md +99 -99
  244. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/send-digest-test.md +47 -47
  245. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/send-manual-reminder.md +51 -51
  246. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/update-notification.md +93 -93
  247. package/dist/skills/fluentcart-developer/references/restapi/operations/files/delete-file.md +31 -31
  248. package/dist/skills/fluentcart-developer/references/restapi/operations/files/get-bucket-list.md +28 -28
  249. package/dist/skills/fluentcart-developer/references/restapi/operations/files/list-files.md +30 -30
  250. package/dist/skills/fluentcart-developer/references/restapi/operations/files/upload-editor-file.md +32 -32
  251. package/dist/skills/fluentcart-developer/references/restapi/operations/files/upload-file.md +34 -34
  252. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/chained-data-request.md +46 -46
  253. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/change-feed-status.md +51 -51
  254. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/delete-feed.md +27 -27
  255. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-dynamic-options.md +29 -29
  256. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-feed-lists.md +27 -27
  257. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-feed-settings.md +27 -27
  258. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-global-feeds.md +20 -20
  259. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-global-settings.md +26 -26
  260. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/install-addon-plugin.md +49 -49
  261. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/list-addons.md +20 -20
  262. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/save-feed-settings.md +52 -52
  263. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/set-global-settings.md +50 -50
  264. package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/bulk-update-stock.md +94 -94
  265. package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/export-inventory.md +81 -81
  266. package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/get-adjustment-history.md +26 -26
  267. package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/get-inventory-stats.md +21 -21
  268. package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/list-inventory.md +33 -33
  269. package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/update-stock.md +75 -75
  270. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/create-attribute-group.md +31 -31
  271. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/create-label.md +31 -31
  272. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/create-terms.md +90 -90
  273. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/delete-attribute-group.md +28 -28
  274. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/delete-attribute-term.md +29 -29
  275. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/get-attribute-group.md +28 -28
  276. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/get-attribute-library.md +20 -20
  277. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/list-attribute-groups.md +32 -32
  278. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/list-attribute-terms.md +33 -33
  279. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/list-labels.md +20 -20
  280. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/reorder-groups.md +51 -51
  281. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/reorder-terms.md +56 -56
  282. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/update-attribute-group.md +37 -37
  283. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/update-attribute-term.md +39 -39
  284. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/update-label-selections.md +32 -32
  285. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/activate-plugin-license.md +41 -41
  286. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/activate-site-admin.md +60 -60
  287. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/deactivate-plugin-license.md +18 -18
  288. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/deactivate-site-admin.md +67 -67
  289. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/deactivate-site-customer.md +47 -47
  290. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/delete-license.md +24 -24
  291. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/extend-license-validity.md +47 -47
  292. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-customer-license-details.md +25 -25
  293. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-customer-licenses-admin.md +26 -26
  294. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-license-activations.md +25 -25
  295. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-license-details.md +25 -25
  296. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-license-site.md +30 -30
  297. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-plugin-license-status.md +18 -18
  298. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-product-license-settings.md +24 -24
  299. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/list-customer-licenses.md +25 -25
  300. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/list-license-sites.md +33 -33
  301. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/list-licenses.md +38 -38
  302. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-activate-license.md +54 -54
  303. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-check-license.md +26 -26
  304. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-deactivate-license.md +46 -46
  305. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-download-license-package.md +23 -23
  306. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-get-license-version.md +26 -26
  307. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/regenerate-license-key.md +24 -24
  308. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/save-product-license-settings.md +193 -193
  309. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/update-license-activation-limit.md +53 -53
  310. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/update-license-status.md +52 -52
  311. package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/create-order-bump.md +47 -47
  312. package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/delete-order-bump.md +25 -25
  313. package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/get-order-bump.md +25 -25
  314. package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/list-order-bumps.md +29 -29
  315. package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/update-order-bump.md +141 -141
  316. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/accept-dispute.md +47 -47
  317. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/bulk-actions.md +72 -72
  318. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/calculate-shipping.md +67 -67
  319. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/calculate-tax.md +98 -98
  320. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/change-customer.md +50 -50
  321. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/charge-now.md +29 -29
  322. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/create-and-change-customer.md +92 -92
  323. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/create-custom-order-item.md +68 -68
  324. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/create-order.md +351 -351
  325. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/create-renewal-now.md +29 -29
  326. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/delete-order.md +28 -28
  327. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/generate-missing-licenses.md +29 -29
  328. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-order-transactions.md +27 -27
  329. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-order.md +27 -27
  330. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-renewal.md +28 -28
  331. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-shipping-methods.md +28 -28
  332. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-single-transaction.md +28 -28
  333. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/list-order-currencies.md +22 -22
  334. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/list-orders.md +42 -42
  335. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/list-renewals.md +28 -28
  336. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/mark-as-paid.md +61 -61
  337. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/price-order.md +135 -135
  338. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/refund-order.md +72 -72
  339. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/resend-renewal-invoice.md +29 -29
  340. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/skip-renewal.md +48 -48
  341. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/sync-order-statuses.md +28 -28
  342. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/sync-pending-transaction.md +29 -29
  343. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-order-address-id.md +60 -60
  344. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-order-address.md +98 -98
  345. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-order.md +172 -172
  346. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-statuses.md +77 -77
  347. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-subscription-details.md +84 -84
  348. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-transaction-status.md +51 -51
  349. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/void-renewal.md +30 -30
  350. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/create-pdf-template.md +42 -42
  351. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/delete-pdf-template.md +26 -26
  352. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/download-pdf-preview.md +44 -44
  353. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-factory-default-templates.md +19 -19
  354. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-pdf-status.md +21 -21
  355. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-pdf-template.md +26 -26
  356. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-saved-templates.md +21 -21
  357. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-seller-details.md +19 -19
  358. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/list-pdf-templates.md +19 -19
  359. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/save-pdf-template.md +53 -53
  360. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/save-seller-details.md +97 -97
  361. package/dist/skills/fluentcart-developer/references/restapi/operations/products/add-product-terms.md +64 -64
  362. package/dist/skills/fluentcart-developer/references/restapi/operations/products/bulk-edit-fetch.md +30 -30
  363. package/dist/skills/fluentcart-developer/references/restapi/operations/products/bulk-insert-products.md +62 -62
  364. package/dist/skills/fluentcart-developer/references/restapi/operations/products/bulk-update-products.md +59 -59
  365. package/dist/skills/fluentcart-developer/references/restapi/operations/products/bulk-update-variants.md +83 -83
  366. package/dist/skills/fluentcart-developer/references/restapi/operations/products/change-integration-status.md +64 -64
  367. package/dist/skills/fluentcart-developer/references/restapi/operations/products/create-dummy-products.md +45 -45
  368. package/dist/skills/fluentcart-developer/references/restapi/operations/products/create-product.md +81 -81
  369. package/dist/skills/fluentcart-developer/references/restapi/operations/products/create-variation.md +181 -181
  370. package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-downloadable-file.md +27 -27
  371. package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-product-integration.md +30 -30
  372. package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-product.md +27 -27
  373. package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-taxonomy-term.md +55 -55
  374. package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-upgrade-path.md +27 -27
  375. package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-variation.md +27 -27
  376. package/dist/skills/fluentcart-developer/references/restapi/operations/products/do-bulk-action.md +56 -56
  377. package/dist/skills/fluentcart-developer/references/restapi/operations/products/duplicate-product.md +56 -56
  378. package/dist/skills/fluentcart-developer/references/restapi/operations/products/fetch-products-by-ids.md +26 -26
  379. package/dist/skills/fluentcart-developer/references/restapi/operations/products/fetch-taxonomy-terms.md +20 -20
  380. package/dist/skills/fluentcart-developer/references/restapi/operations/products/fetch-terms-by-parent.md +60 -60
  381. package/dist/skills/fluentcart-developer/references/restapi/operations/products/fetch-variations-by-ids.md +26 -26
  382. package/dist/skills/fluentcart-developer/references/restapi/operations/products/find-subscription-variants.md +26 -26
  383. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-bundle-info.md +27 -27
  384. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-downloadable-url.md +27 -27
  385. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-max-excerpt-word-count.md +20 -20
  386. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-pricing-widgets.md +27 -27
  387. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-product-integration-feeds.md +29 -29
  388. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-product-integration-settings.md +31 -31
  389. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-product-pricing.md +28 -28
  390. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-product.md +28 -28
  391. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-related-products.md +31 -31
  392. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-upgrade-settings.md +27 -27
  393. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-variation-upgrade-paths.md +28 -28
  394. package/dist/skills/fluentcart-developer/references/restapi/operations/products/group-bulk-update-variants.md +103 -103
  395. package/dist/skills/fluentcart-developer/references/restapi/operations/products/list-all-variants.md +26 -26
  396. package/dist/skills/fluentcart-developer/references/restapi/operations/products/list-product-variations.md +26 -26
  397. package/dist/skills/fluentcart-developer/references/restapi/operations/products/list-products.md +34 -34
  398. package/dist/skills/fluentcart-developer/references/restapi/operations/products/remove-shipping-class.md +27 -27
  399. package/dist/skills/fluentcart-developer/references/restapi/operations/products/remove-tax-class.md +27 -27
  400. package/dist/skills/fluentcart-developer/references/restapi/operations/products/save-bundle-info.md +56 -56
  401. package/dist/skills/fluentcart-developer/references/restapi/operations/products/save-product-integration.md +62 -62
  402. package/dist/skills/fluentcart-developer/references/restapi/operations/products/save-upgrade-path.md +78 -78
  403. package/dist/skills/fluentcart-developer/references/restapi/operations/products/search-product-variant-options.md +29 -29
  404. package/dist/skills/fluentcart-developer/references/restapi/operations/products/search-products-by-name.md +28 -28
  405. package/dist/skills/fluentcart-developer/references/restapi/operations/products/search-variants-by-name.md +28 -28
  406. package/dist/skills/fluentcart-developer/references/restapi/operations/products/set-variation-media.md +74 -74
  407. package/dist/skills/fluentcart-developer/references/restapi/operations/products/suggest-sku.md +28 -28
  408. package/dist/skills/fluentcart-developer/references/restapi/operations/products/sync-downloadable-files.md +134 -134
  409. package/dist/skills/fluentcart-developer/references/restapi/operations/products/sync-taxonomy-terms.md +61 -61
  410. package/dist/skills/fluentcart-developer/references/restapi/operations/products/toggle-product-tax-exemption.md +56 -56
  411. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-downloadable-file.md +98 -98
  412. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-inventory.md +56 -56
  413. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-long-desc-editor-mode.md +49 -49
  414. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-manage-stock.md +53 -53
  415. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-product-detail.md +58 -58
  416. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-product-pricing.md +225 -225
  417. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-shipping-class.md +49 -49
  418. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-tax-class.md +49 -49
  419. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-upgrade-path.md +78 -78
  420. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-variant-option.md +79 -79
  421. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-variant-tax-exemption.md +56 -56
  422. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-variation-pricing-table.md +49 -49
  423. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-variation.md +105 -105
  424. package/dist/skills/fluentcart-developer/references/restapi/operations/public-shop/get-product-views.md +34 -34
  425. package/dist/skills/fluentcart-developer/references/restapi/operations/public-shop/list-products.md +42 -42
  426. package/dist/skills/fluentcart-developer/references/restapi/operations/public-shop/search-products.md +30 -30
  427. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/channel-rules.md +24 -24
  428. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/country-heat-map.md +22 -22
  429. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/coupon-overview.md +37 -37
  430. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/coupons.md +36 -36
  431. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-insights.md +31 -31
  432. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-overview.md +36 -36
  433. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-repeat.md +35 -35
  434. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-segment-customers.md +36 -36
  435. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-segments.md +30 -30
  436. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-value.md +34 -34
  437. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/dashboard-stats.md +30 -30
  438. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/failed-orders.md +34 -34
  439. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/fetch-new-vs-returning-customer.md +34 -34
  440. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/fetch-report-by-day-and-hour.md +34 -34
  441. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/fetch-report-meta.md +29 -29
  442. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/fetch-top-sold-products.md +34 -34
  443. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/future-renewals.md +31 -31
  444. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/generate-retention-snapshots.md +24 -24
  445. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/get-overview.md +30 -30
  446. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/get-recent-activities.md +26 -26
  447. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/get-recent-orders.md +20 -20
  448. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/get-revenue.md +37 -37
  449. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/installments-at-risk.md +35 -35
  450. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/installments-variations.md +33 -33
  451. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/installments.md +33 -33
  452. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/item-count-distribution.md +34 -34
  453. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/license-chart.md +30 -30
  454. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/license-pie-chart.md +22 -22
  455. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/license-summary.md +22 -22
  456. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/locations.md +43 -43
  457. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/order-chart.md +37 -37
  458. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/order-completion-time.md +34 -34
  459. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/order-mix.md +34 -34
  460. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/order-value-distribution.md +34 -34
  461. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/payment-methods-disputes.md +38 -38
  462. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/payment-methods-methods.md +36 -36
  463. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/payment-methods.md +37 -37
  464. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/product-comparison-launch.md +33 -33
  465. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/product-comparison.md +40 -40
  466. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/product-detail.md +37 -37
  467. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/product-sales.md +37 -37
  468. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/refunds-overview.md +37 -37
  469. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/retention-snapshots-step.md +45 -45
  470. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/sales-growth-chart.md +35 -35
  471. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/save-channel-rules.md +73 -73
  472. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/source-channels.md +37 -37
  473. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/sources.md +49 -49
  474. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-cohorts.md +33 -33
  475. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-health.md +30 -30
  476. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-rebuys.md +37 -37
  477. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-retention.md +34 -34
  478. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-variations.md +22 -22
  479. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscriptions-overview.md +37 -37
  480. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/weeks-between-refund.md +34 -34
  481. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/assign-role.md +48 -48
  482. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/delete-role-assignment.md +47 -47
  483. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/get-role.md +25 -25
  484. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/list-managers.md +18 -18
  485. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/list-roles.md +18 -18
  486. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/search-users.md +25 -25
  487. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/update-role.md +43 -43
  488. package/dist/skills/fluentcart-developer/references/restapi/operations/saved-views/create-saved-view.md +106 -106
  489. package/dist/skills/fluentcart-developer/references/restapi/operations/saved-views/delete-saved-view.md +26 -26
  490. package/dist/skills/fluentcart-developer/references/restapi/operations/saved-views/list-saved-views.md +25 -25
  491. package/dist/skills/fluentcart-developer/references/restapi/operations/saved-views/update-saved-view.md +83 -83
  492. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/activate-payment-addon.md +44 -44
  493. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/activate-plugin-addon.md +44 -44
  494. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/change-storage-driver-status.md +56 -56
  495. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/check-paypal-webhook.md +26 -26
  496. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/create-storage-bucket.md +63 -63
  497. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/disconnect-payment-method.md +55 -55
  498. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/exchange-paypal-seller-auth-token.md +62 -62
  499. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-active-storage-drivers.md +20 -20
  500. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-checkout-fields.md +22 -22
  501. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-email-shortcodes.md +20 -20
  502. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-mcp-config-snippets.md +26 -26
  503. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-mcp-status.md +20 -20
  504. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-module-settings.md +20 -20
  505. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-payment-method-connection-info.md +26 -26
  506. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-payment-method-settings.md +26 -26
  507. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-permissions.md +22 -22
  508. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-plugin-addons.md +20 -20
  509. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-storage-driver-settings.md +27 -27
  510. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-store-settings.md +26 -26
  511. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/install-mcp-adapter.md +21 -21
  512. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/install-payment-addon.md +60 -60
  513. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/install-plugin-addon.md +64 -64
  514. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/list-all-payment-methods.md +20 -20
  515. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/list-all-storage-drivers.md +20 -20
  516. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/list-storage-buckets.md +67 -67
  517. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/reorder-payment-methods.md +55 -55
  518. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/reset-storage-driver-settings.md +45 -45
  519. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-checkout-fields.md +133 -133
  520. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-confirmation-settings.md +68 -68
  521. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-module-settings.md +68 -68
  522. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-payment-method-design.md +67 -67
  523. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-payment-method-settings.md +58 -58
  524. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-permissions.md +68 -68
  525. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-storage-driver-settings.md +62 -62
  526. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-store-settings.md +239 -239
  527. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/setup-paypal-webhook.md +48 -48
  528. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/toggle-mcp.md +40 -40
  529. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/verify-storage-driver-connection.md +62 -62
  530. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/verify-turnstile-keys.md +55 -55
  531. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/create-shipping-class.md +73 -73
  532. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/create-shipping-method.md +110 -110
  533. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/create-shipping-zone.md +56 -56
  534. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/delete-shipping-class.md +29 -29
  535. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/delete-shipping-method.md +29 -29
  536. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/delete-shipping-zone.md +29 -29
  537. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-shipping-class-profile.md +30 -30
  538. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-shipping-class.md +29 -29
  539. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-shipping-packages.md +22 -22
  540. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-shipping-zone.md +27 -27
  541. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-zone-countries.md +22 -22
  542. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-zone-states.md +28 -28
  543. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/list-shipping-classes.md +31 -31
  544. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/list-shipping-zones.md +31 -31
  545. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/save-shipping-packages.md +112 -112
  546. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/update-shipping-class.md +79 -79
  547. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/update-shipping-method.md +113 -113
  548. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/update-shipping-zone.md +62 -62
  549. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/update-zone-order.md +52 -52
  550. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/cancel-auto-renew.md +30 -30
  551. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/cancel-subscription.md +52 -52
  552. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/confirm-subscription-switch.md +70 -70
  553. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/fetch-subscription-remote.md +28 -28
  554. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/generate-early-payment-link.md +29 -29
  555. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/get-customer-subscription.md +27 -27
  556. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/get-or-create-plan.md +69 -69
  557. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/get-setup-intent-attempts.md +30 -30
  558. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/get-subscription.md +28 -28
  559. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/initiate-early-payment.md +31 -31
  560. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/list-customer-subscriptions.md +27 -27
  561. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/list-subscriptions.md +39 -39
  562. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/pause-subscription.md +28 -28
  563. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/reactivate-subscription.md +28 -28
  564. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/resume-subscription.md +28 -28
  565. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/switch-payment-method.md +70 -70
  566. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/update-payment-method.md +69 -69
  567. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/update-vendor-ids.md +56 -56
  568. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/verify-vendor-ids.md +56 -56
  569. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/create-tax-class.md +51 -51
  570. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/create-tax-rate.md +117 -117
  571. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/delete-product-override.md +27 -27
  572. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/delete-shipping-tax-override.md +27 -27
  573. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/delete-tax-class.md +28 -28
  574. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/delete-tax-rate.md +27 -27
  575. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-country-tax-id.md +27 -27
  576. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-country-tax-rates.md +28 -28
  577. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-eu-vat-product-overrides.md +20 -20
  578. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-oss-country-rates.md +20 -20
  579. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-preconfigured-tax-rates.md +20 -20
  580. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-product-overrides.md +27 -27
  581. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-tax-settings.md +20 -20
  582. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/list-all-tax-rates.md +20 -20
  583. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/list-tax-classes.md +20 -20
  584. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/list-tax-records.md +37 -37
  585. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/mark-taxes-as-filed.md +58 -58
  586. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/reset-eu-vat-rates.md +21 -21
  587. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-configured-countries.md +57 -57
  588. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-country-tax-id.md +50 -50
  589. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-eu-vat-cross-border-settings.md +127 -127
  590. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-oss-country-rates.md +100 -100
  591. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-product-override.md +110 -110
  592. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-shipping-tax-override.md +52 -52
  593. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-tax-settings.md +166 -166
  594. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/update-country-status.md +54 -54
  595. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/update-tax-rate.md +116 -116
  596. package/dist/skills/fluentcart-developer/references/restapi/order-bumps.md +433 -433
  597. package/dist/skills/fluentcart-developer/references/restapi/orders.md +1212 -1212
  598. package/dist/skills/fluentcart-developer/references/restapi/pdf-templates.md +212 -212
  599. package/dist/skills/fluentcart-developer/references/restapi/products.md +2485 -2485
  600. package/dist/skills/fluentcart-developer/references/restapi/public-shop.md +191 -191
  601. package/dist/skills/fluentcart-developer/references/restapi/reports.md +3773 -3773
  602. package/dist/skills/fluentcart-developer/references/restapi/roles.md +403 -403
  603. package/dist/skills/fluentcart-developer/references/restapi/saved-views.md +136 -136
  604. package/dist/skills/fluentcart-developer/references/restapi/settings.md +1423 -1423
  605. package/dist/skills/fluentcart-developer/references/restapi/shipping.md +905 -905
  606. package/dist/skills/fluentcart-developer/references/restapi/subscriptions.md +1169 -1169
  607. package/dist/skills/fluentcart-developer/references/restapi/tax.md +1551 -1551
  608. package/dist/skills/fluentcart-developer/references/restapi.md +127 -127
  609. package/dist/skills/fluentcart-developer/scripts/cli.js +1 -1
  610. package/dist/version.d.ts +1 -1
  611. package/dist/version.js +1 -1
  612. package/package.json +66 -65
@@ -1,2658 +1,2658 @@
1
- # Orders & Payments
2
-
3
- All filters related to [Order](/database/models/order.md) lifecycle, payment processing, gateway integrations, and taxes.
4
-
5
- ## Order Statuses
6
-
7
- ### ` order_statuses `
8
-
9
- `fluent_cart/order_statuses` — Filter available order statuses
10
-
11
- **When it runs:** Applied when retrieving the list of available order statuses throughout the admin and storefront.
12
-
13
- **Parameters:**
14
-
15
- - `$statuses` (array): Associative array of order statuses (key => translated label)
16
-
17
- ```
18
- $statuses = [
19
- 'processing' => 'Processing',
20
- 'completed' => 'Completed',
21
- 'on-hold' => 'On Hold',
22
- 'canceled' => 'Canceled',
23
- 'failed' => 'Failed',
24
- ];
25
- ```
26
-
27
- - `$data` (array): Additional context data (empty array)
28
-
29
- **Returns:** `array` — The modified order statuses array
30
-
31
- **Source:** `app/Helpers/Status.php:164`
32
-
33
- **Usage:**
34
-
35
- ```
36
- add_filter('fluent_cart/order_statuses', function ($statuses, $data) {
37
- // Add a custom order status
38
- $statuses['awaiting_pickup'] = __('Awaiting Pickup', 'my-plugin');
39
- return $statuses;
40
- }, 10, 2);
41
- ```
42
-
43
- ### ` editable_order_statuses `
44
-
45
- `fluent_cart/editable_order_statuses` — Filter manually settable order statuses
46
-
47
- **When it runs:** Applied when building the list of order statuses an admin can manually set. Both `Status::getEditableOrderStatuses()` and `Helper::getEditableOrderStatuses()` apply it to the default status map and return the result.
48
-
49
- **Parameters:**
50
-
51
- - `$statuses` (array): Associative array of editable order statuses (key => translated label)
52
- - `$data` (array): Additional context data (empty array)
53
-
54
- **Returns:** `array` — The modified editable order statuses array
55
-
56
- **Source:** `app/Helpers/Status.php:183`
57
-
58
- **Usage:**
59
-
60
- ```
61
- add_filter('fluent_cart/editable_order_statuses', function ($statuses, $data) {
62
- unset($statuses['canceled']);
63
- return $statuses;
64
- }, 10, 2);
65
- ```
66
-
67
- ### ` payment_statuses `
68
-
69
- `fluent_cart/payment_statuses` — Filter payment statuses
70
-
71
- **When it runs:** Applied when retrieving the list of available payment statuses used across the order and transaction system.
72
-
73
- **Parameters:**
74
-
75
- - `$statuses` (array): Associative array of payment statuses (key => translated label)
76
-
77
- ```
78
- $statuses = [
79
- 'pending' => 'Pending',
80
- 'paid' => 'Paid',
81
- 'partially_paid' => 'Partially Paid',
82
- 'failed' => 'Failed',
83
- 'refunded' => 'Refunded',
84
- 'partially_refunded' => 'Partially Refunded',
85
- 'authorized' => 'Authorized',
86
- ];
87
- ```
88
-
89
- - `$data` (array): Additional context data (empty array)
90
-
91
- **Returns:** `array` — The modified payment statuses array
92
-
93
- **Source:** `app/Helpers/Status.php:190`
94
-
95
- **Usage:**
96
-
97
- ```
98
- add_filter('fluent_cart/payment_statuses', function ($statuses, $data) {
99
- $statuses['on_hold'] = __('On Hold', 'my-plugin');
100
- return $statuses;
101
- }, 10, 2);
102
- ```
103
-
104
- ### ` transaction_statuses `
105
-
106
- `fluent_cart/transaction_statuses` — Filter transaction statuses
107
-
108
- **When it runs:** Applied when retrieving available transaction statuses for the primary transaction system.
109
-
110
- **Parameters:**
111
-
112
- - `$statuses` (array): Associative array of transaction statuses (key => translated label)
113
-
114
- ```
115
- $statuses = [
116
- 'pending' => 'Pending',
117
- 'succeeded' => 'Succeeded',
118
- 'authorized' => 'Authorized',
119
- 'failed' => 'Failed',
120
- 'refunded' => 'Refunded',
121
- ];
122
- ```
123
-
124
- - `$data` (array): Additional context data (empty array)
125
-
126
- **Returns:** `array` — The modified transaction statuses array
127
-
128
- **Source:** `app/Helpers/Status.php:205`
129
-
130
- **Usage:**
131
-
132
- ```
133
- add_filter('fluent_cart/transaction_statuses', function ($statuses, $data) {
134
- $statuses['disputed'] = __('Disputed', 'my-plugin');
135
- return $statuses;
136
- }, 10, 2);
137
- ```
138
-
139
- ### ` editable_transaction_statuses `
140
-
141
- `fluent_cart/editable_transaction_statuses` — Filter manually editable transaction statuses
142
-
143
- **When it runs:** Applied when building the list of transaction statuses an admin can manually set on an order.
144
-
145
- **Parameters:**
146
-
147
- - `$statuses` (array): Associative array of editable transaction statuses (key => translated label)
148
- - `$data` (array): Additional context data (empty array)
149
-
150
- **Returns:** `array` — The modified editable transaction statuses array
151
-
152
- **Source:** `app/Helpers/Status.php:230`
153
-
154
- **Usage:**
155
-
156
- ```
157
- add_filter('fluent_cart/editable_transaction_statuses', function ($statuses, $data) {
158
- unset($statuses['refunded']);
159
- return $statuses;
160
- }, 10, 2);
161
- ```
162
-
163
- ### ` transaction_success_statuses `
164
-
165
- `fluent_cart/transaction_success_statuses` — Filter which statuses count as successful transactions
166
-
167
- **When it runs:** Applied when determining which transaction statuses should be considered "successful" for reporting and order completion logic.
168
-
169
- **Parameters:**
170
-
171
- - `$statuses` (array): Indexed array of status strings
172
-
173
- ```
174
- $statuses = ['succeeded', 'authorized'];
175
- ```
176
-
177
- - `$data` (array): Additional context data (empty array)
178
-
179
- **Returns:** `array` — The modified success statuses array
180
-
181
- **Source:** `app/Helpers/Status.php:351`
182
-
183
- **Usage:**
184
-
185
- ```
186
- add_filter('fluent_cart/transaction_success_statuses', function ($statuses, $data) {
187
- // Also count "captured" as a success status
188
- $statuses[] = 'captured';
189
- return $statuses;
190
- }, 10, 2);
191
- ```
192
-
193
- ### ` shipping_statuses `
194
-
195
- `fluent_cart/shipping_statuses` — Filter shipping statuses
196
-
197
- **When it runs:** Applied when retrieving the list of available shipping statuses used for order fulfillment.
198
-
199
- **Parameters:**
200
-
201
- - `$statuses` (array): Associative array of shipping statuses (key => translated label)
202
-
203
- ```
204
- $statuses = [
205
- 'unshipped' => 'Unshipped',
206
- 'shipped' => 'Shipped',
207
- 'delivered' => 'Delivered',
208
- 'unshippable' => 'Unshippable',
209
- ];
210
- ```
211
-
212
- - `$data` (array): Additional context data (empty array)
213
-
214
- **Returns:** `array` — The modified shipping statuses array
215
-
216
- **Source:** `app/Helpers/Status.php:242`
217
-
218
- **Usage:**
219
-
220
- ```
221
- add_filter('fluent_cart/shipping_statuses', function ($statuses, $data) {
222
- $statuses['in_transit'] = __('In Transit', 'my-plugin');
223
- return $statuses;
224
- }, 10, 2);
225
- ```
226
-
227
- ### ` editable_shipping_statuses `
228
-
229
- `fluent_cart/editable_shipping_statuses` — Filter manually settable shipping statuses
230
-
231
- **When it runs:** Applied when building the list of shipping statuses an admin can manually set on an order. This controls the dropdown options in the order edit screen.
232
-
233
- **Parameters:**
234
-
235
- - `$statuses` (array): Associative array of editable shipping statuses (key => translated label) — same default shape as `fluent_cart/shipping_statuses` above
236
- - `$data` (array): Additional context data (empty array)
237
-
238
- **Returns:** `array` — The modified editable shipping statuses array
239
-
240
- **Source:** `app/Helpers/Status.php:259`
241
-
242
- **Usage:**
243
-
244
- ```
245
- add_filter('fluent_cart/editable_shipping_statuses', function ($statuses, $data) {
246
- unset($statuses['unshippable']);
247
- return $statuses;
248
- }, 10, 2);
249
- ```
250
-
251
- ---
252
-
253
- ## Order Data & Lifecycle
254
-
255
- ### ` orders_list `
256
-
257
- `fluent_cart/orders_list` — Filter the admin orders list
258
-
259
- **When it runs:** Applied after retrieving the paginated orders collection for the admin orders list view.
260
-
261
- **Parameters:**
262
-
263
- - `$orders` (LengthAwarePaginator): Paginated collection of orders
264
-
265
- **Returns:** `LengthAwarePaginator` — The modified paginated orders collection
266
-
267
- **Source:** `app/Http/Controllers/OrderController.php:62`
268
-
269
- **Usage:**
270
-
271
- ```
272
- add_filter('fluent_cart/orders_list', function ($orders) {
273
- // Add custom data to each order in the list
274
- foreach ($orders as $order) {
275
- $order->custom_badge = get_post_meta($order->id, '_custom_badge', true);
276
- }
277
- return $orders;
278
- }, 10, 1);
279
- ```
280
-
281
- ### ` order/view `
282
-
283
- `fluent_cart/order/view` — Filter single order view data
284
-
285
- **When it runs:** Applied when preparing the data for a single order view in the admin panel.
286
-
287
- **Parameters:**
288
-
289
- - `$order` (array): The order data array containing all order details
290
- - `$data` (array): Additional context data (empty array)
291
-
292
- **Returns:** `array` — The modified order data
293
-
294
- **Source:** `app/Http/Controllers/OrderController.php:691`
295
-
296
- **Usage:**
297
-
298
- ```
299
- add_filter('fluent_cart/order/view', function ($order, $data) {
300
- // Add custom data to the order view
301
- $order['custom_field'] = 'Custom Value';
302
- return $order;
303
- }, 10, 2);
304
- ```
305
-
306
- ### ` widgets/single_order `
307
-
308
- `fluent_cart/widgets/single_order` — Filter single order admin widgets
309
-
310
- **When it runs:** Applied when loading the stats/widgets section on the single order admin view.
311
-
312
- **Parameters:**
313
-
314
- - `$widgets` (array): Array of widget data (default empty)
315
- - `$order` ([Order](/database/models/order.md)): The Order model instance
316
-
317
- **Returns:** `array` — Array of widget definitions to display
318
-
319
- **Source:** `app/Http/Controllers/OrderController.php:1085`
320
-
321
- **Usage:**
322
-
323
- ```
324
- add_filter('fluent_cart/widgets/single_order', function ($widgets, $order) {
325
- $widgets[] = [
326
- 'title' => __('Custom Widget', 'my-plugin'),
327
- 'value' => 'Some data for order #' . $order->id,
328
- ];
329
- return $widgets;
330
- }, 10, 2);
331
- ```
332
-
333
- ### ` order/is_subscription_allowed_in_manual_order `
334
-
335
- `fluent_cart/order/is_subscription_allowed_in_manual_order` — Allow subscriptions in manual orders
336
-
337
- **When it runs:** Applied when creating a manual order that contains subscription items. By default, subscriptions in manual orders are not supported.
338
-
339
- **Parameters:**
340
-
341
- - `$allowed` (bool): Whether subscriptions are allowed (default `false`)
342
- - `$context` (array): Context data
343
-
344
- ```
345
- $context = [
346
- 'order_items' => [...] // Array of order item data
347
- ];
348
- ```
349
-
350
- **Returns:** `bool` — Whether to allow subscription items in manual orders
351
-
352
- **Source:** `app/Http/Controllers/OrderController.php:95`
353
-
354
- **Usage:**
355
-
356
- ```
357
- add_filter('fluent_cart/order/is_subscription_allowed_in_manual_order', function ($allowed, $context) {
358
- // Enable subscriptions in manual orders
359
- return true;
360
- }, 10, 2);
361
- ```
362
-
363
- ### ` order/type `
364
-
365
- `fluent_cart/order/type` — Filter order type during manual creation
366
-
367
- **When it runs:** Applied when determining the order type during manual order creation. The type is automatically set to `'subscription'` if subscription items are detected, otherwise `'payment'`.
368
-
369
- **Parameters:**
370
-
371
- - `$type` (string): The order type (`'payment'` or `'subscription'`)
372
- - `$data` (array): Additional context data (empty array)
373
-
374
- **Returns:** `string` — The order type string
375
-
376
- **Source:** `app/Http/Controllers/OrderController.php:108`
377
-
378
- **Usage:**
379
-
380
- ```
381
- add_filter('fluent_cart/order/type', function ($type, $data) {
382
- return $type;
383
- }, 10, 2);
384
- ```
385
-
386
- ### ` order/expected_license_count `
387
-
388
- `fluent_cart/order/expected_license_count` — Filter expected license count for an order
389
-
390
- **When it runs:** Applied when checking how many licenses should exist for an order. Used to detect missing licenses that need to be regenerated.
391
-
392
- **Parameters:**
393
-
394
- - `$count` (int): Expected number of licenses (default `0`)
395
- - `$context` (array): Context data
396
-
397
- ```
398
- $context = [
399
- 'order_items' => [...] // Collection of order items
400
- ];
401
- ```
402
-
403
- **Returns:** `int` — The expected number of licenses
404
-
405
- **Source:** `app/Http/Controllers/OrderController.php:314,696`
406
-
407
- **Usage:**
408
-
409
- ```
410
- add_filter('fluent_cart/order/expected_license_count', function ($count, $context) {
411
- foreach ($context['order_items'] as $item) {
412
- if ($item->requires_license) {
413
- $count += $item->quantity;
414
- }
415
- }
416
- return $count;
417
- }, 10, 2);
418
- ```
419
-
420
- ### ` create_receipt_number_on_order_create `
421
-
422
- `fluent_cart/create_receipt_number_on_order_create` — Force receipt number generation on order creation
423
-
424
- **When it runs:** Applied during the order `creating` model event. By default, receipt numbers are only generated when the payment status is `'paid'`. Return `true` to always generate a receipt number.
425
-
426
- **Parameters:**
427
-
428
- - `$force` (bool): Whether to force receipt number creation (default `false`)
429
-
430
- **Returns:** `bool` — Whether to generate a receipt number regardless of payment status
431
-
432
- **Source:** `app/Models/Order.php:52`
433
-
434
- **Usage:**
435
-
436
- ```
437
- add_filter('fluent_cart/create_receipt_number_on_order_create', function ($force) {
438
- // Always create a receipt number when an order is created
439
- return true;
440
- }, 10, 1);
441
- ```
442
-
443
- ### ` single_order_downloads `
444
-
445
- `fluent_cart/single_order_downloads` — Filter order downloads data
446
-
447
- **When it runs:** Applied when preparing the downloadable files for a specific order, allowing you to add, remove, or modify download data.
448
-
449
- **Parameters:**
450
-
451
- - `$downloadData` (array): Array of download groups
452
-
453
- ```
454
- $downloadData = [
455
- [
456
- 'title' => 'Product Name - Variation Title',
457
- 'product_id' => 123,
458
- 'variation_id' => 456,
459
- 'additional_html' => '',
460
- 'downloads' => [
461
- ['id' => 1, 'name' => 'File Name', 'url' => '...']
462
- ]
463
- ]
464
- ];
465
- ```
466
-
467
- - `$context` (array): Context data
468
-
469
- ```
470
- $context = [
471
- 'order' => Order, // The Order model instance
472
- 'scope' => 'admin' // 'admin' or 'customer'
473
- ];
474
- ```
475
-
476
- **Returns:** `array` — The modified download data array
477
-
478
- **Source:** `app/Models/Order.php:1044`
479
-
480
- **Usage:**
481
-
482
- ```
483
- add_filter('fluent_cart/single_order_downloads', function ($downloadData, $context) {
484
- // Add a bonus download for completed orders
485
- if ($context['order']->status === 'completed') {
486
- $downloadData[] = [
487
- 'title' => 'Bonus Content',
488
- 'downloads' => [
489
- ['name' => 'Bonus File', 'url' => 'https://example.com/bonus.pdf']
490
- ]
491
- ];
492
- }
493
- return $downloadData;
494
- }, 10, 2);
495
- ```
496
-
497
- ### ` order_can_be_deleted `
498
-
499
- `fluent_cart/order_can_be_deleted` — Filter whether an order can be deleted
500
-
501
- **When it runs:** Applied when checking if an order is eligible for deletion. By default, orders with active subscriptions cannot be deleted.
502
-
503
- **Parameters:**
504
-
505
- - `$canBeDeleted` (true|WP_Error): `true` if deletable, or a `WP_Error` with the reason
506
- - `$context` (array): Context data
507
-
508
- ```
509
- $context = [
510
- 'order' => Order // The Order model instance
511
- ];
512
- ```
513
-
514
- **Returns:** `true|WP_Error` — `true` to allow deletion, or `WP_Error` to block it
515
-
516
- **Source:** `app/Models/Order.php:1250`
517
-
518
- **Usage:**
519
-
520
- ```
521
- add_filter('fluent_cart/order_can_be_deleted', function ($canBeDeleted, $context) {
522
- $order = $context['order'];
523
- // Prevent deletion of orders less than 30 days old
524
- if (strtotime($order->created_at) > strtotime('-30 days')) {
525
- return new \WP_Error('too_recent', __('Orders less than 30 days old cannot be deleted.', 'my-plugin'));
526
- }
527
- return $canBeDeleted;
528
- }, 10, 2);
529
- ```
530
-
531
- ### ` min_receipt_number `
532
-
533
- `fluent_cart/min_receipt_number` — Filter the minimum receipt number
534
-
535
- **When it runs:** Applied when calculating the next receipt number. If the computed next number is below this minimum, it will be bumped up.
536
-
537
- **Parameters:**
538
-
539
- - `$min` (int): The minimum receipt number from store settings (default `1`)
540
-
541
- **Returns:** `int` — The minimum receipt number to enforce
542
-
543
- **Source:** `app/Services/OrderService.php:590`
544
-
545
- **Usage:**
546
-
547
- ```
548
- add_filter('fluent_cart/min_receipt_number', function ($min) {
549
- // Start receipt numbers from 1000
550
- return 1000;
551
- }, 10, 1);
552
- ```
553
-
554
- ### ` invoice_prefix `
555
-
556
- `fluent_cart/invoice_prefix` — Filter the invoice number prefix
557
-
558
- **When it runs:** Applied when generating the invoice number string for new orders. The invoice number is formed as `prefix + receipt_number`.
559
-
560
- **Parameters:**
561
-
562
- - `$prefix` (string): The invoice prefix from store settings (default `'INV-'`)
563
-
564
- **Returns:** `string` — The modified invoice prefix
565
-
566
- **Source:** `app/Services/OrderService.php:602`
567
-
568
- **Usage:**
569
-
570
- ```
571
- add_filter('fluent_cart/invoice_prefix', function ($prefix) {
572
- // Use a year-based prefix
573
- return 'INV-' . date('Y') . '-';
574
- }, 10, 1);
575
- ```
576
-
577
- ### ` order_refund_manually `
578
-
579
- `fluent_cart/order_refund_manually` — Intercept manual refund processing
580
-
581
- **When it runs:** Applied during the refund process before the payment gateway refund method is called. Allows you to handle refunds through a custom mechanism instead of the gateway. Not applied when the admin records the refund locally only (`force_local`), because no money moves through FluentCart then.
582
-
583
- **Parameters:**
584
-
585
- - `$manualRefund` (array): Manual refund status
586
-
587
- ```
588
- $manualRefund = [
589
- 'status' => 'no', // 'yes' to skip gateway refund
590
- 'source' => '' // Identifier for the manual refund source
591
- ];
592
- ```
593
-
594
- - `$context` (array): Refund context data
595
-
596
- ```
597
- $context = [
598
- 'refund_amount' => 5000, // Amount in cents
599
- 'transaction' => Transaction, // OrderTransaction model
600
- 'order' => Order, // Order model
601
- 'args' => ['reason' => ''] // Additional refund arguments
602
- ];
603
- ```
604
-
605
- **Returns:** `array` — Array with `'status'` key set to `'yes'` to skip the gateway refund
606
-
607
- **Source:** `app/Services/Payments/Refund.php:65`
608
-
609
- **Usage:**
610
-
611
- ```
612
- add_filter('fluent_cart/order_refund_manually', function ($manualRefund, $context) {
613
- // Handle refund via a custom service
614
- $result = my_custom_refund($context['transaction'], $context['refund_amount']);
615
- if ($result) {
616
- return ['status' => 'yes', 'source' => 'my_custom_service'];
617
- }
618
- return $manualRefund;
619
- }, 10, 2);
620
- ```
621
-
622
- ### ` transaction/max_refundable_amount `
623
-
624
- `fluent_cart/transaction/max_refundable_amount` — Filter the maximum amount that can still be refunded on a transaction
625
-
626
- **When it runs:** Applied on the [`OrderTransaction`](/database/models/order-transaction.md) model when computing how much of a transaction is still refundable. The base amount is the transaction's total minus what has already been refunded. **Note:** the filtered value is clamped by the caller to `[0, $baseAmount]` — a value greater than the base amount you were passed is silently capped back down, so this filter can only shrink the refundable amount, never grow it beyond what's actually left on the transaction.
627
-
628
- **Parameters:**
629
-
630
- - `$baseAmount` (int): The unfiltered max refundable amount in cents (`total - refunded_total`)
631
- - `$transaction` ([OrderTransaction](/database/models/order-transaction.md)): The transaction instance (`$this`)
632
-
633
- **Returns:** `int` — The (possibly reduced) max refundable amount in cents; automatically clamped to `[0, $baseAmount]`
634
-
635
- **Source:** `app/Models/OrderTransaction.php:188`
636
-
637
- **Usage:**
638
-
639
- ```
640
- add_filter('fluent_cart/transaction/max_refundable_amount', function ($baseAmount, $transaction) {
641
- // Hold back a $1 processing fee from what support can refund
642
- return max(0, $baseAmount - 100);
643
- }, 10, 2);
644
- ```
645
-
646
- ### ` order_status/auto_complete_digital_order `
647
-
648
- `fluent_cart/order_status/auto_complete_digital_order` — Control auto-completion of digital orders
649
-
650
- **When it runs:** Applied during payment status reconciliation. When a digital (non-physical) order is paid, it is automatically marked as completed. Return `false` to prevent this behavior.
651
-
652
- **Parameters:**
653
-
654
- - `$autoComplete` (bool): Whether to auto-complete the order (default `true`)
655
- - `$context` (array): Context data
656
-
657
- ```
658
- $context = [
659
- 'order' => Order // The Order model instance
660
- ];
661
- ```
662
-
663
- **Returns:** `bool` — Whether to automatically complete the digital order
664
-
665
- **Source:** `app/Helpers/StatusHelper.php:281`
666
-
667
- **Usage:**
668
-
669
- ```
670
- add_filter('fluent_cart/order_status/auto_complete_digital_order', function ($autoComplete, $context) {
671
- // Require manual review for high-value digital orders
672
- if ($context['order']->total > 50000) { // > $500
673
- return false;
674
- }
675
- return $autoComplete;
676
- }, 10, 2);
677
- ```
678
-
679
- ### ` customer/order_data `
680
-
681
- `fluent_cart/customer/order_data` — Filter customer portal order data
682
-
683
- **When it runs:** Applied when preparing order data for display in the customer-facing order details page.
684
-
685
- **Parameters:**
686
-
687
- - `$formattedOrderData` (array): The formatted order data array
688
- - `$context` (array): Context data
689
-
690
- ```
691
- $context = [
692
- 'order' => Order, // The Order model instance
693
- 'customer' => Customer // The Customer model instance
694
- ];
695
- ```
696
-
697
- **Returns:** `array` — The modified formatted order data
698
-
699
- **Source:** `app/Http/Controllers/FrontendControllers/CustomerOrderController.php:337`
700
-
701
- **Usage:**
702
-
703
- ```
704
- add_filter('fluent_cart/customer/order_data', function ($formattedOrderData, $context) {
705
- // Add custom data visible to customers
706
- $formattedOrderData['estimated_delivery'] = get_post_meta(
707
- $context['order']->id, '_estimated_delivery', true
708
- );
709
- return $formattedOrderData;
710
- }, 10, 2);
711
- ```
712
-
713
- ### ` customer/order_details_section_parts `
714
-
715
- `fluent_cart/customer/order_details_section_parts` — Filter customer order detail sections
716
-
717
- **When it runs:** Applied when building the customer-facing order details page. Allows you to inject custom HTML content into predefined section slots.
718
-
719
- **Parameters:**
720
-
721
- - `$sections` (array): HTML content for each section slot
722
-
723
- ```
724
- $sections = [
725
- 'before_summary' => '',
726
- 'after_summary' => '',
727
- 'after_licenses' => '',
728
- 'after_subscriptions' => '',
729
- 'after_downloads' => '',
730
- 'after_transactions' => '',
731
- 'end_of_order' => '',
732
- ];
733
- ```
734
-
735
- - `$context` (array): Context data
736
-
737
- ```
738
- $context = [
739
- 'order' => Order, // The Order model instance
740
- 'formattedData' => [...] // The formatted order data array
741
- ];
742
- ```
743
-
744
- **Returns:** `array` — The modified sections array with HTML content
745
-
746
- **Source:** `app/Http/Controllers/FrontendControllers/CustomerOrderController.php:344`
747
-
748
- **Usage:**
749
-
750
- ```
751
- add_filter('fluent_cart/customer/order_details_section_parts', function ($sections, $context) {
752
- $sections['after_summary'] = '<div class="custom-notice">Thank you for your order!</div>';
753
- return $sections;
754
- }, 10, 2);
755
- ```
756
-
757
- ### ` order/custom_item_changed `
758
-
759
- `fluent_cart/order/custom_item_changed` — Filter a custom order item's data before it's saved from the order edit screen
760
-
761
- **When it runs:** Applied in `OrderItemResource` when an admin edits a **custom** (product + variation, non-catalog) line item on the order edit screen. The result is cast to an array and only a fixed set of keys (`id`, `quantity`, `unit_price`, `cost`, `subtotal`, `tax_amount`, `discount_total`, `line_total`, `shipping_charge`) is kept from it — anything else you add is dropped.
762
-
763
- **Parameters:**
764
-
765
- - `$oldItem` (array|object): The existing order item row before this edit (matched by `object_id` = variation ID)
766
- - `$item` (array): The incoming edited item payload from the request
767
-
768
- **Returns:** `array` — The item data to persist; only the keys listed above are used. Amounts (`unit_price`, `cost`, `subtotal`, `tax_amount`, `discount_total`, `line_total`, `shipping_charge`) are in cents.
769
-
770
- **Source:** `api/Resource/OrderItemResource.php:282`
771
-
772
- **Usage:**
773
-
774
- ```
775
- add_filter('fluent_cart/order/custom_item_changed', function ($oldItem, $item) {
776
- // Never let a custom item's unit price go negative
777
- $item['unit_price'] = max(0, (int) $item['unit_price']);
778
- return $item;
779
- }, 10, 2);
780
- ```
781
-
782
- ### ` order/delete_test_orders_batch_size `
783
-
784
- `fluent_cart/order/delete_test_orders_batch_size` — Filter the batch size for the "delete all test orders" bulk action
785
-
786
- **When it runs:** Applied at the start of `OrderController::handleDeleteTestOrdersBulkAction()`, before querying which test orders to delete in this batch. The admin UI calls this endpoint repeatedly (paging by `last_order_id`) until all test orders are gone; this filter controls how many are deleted per request.
787
-
788
- **Parameters:**
789
-
790
- - `$batchSize` (int): The batch size (default `50`); the filtered result is floored to a minimum of `1`
791
-
792
- **Returns:** `int` — The number of test orders to delete per request
793
-
794
- **Source:** `app/Http/Controllers/OrderController.php:955`
795
-
796
- **Usage:**
797
-
798
- ```
799
- add_filter('fluent_cart/order/delete_test_orders_batch_size', function ($batchSize) {
800
- // Smaller batches on a resource-constrained host
801
- return 20;
802
- }, 10, 1);
803
- ```
804
-
805
- ### ` order/should_restore_stock_on_delete `
806
-
807
- `fluent_cart/order/should_restore_stock_on_delete` — Filter whether deleting an order restores its reserved/sold stock
808
-
809
- **When it runs:** Applied in `OrderDeleting::shouldRestoreStockOnOrderDelete()` when an order is being permanently deleted. By default, stock is only restored automatically when the order being deleted is a **test-mode** order — deleting a live order does not touch stock unless you opt in here.
810
-
811
- **Parameters:**
812
-
813
- - `$shouldRestore` (bool): Whether to restore stock; default is `true` only when the order is in test mode
814
- - `$order` ([Order](/database/models/order.md)): The order being deleted (`$event->order`)
815
- - `$eventData` (array): The full `OrderDeletingEvent` payload as an array
816
-
817
- **Returns:** `bool` — Whether to restore stock for the items on this order as part of the delete
818
-
819
- **Source:** `app/Listeners/Order/OrderDeleting.php:89`
820
-
821
- **Usage:**
822
-
823
- ```
824
- add_filter('fluent_cart/order/should_restore_stock_on_delete', function ($shouldRestore, $order, $eventData) {
825
- // Also restore stock when deleting canceled live orders
826
- if ($order->status === 'canceled') {
827
- return true;
828
- }
829
- return $shouldRestore;
830
- }, 10, 3);
831
- ```
832
-
833
- ---
834
-
835
- ## Payment Processing
836
-
837
- ### ` ipn_url_{$slug} `
838
-
839
- `fluent_cart/ipn_url_{$slug}` — Filter IPN/webhook listener URL for a payment gateway
840
-
841
- **When it runs:** Applied by `PaymentHelper::listenerUrl()` when building the IPN/webhook listener URL for a payment gateway. `{$slug}` is the gateway slug (e.g. `stripe`, `paypal`).
842
-
843
- **Parameters:**
844
-
845
- - `$data` (array): Array containing the listener URL
846
-
847
- ```
848
- $data = [
849
- 'listener_url' => 'https://yoursite.com/?fct_payment_listener=1&method=stripe'
850
- ];
851
- ```
852
-
853
- **Returns:** `array` — The modified URL data array
854
-
855
- **Source:** `app/Services/Payments/PaymentHelper.php:27`
856
-
857
- **Usage:**
858
-
859
- ```
860
- add_filter('fluent_cart/ipn_url_stripe', function ($data) {
861
- $data['listener_url'] = home_url('/custom-stripe-webhook/');
862
- return $data;
863
- }, 10, 1);
864
- ```
865
-
866
- ### ` payment/validate_custom_item `
867
-
868
- `fluent_cart/payment/validate_custom_item` — Filter/validate the product and variation resolved for a custom order item during payment
869
-
870
- **When it runs:** Applied in `ProductItemService` while resolving a **custom** (externally-priced) order item's product and variation objects during payment processing. Returning anything other than an object for either the product or the variation causes the item to be rejected — the caller treats it as invalid and stops processing it.
871
-
872
- **Parameters:**
873
-
874
- - `$productVariationPair` (array): Two-element array `[$product, $variation]` — `$variation` starts as a synthetic object built from the order item, with `id` set to the item's `object_id`
875
- - `$data` (array): The raw custom item data being validated
876
-
877
- **Returns:** `array` — `[$product, $variation]`; both elements must be objects or the item is treated as invalid
878
-
879
- **Source:** `app/Services/ProductItemService.php:53`
880
-
881
- **Usage:**
882
-
883
- ```
884
- add_filter('fluent_cart/payment/validate_custom_item', function ($pair, $data) {
885
- [$product, $variation] = $pair;
886
- // Reject custom items over $10,000 (stored in cents)
887
- if ($variation && $variation->item_price > 1000000) {
888
- return [null, null];
889
- }
890
- return [$product, $variation];
891
- }, 10, 2);
892
- ```
893
-
894
- ### ` payment/success_url `
895
-
896
- `fluent_cart/payment/success_url` — Filter the payment success redirect URL
897
-
898
- **When it runs:** Applied when generating the URL the customer is redirected to after a successful payment, just before the redirect is issued.
899
-
900
- **Parameters:**
901
-
902
- - `$url` (string): The success redirect URL (receipt page with query args already appended)
903
- - `$context` (array): Context data
904
-
905
- ```
906
- $context = [
907
- 'transaction_hash' => 'abc123...', // Transaction UUID
908
- 'args' => [], // Additional arguments
909
- 'payment_method' => 'stripe', // Gateway slug
910
- 'transaction' => $transaction, // \FluentCart\App\Models\OrderTransaction|null
911
- 'order' => $order, // \FluentCart\App\Models\Order|null
912
- ];
913
- ```
914
-
915
- **Returns:** `string` — The modified success URL
916
-
917
- **Source:** `app/Services/Payments/PaymentHelper.php:69`
918
-
919
- **Usage:**
920
-
921
- ```
922
- add_filter('fluent_cart/payment/success_url', function ($url, $context) {
923
- // Redirect to a custom thank-you page
924
- return add_query_arg('trx_hash', $context['transaction_hash'], home_url('/thank-you/'));
925
- }, 10, 2);
926
- ```
927
-
928
- ### ` default_payment_method_for_zero_payment `
929
-
930
- `fluent_cart/default_payment_method_for_zero_payment` — Filter the default payment method for zero-total orders
931
-
932
- **When it runs:** Applied during checkout validation when the order total (including recurring) is zero. Determines which payment method handles the $0 transaction.
933
-
934
- **Parameters:**
935
-
936
- - `$method` (string): Payment method slug (default `'offline_payment'`)
937
- - `$data` (array): Additional context data (empty array)
938
-
939
- **Returns:** `string` — The payment method slug to use for zero-total orders
940
-
941
- **Source:** `app/Services/Payments/PaymentHelper.php:90`
942
-
943
- **Usage:**
944
-
945
- ```
946
- add_filter('fluent_cart/default_payment_method_for_zero_payment', function ($method, $data) {
947
- // Use Stripe for free trials that have recurring charges
948
- return 'stripe';
949
- }, 10, 2);
950
- ```
951
-
952
- ### ` get_payment_connect_info_{$method} `
953
-
954
- `fluent_cart/get_payment_connect_info_{$method}` — Filter payment method connection info
955
-
956
- **When it runs:** Applied when retrieving connection/setup information for a specific payment method. The `{$method}` is the sanitized gateway slug. Used by gateways that require an OAuth connection flow.
957
-
958
- **Parameters:**
959
-
960
- - `$info` (array): Connection info array (default empty)
961
- - `$data` (array): Additional context data (empty array)
962
-
963
- **Returns:** `array` — The payment method connection information
964
-
965
- **Source:** `api/PaymentMethods.php:105`
966
-
967
- **Usage:**
968
-
969
- ```
970
- add_filter('fluent_cart/get_payment_connect_info_stripe', function ($info, $data) {
971
- $info['connected'] = true;
972
- $info['account_id'] = 'acct_xxx';
973
- return $info;
974
- }, 10, 2);
975
- ```
976
-
977
- ### ` transaction/url_{$payment_method} `
978
-
979
- `fluent_cart/transaction/url_{$payment_method}` — Filter the vendor dashboard URL for a transaction
980
-
981
- **When it runs:** Applied when generating the URL attribute of an [`OrderTransaction`](/database/models/order-transaction.md) model. The `{$payment_method}` is the gateway slug. This URL typically links to the transaction in the payment provider's dashboard.
982
-
983
- **Parameters:**
984
-
985
- - `$url` (string): The vendor URL (default empty string)
986
- - `$context` (array): Context data
987
-
988
- ```
989
- $context = [
990
- 'transaction' => OrderTransaction, // The transaction model
991
- 'payment_mode' => 'live', // 'live' or 'test'
992
- 'vendor_charge_id' => 'ch_xxx', // External charge ID
993
- 'transaction_type' => 'charge' // Transaction type
994
- ];
995
- ```
996
-
997
- **Returns:** `string` — The URL to the transaction in the payment provider's dashboard
998
-
999
- **Source:** `app/Models/OrderTransaction.php:129`
1000
-
1001
- **Usage:**
1002
-
1003
- ```
1004
- add_filter('fluent_cart/transaction/url_stripe', function ($url, $context) {
1005
- $chargeId = $context['vendor_charge_id'];
1006
- $mode = $context['payment_mode'] === 'test' ? 'test/' : '';
1007
- return "https://dashboard.stripe.com/{$mode}payments/{$chargeId}";
1008
- }, 10, 2);
1009
- ```
1010
-
1011
- ### ` fluent_cart/transaction/receipt_page_url `
1012
-
1013
- `fluent_cart/transaction/receipt_page_url` — Filter the transaction receipt page URL
1014
-
1015
- **When it runs:** Applied when generating the public-facing receipt page URL for a transaction, typically used in email notifications and customer-facing links.
1016
-
1017
- **Parameters:**
1018
-
1019
- - `$url` (string): The receipt page URL with `trx_hash` query parameter
1020
- - `$context` (array): Context data
1021
-
1022
- ```
1023
- $context = [
1024
- 'transaction' => OrderTransaction, // The transaction model
1025
- 'order' => Order // The parent order model
1026
- ];
1027
- ```
1028
-
1029
- **Returns:** `string` — The modified receipt page URL
1030
-
1031
- **Source:** `app/Models/OrderTransaction.php:219`
1032
-
1033
- **Usage:**
1034
-
1035
- ```
1036
- add_filter('fluent_cart/transaction/receipt_page_url', function ($url, $context) {
1037
- // Use a custom receipt page
1038
- return add_query_arg('trx_hash', $context['transaction']->uuid, home_url('/my-receipt/'));
1039
- }, 10, 2);
1040
- ```
1041
-
1042
- ### ` pdf/can_generate_receipt `
1043
-
1044
- `fluent_cart/pdf/can_generate_receipt` — Filter whether PDF receipt generation is available
1045
-
1046
- **When it runs:** Applied in `OrderService::canGenerateReceiptPdf()`, a capability check used by the UI (e.g. a "Download PDF" button) and by callers before attempting `fluent_cart/pdf/generate_receipt`. The default is `true` only when FluentCart Pro is active **and** the FluentPDF plugin is loaded.
1047
-
1048
- **Parameters:**
1049
-
1050
- - `$canGenerate` (bool): Whether PDF receipt generation is available, before filtering
1051
-
1052
- **Returns:** `bool` — Whether to advertise/allow PDF receipt generation
1053
-
1054
- **Source:** `app/Services/OrderService.php:688`
1055
-
1056
- **Usage:**
1057
-
1058
- ```
1059
- add_filter('fluent_cart/pdf/can_generate_receipt', function ($canGenerate) {
1060
- // Enable PDF receipts via a custom generator, without FluentPDF
1061
- return true;
1062
- }, 10, 1);
1063
- ```
1064
-
1065
- ### ` pdf/generate_receipt `
1066
-
1067
- `fluent_cart/pdf/generate_receipt` — Generate (or return the path to) a PDF receipt for an order
1068
-
1069
- **When it runs:** Applied wherever FluentCart needs an actual PDF file for an order's receipt: when a customer downloads their receipt as a PDF (`ReceiptHandler`), and when an email notification attaches the receipt PDF (`EmailNotificationMailer`). Core passes `null` and relies entirely on a listener (normally FluentCart Pro + FluentPDF) to generate the file and return its local path; see `fluent_cart/pdf/can_generate_receipt` to check availability first.
1070
-
1071
- **Parameters:**
1072
-
1073
- - `$pdfPath` (string|null): The generated PDF's local file path; `null` until a listener supplies one
1074
- - `$context` (array): Context data
1075
-
1076
- ```
1077
- $context = [
1078
- 'order' => $order, // \FluentCart\App\Models\Order
1079
- 'template_id' => 'order_receipt', // string — the PDF template to use (varies by call site)
1080
- ];
1081
- ```
1082
-
1083
- **Returns:** `string|null` — The absolute local path to the generated PDF, or `null` if generation isn't available
1084
-
1085
- **Source:**
1086
-
1087
- - `app/Hooks/Handlers/ShortCodes/ReceiptHandler.php:98` (customer-facing PDF download)
1088
- - `app/Services/Email/EmailNotificationMailer.php:435` (email attachment)
1089
-
1090
- **Usage:**
1091
-
1092
- ```
1093
- add_filter('fluent_cart/pdf/generate_receipt', function ($pdfPath, $context) {
1094
- $order = $context['order'];
1095
- return my_plugin_generate_receipt_pdf($order, $context['template_id']);
1096
- }, 10, 2);
1097
- ```
1098
-
1099
- ---
1100
-
1101
- ## Stripe
1102
-
1103
- ### ` stripe_settings `
1104
-
1105
- `fluent_cart/stripe_settings` — Filter Stripe gateway settings
1106
-
1107
- **When it runs:** Applied when loading Stripe gateway settings during initialization.
1108
-
1109
- **Parameters:**
1110
-
1111
- - `$settings` (array): The Stripe settings array including keys, modes, and configuration options
1112
-
1113
- **Returns:** `array` — The modified Stripe settings
1114
-
1115
- **Source:** `app/Modules/PaymentMethods/StripeGateway/StripeSettingsBase.php:38`
1116
-
1117
- **Usage:**
1118
-
1119
- ```
1120
- add_filter('fluent_cart/stripe_settings', function ($settings) {
1121
- // Force test mode in staging environments
1122
- if (wp_get_environment_type() === 'staging') {
1123
- $settings['payment_mode'] = 'test';
1124
- }
1125
- return $settings;
1126
- }, 10, 1);
1127
- ```
1128
-
1129
- ### ` payments/stripe_metadata_subscription `
1130
-
1131
- `fluent_cart/payments/stripe_metadata_subscription` — Filter Stripe subscription metadata
1132
-
1133
- **When it runs:** Applied when creating a Stripe subscription, allowing you to add or modify metadata sent to Stripe's subscription object.
1134
-
1135
- **Parameters:**
1136
-
1137
- - `$metadata` (array): The metadata array for the Stripe subscription
1138
-
1139
- ```
1140
- $metadata = [
1141
- 'fct_ref_id' => 'order-uuid',
1142
- 'email' => '[email&#160;protected]',
1143
- 'name' => 'Customer Name',
1144
- 'subscription_item' => 'Product Name',
1145
- 'order_reference' => 'fct_order_id_123',
1146
- ];
1147
- ```
1148
-
1149
- - `$context` (array): Context data
1150
-
1151
- ```
1152
- $context = [
1153
- 'order' => Order, // Order model
1154
- 'transaction' => Transaction, // OrderTransaction model
1155
- 'subscription' => Subscription // Subscription model
1156
- ];
1157
- ```
1158
-
1159
- **Returns:** `array` — The modified metadata array (max 50 keys per Stripe limits)
1160
-
1161
- **Source:** `app/Modules/PaymentMethods/StripeGateway/Processor.php:129`
1162
-
1163
- **Usage:**
1164
-
1165
- ```
1166
- add_filter('fluent_cart/payments/stripe_metadata_subscription', function ($metadata, $context) {
1167
- $metadata['affiliate_id'] = get_user_meta($context['order']->customer->user_id, 'affiliate_id', true);
1168
- return $metadata;
1169
- }, 10, 2);
1170
- ```
1171
-
1172
- ### ` payments/stripe_metadata_onetime `
1173
-
1174
- `fluent_cart/payments/stripe_metadata_onetime` — Filter Stripe one-time payment metadata
1175
-
1176
- **When it runs:** Applied when creating a Stripe payment intent for a one-time (non-subscription) payment.
1177
-
1178
- **Parameters:**
1179
-
1180
- - `$metadata` (array): The metadata array for the Stripe payment intent
1181
-
1182
- ```
1183
- $metadata = [
1184
- 'fct_ref_id' => 'order-uuid',
1185
- 'Name' => 'Customer Name',
1186
- 'Email' => '[email&#160;protected]',
1187
- 'order_reference' => 'fct_order_id_123',
1188
- ];
1189
- ```
1190
-
1191
- - `$context` (array): Context data
1192
-
1193
- ```
1194
- $context = [
1195
- 'order' => Order, // Order model
1196
- 'transaction' => Transaction // OrderTransaction model
1197
- ];
1198
- ```
1199
-
1200
- **Returns:** `array` — The modified metadata array (max 50 keys per Stripe limits)
1201
-
1202
- **Source:** `app/Modules/PaymentMethods/StripeGateway/Processor.php:221`
1203
-
1204
- **Usage:**
1205
-
1206
- ```
1207
- add_filter('fluent_cart/payments/stripe_metadata_onetime', function ($metadata, $context) {
1208
- $metadata['campaign'] = 'spring_sale_2025';
1209
- if (isset($context['order'])) {
1210
- $metadata['customer_id'] = $context['order']->customer_id;
1211
- }
1212
- return $metadata;
1213
- }, 10, 2);
1214
- ```
1215
-
1216
- ### ` payments/stripe_onetime_intent_args `
1217
-
1218
- `fluent_cart/payments/stripe_onetime_intent_args` — Filter Stripe payment intent arguments
1219
-
1220
- **When it runs:** Applied after building the full payment intent data array, just before creating the intent via the Stripe API. This is the last chance to modify intent parameters.
1221
-
1222
- **Parameters:**
1223
-
1224
- - `$intentData` (array): The payment intent arguments
1225
-
1226
- ```
1227
- $intentData = [
1228
- 'amount' => 5000, // In smallest currency unit
1229
- 'currency' => 'usd',
1230
- 'automatic_payment_methods' => ['enabled' => 'true'],
1231
- 'metadata' => [...],
1232
- 'customer' => 'cus_xxx',
1233
- ];
1234
- ```
1235
-
1236
- - `$context` (array): Context data
1237
-
1238
- ```
1239
- $context = [
1240
- 'order' => Order, // Order model
1241
- 'transaction' => Transaction // OrderTransaction model
1242
- ];
1243
- ```
1244
-
1245
- **Returns:** `array` — The modified payment intent arguments
1246
-
1247
- **Source:** `app/Modules/PaymentMethods/StripeGateway/Processor.php:664`
1248
-
1249
- **Usage:**
1250
-
1251
- ```
1252
- add_filter('fluent_cart/payments/stripe_onetime_intent_args', function ($intentData, $context) {
1253
- // Add a statement descriptor
1254
- $intentData['statement_descriptor_suffix'] = 'Order ' . $context['order']->id;
1255
- return $intentData;
1256
- }, 10, 2);
1257
- ```
1258
-
1259
- ### ` payments/stripe_checkout_session_args `
1260
-
1261
- `fluent_cart/payments/stripe_checkout_session_args` — Filter Stripe Checkout session arguments (one-time)
1262
-
1263
- **When it runs:** Applied when creating a Stripe Checkout session for one-time (non-subscription) hosted payments.
1264
-
1265
- **Parameters:**
1266
-
1267
- - `$sessionData` (array): The Checkout session arguments
1268
-
1269
- ```
1270
- $sessionData = [
1271
- 'customer' => 'cus_xxx',
1272
- 'client_reference_id' => 'order-uuid',
1273
- 'line_items' => [...],
1274
- 'mode' => 'payment',
1275
- 'success_url' => '...',
1276
- 'cancel_url' => '...',
1277
- 'metadata' => [...],
1278
- ];
1279
- ```
1280
-
1281
- - `$context` (array): Context data
1282
-
1283
- ```
1284
- $context = [
1285
- 'order' => Order, // Order model
1286
- 'transaction' => Transaction // OrderTransaction model
1287
- ];
1288
- ```
1289
-
1290
- **Returns:** `array` — The modified Checkout session arguments
1291
-
1292
- **Source:** `app/Modules/PaymentMethods/StripeGateway/Processor.php:356`
1293
-
1294
- **Usage:**
1295
-
1296
- ```
1297
- add_filter('fluent_cart/payments/stripe_checkout_session_args', function ($sessionData, $context) {
1298
- // Enable promotion codes on the Checkout page
1299
- $sessionData['allow_promotion_codes'] = true;
1300
- return $sessionData;
1301
- }, 10, 2);
1302
- ```
1303
-
1304
- ### ` payments/stripe_subscription_checkout_session_args `
1305
-
1306
- `fluent_cart/payments/stripe_subscription_checkout_session_args` — Filter Stripe Checkout session arguments (subscription)
1307
-
1308
- **When it runs:** Applied when creating a Stripe Checkout session for subscription-based hosted payments.
1309
-
1310
- **Parameters:**
1311
-
1312
- - `$sessionData` (array): The Checkout session arguments
1313
-
1314
- ```
1315
- $sessionData = [
1316
- 'customer' => 'cus_xxx',
1317
- 'client_reference_id' => 'order-uuid',
1318
- 'line_items' => [...],
1319
- 'mode' => 'subscription',
1320
- 'success_url' => '...',
1321
- 'cancel_url' => '...',
1322
- 'subscription_data' => ['metadata' => [...]],
1323
- 'metadata' => [...],
1324
- ];
1325
- ```
1326
-
1327
- - `$context` (array): Context data
1328
-
1329
- ```
1330
- $context = [
1331
- 'order' => Order, // Order model
1332
- 'transaction' => Transaction, // OrderTransaction model
1333
- 'subscription' => Subscription // Subscription model
1334
- ];
1335
- ```
1336
-
1337
- **Returns:** `array` — The modified Checkout session arguments
1338
-
1339
- **Source:** `app/Modules/PaymentMethods/StripeGateway/Processor.php:976`
1340
-
1341
- **Usage:**
1342
-
1343
- ```
1344
- add_filter('fluent_cart/payments/stripe_subscription_checkout_session_args', function ($sessionData, $context) {
1345
- // Add tax ID collection
1346
- $sessionData['tax_id_collection'] = ['enabled' => true];
1347
- return $sessionData;
1348
- }, 10, 2);
1349
- ```
1350
-
1351
- ### ` stripe/client_setup_future_usage `
1352
-
1353
- `fluent_cart/stripe/client_setup_future_usage` — Filter the client-side `setup_future_usage` value for a Stripe PaymentIntent
1354
-
1355
- **When it runs:** Applied when building the **client-side** PaymentIntent update data for Stripe Elements. **Important:** whatever value this filter resolves to must also be matched on the server-side PaymentIntent built by `fluent_cart/payments/stripe_onetime_intent_args` at place-order time — a mismatch causes Stripe to reject the confirmation. A falsy return removes `setup_future_usage` from the intent entirely.
1356
-
1357
- **Parameters:**
1358
-
1359
- - `$setupFutureUsage` (string|null): The current `setup_future_usage` value (e.g. `'off_session'`, `'on_session'`), read from the intent data
1360
- - `$context` (array): Context data
1361
-
1362
- ```
1363
- $context = [
1364
- 'data' => $data, // array — the raw request data for the intent
1365
- 'has_subscription' => $hasSubscription, // bool — whether the cart contains a subscription item
1366
- ];
1367
- ```
1368
-
1369
- **Returns:** `string|null` — The `setup_future_usage` value to use, or a falsy value to omit it
1370
-
1371
- **Source:** `app/Modules/PaymentMethods/StripeGateway/Stripe.php:851`
1372
-
1373
- **Usage:**
1374
-
1375
- ```
1376
- add_filter('fluent_cart/stripe/client_setup_future_usage', function ($setupFutureUsage, $context) {
1377
- // Always save the card on file when the cart has a subscription
1378
- return $context['has_subscription'] ? 'off_session' : $setupFutureUsage;
1379
- }, 10, 2);
1380
- ```
1381
-
1382
- ### ` stripe_idempotency_key `
1383
-
1384
- `fluent_cart/stripe_idempotency_key` — Filter the Stripe idempotency key
1385
-
1386
- **When it runs:** Applied to the generated idempotency key on Stripe charge requests. The result is sent as the `Idempotency-Key` request header.
1387
-
1388
- **Parameters:**
1389
-
1390
- - `$idempotency_key` (string): The generated idempotency key
1391
- - `$context` (array): Context data
1392
-
1393
- ```
1394
- $context = [
1395
- 'request' => $request, // array — the Stripe API request body
1396
- ];
1397
- ```
1398
-
1399
- **Returns:** `string` — The idempotency key to send in the `Idempotency-Key` header
1400
-
1401
- **Source:** `app/Modules/PaymentMethods/StripeGateway/API/ApiRequest.php:116`
1402
-
1403
- **Usage:**
1404
-
1405
- ```
1406
- add_filter('fluent_cart/stripe_idempotency_key', function ($key, $context) {
1407
- return 'fct_' . md5($key . time());
1408
- }, 10, 2);
1409
- ```
1410
-
1411
- ### ` stripe_request_body `
1412
-
1413
- `fluent_cart/stripe_request_body` — Filter the Stripe API request body
1414
-
1415
- **When it runs:** Applied to the request body immediately before every request sent to the Stripe API.
1416
-
1417
- **Parameters:**
1418
-
1419
- - `$body` (array): The request body data
1420
- - `$context` (array): Context data
1421
-
1422
- ```
1423
- $context = [
1424
- 'api' => $api, // string — the Stripe API endpoint being called
1425
- ];
1426
- ```
1427
-
1428
- **Returns:** `array` — The modified request body
1429
-
1430
- **Source:** `app/Modules/PaymentMethods/StripeGateway/API/ApiRequest.php:127`
1431
-
1432
- **Usage:**
1433
-
1434
- ```
1435
- add_filter('fluent_cart/stripe_request_body', function ($body, $context) {
1436
- error_log('Stripe API call to: ' . $context['api']);
1437
- return $body;
1438
- }, 10, 2);
1439
- ```
1440
-
1441
- ### ` stripe_request_headers `
1442
-
1443
- `fluent_cart_stripe_request_headers` — Filter the HTTP headers sent with every Stripe API request
1444
-
1445
- **When it runs:** Applied each time a request is sent to the Stripe API — the header-level sibling of `fluent_cart/stripe_request_body`. Unlike most Stripe filters in this file, this one was never migrated to the `fluent_cart/` namespace and has no deprecated wrapper — it is the live, current hook name.
1446
-
1447
- **Parameters:**
1448
-
1449
- - `$headers` (array): The request headers
1450
-
1451
- ```
1452
- $headers = [
1453
- 'Authorization' => 'Basic ' . base64_encode($secretKey . ':'),
1454
- 'Stripe-Version' => '2020-08-27', // Stripe API version pinned by FluentCart
1455
- 'User-Agent' => 'FluentCart/1.x (https://fluentcart.com)',
1456
- 'X-Stripe-Client-User-Agent' => '{"name":"FluentCart",...}', // JSON-encoded user agent info
1457
- ];
1458
- ```
1459
-
1460
- - `$data` (array): Additional context data (empty array)
1461
-
1462
- **Returns:** `array` — The modified request headers
1463
-
1464
- **Source:** `app/Modules/PaymentMethods/StripeGateway/API/ApiRequest.php:88`
1465
-
1466
- **Usage:**
1467
-
1468
- ```
1469
- add_filter('fluent_cart_stripe_request_headers', function ($headers, $data) {
1470
- // Route Stripe calls through a corporate outbound proxy that needs a custom header
1471
- $headers['X-Forwarded-Via'] = 'my-proxy';
1472
- return $headers;
1473
- }, 10, 2);
1474
- ```
1475
-
1476
- ### ` form_disable_stripe_connect `
1477
-
1478
- `fluent_cart/form_disable_stripe_connect` — Disable Stripe Connect provider option
1479
-
1480
- **When it runs:** Applied when rendering the Stripe settings form. Return `true` to force manual API keys instead of Stripe Connect.
1481
-
1482
- **Parameters:**
1483
-
1484
- - `$disable` (bool): Whether to disable Stripe Connect (default `false`)
1485
- - `$data` (array): Additional context data (empty array)
1486
-
1487
- **Returns:** `bool` — `true` to disable Stripe Connect and force API keys mode
1488
-
1489
- **Source:** `app/Modules/PaymentMethods/StripeGateway/Stripe.php:584`
1490
-
1491
- **Usage:**
1492
-
1493
- ```
1494
- add_filter('fluent_cart/form_disable_stripe_connect', function ($disable, $data) {
1495
- return true;
1496
- }, 10, 2);
1497
- ```
1498
-
1499
- ### ` stripe_appearance `
1500
-
1501
- `fluent_cart/stripe_appearance` — Style the embedded Stripe Payment Element
1502
-
1503
- **When it runs:** Applied when the embedded checkout builds the Stripe Elements options, before the Payment Element is mounted. The element renders inside a Stripe-hosted iframe, so the store's stylesheet never reaches it — this filter is the only styling channel. The returned array is passed verbatim as the `appearance` option of `stripe.elements()`.
1504
-
1505
- **Parameters:**
1506
-
1507
- - `$appearance` (array): Full [Stripe Appearance API](https://docs.stripe.com/elements/appearance-api) object (defaults to `['theme' => 'stripe']`). Supported keys: `theme` — `stripe` (default), `night`, or `flat`
1508
- - `labels` — `above` (default) or `floating`
1509
- - `variables` — design tokens such as `colorPrimary`, `colorBackground`, `colorText`, `colorDanger`, `fontFamily`, `fontSizeBase`, `spacingUnit`, `borderRadius` (see [variables](https://docs.stripe.com/elements/appearance-api#variables)). Colour variables must be hex or `rgb()`; `rgba()` and `var()` are rejected by Stripe.
1510
- - `rules` — per-component CSS-like overrides keyed by Stripe selectors such as `.Tab`, `.Tab--selected`, `.Input`, `.Input:focus`, `.Label` (see [rules](https://docs.stripe.com/elements/appearance-api#rules))
1511
- - `disableAnimations` — `true` to turn off transitions
1512
-
1513
- **Returns:** `array` — The appearance object handed to Stripe.js
1514
-
1515
- **Source:** `app/Modules/PaymentMethods/StripeGateway/Stripe.php` (`Stripe::getElementsAppearance()`)
1516
-
1517
- **Usage:**
1518
-
1519
- ```
1520
- // Dark checkout: match the Payment Element to a dark storefront.
1521
- add_filter('fluent_cart/stripe_appearance', function ($appearance) {
1522
- return [
1523
- 'theme' => 'night',
1524
- 'labels' => 'floating',
1525
- 'variables' => [
1526
- 'colorPrimary' => '#f5c542',
1527
- 'colorBackground' => '#1b1b1f',
1528
- 'colorText' => '#f4f4f5',
1529
- 'colorDanger' => '#ff6b6b',
1530
- 'fontFamily' => 'Inter, system-ui, sans-serif',
1531
- 'borderRadius' => '10px',
1532
- ],
1533
- 'rules' => [
1534
- '.Tab--selected' => ['borderColor' => '#f5c542'],
1535
- '.Input:focus' => ['boxShadow' => '0 0 0 2px #f5c542'],
1536
- ],
1537
- ];
1538
- });
1539
- ```
1540
-
1541
- A `fontFamily` that is not one of Stripe's built-in fonts only takes effect when the font is also loaded into the iframe via [`fluent_cart/stripe_elements_fonts`](#stripe_elements_fonts).
1542
-
1543
- ### ` stripe_elements_fonts `
1544
-
1545
- `fluent_cart/stripe_elements_fonts` — Load custom fonts into the Stripe Payment Element
1546
-
1547
- **When it runs:** Applied alongside `fluent_cart/stripe_appearance` when the embedded checkout builds the Stripe Elements options. Because the Payment Element lives in a Stripe iframe, fonts loaded on the parent page are invisible to it. Whatever this filter returns is passed as the [`fonts` option](https://docs.stripe.com/js/elements_object/create#stripe_elements-options-fonts) of `stripe.elements()` — a sibling of `appearance`, not part of it — and Stripe loads those sources inside the iframe.
1548
-
1549
- **Parameters:**
1550
-
1551
- - `$fonts` (array): List of font sources (defaults to `[]`, so Stripe's own font stack applies). Each entry is one of:[CssFontSource](https://docs.stripe.com/js/appendix/css_font_source_object) — `['cssSrc' => 'https://…']`, a stylesheet URL containing `@font-face` rules. Must be `https`.
1552
- - [CustomFontSource](https://docs.stripe.com/js/appendix/custom_font_source_object) — `family` and `src` (a CSS `src` value such as `url(https://…/font.woff2)`), plus optional `display`, `style`, `unicodeRange`, `weight`. `weight` is a string (`'400'`), not an integer.
1553
-
1554
- Entries that are not arrays are dropped before the response is sent.
1555
-
1556
- **Returns:** `array` — The font sources handed to Stripe.js
1557
-
1558
- **Source:** `app/Modules/PaymentMethods/StripeGateway/Stripe.php` (`Stripe::getElementsFonts()`)
1559
-
1560
- **Usage:**
1561
-
1562
- ```
1563
- // 1. Load the font inside the Stripe iframe.
1564
- add_filter('fluent_cart/stripe_elements_fonts', function ($fonts) {
1565
- // Google Fonts stylesheet (CssFontSource)
1566
- $fonts[] = ['cssSrc' => 'https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap'];
1567
-
1568
- // Self-hosted font file (CustomFontSource)
1569
- $fonts[] = [
1570
- 'family' => 'Brand Sans',
1571
- 'src' => 'url(https://example.com/wp-content/themes/brand/fonts/brand-sans.woff2)',
1572
- 'weight' => '400',
1573
- 'display' => 'swap',
1574
- ];
1575
-
1576
- return $fonts;
1577
- });
1578
-
1579
- // 2. Tell the Payment Element to use it. Pass the full Appearance API object —
1580
- // the filter replaces the default, it does not merge into it.
1581
- add_filter('fluent_cart/stripe_appearance', function ($appearance) {
1582
- return [
1583
- 'theme' => 'night',
1584
- 'labels' => 'floating',
1585
- 'variables' => [
1586
- 'colorPrimary' => '#f5c542',
1587
- 'colorBackground' => '#1b1b1f',
1588
- 'colorText' => '#f4f4f5',
1589
- 'colorDanger' => '#ff6b6b',
1590
- 'fontFamily' => 'Inter, "Brand Sans", system-ui, sans-serif',
1591
- 'borderRadius' => '10px',
1592
- ],
1593
- 'rules' => [
1594
- '.Tab--selected' => ['borderColor' => '#f5c542'],
1595
- '.Input:focus' => ['boxShadow' => '0 0 0 2px #f5c542'],
1596
- ],
1597
- ];
1598
- });
1599
- ```
1600
-
1601
- Without step 2 the font is loaded but unused; without step 1 the `fontFamily` falls back to Stripe's default stack.
1602
-
1603
- ### ` stripe/setup_intent_rate_limit_customer_daily `
1604
-
1605
- `fluent_cart/stripe/setup_intent_rate_limit_customer_daily` — Filter the daily SetupIntent rate limit per customer
1606
-
1607
- **When it runs:** Applied when checking and enforcing the rate limit for Stripe SetupIntent creation (used for subscription card updates). Prevents card testing fraud.
1608
-
1609
- **Parameters:**
1610
-
1611
- - `$limit` (int): Maximum number of SetupIntent attempts per customer per day (default `3`)
1612
- - `$customerId` (string): The Stripe customer ID
1613
-
1614
- **Returns:** `int` — The modified daily rate limit
1615
-
1616
- **Source:** `app/Modules/PaymentMethods/StripeGateway/SubscriptionsManager.php:92,108`
1617
-
1618
- **Usage:**
1619
-
1620
- ```
1621
- add_filter('fluent_cart/stripe/setup_intent_rate_limit_customer_daily', function ($limit, $customerId) {
1622
- // Allow more attempts for trusted customers
1623
- return 5;
1624
- }, 10, 2);
1625
- ```
1626
-
1627
- ### ` stripe/fallback_order_transaction `
1628
-
1629
- `fluent_cart/stripe/fallback_order_transaction` — Provide a fallback transaction for Stripe webhook events
1630
-
1631
- **When it runs:** Applied during Stripe webhook processing (`charge.refunded` or `charge.succeeded`) when no matching [`OrderTransaction`](/database/models/order-transaction.md) can be found by `vendor_charge_id`. Allows you to resolve the transaction through custom logic.
1632
-
1633
- **Parameters:**
1634
-
1635
- - `$transaction` ([OrderTransaction](/database/models/order-transaction.md)|null): The fallback transaction (default `null`)
1636
- - `$vendorDataObject` (object): The Stripe event data object containing charge details
1637
-
1638
- **Returns:** [OrderTransaction](/database/models/order-transaction.md)|null — An `OrderTransaction` instance or `null` if not found
1639
-
1640
- **Source:** `app/Modules/PaymentMethods/StripeGateway/Webhook/Webhook.php:171`
1641
-
1642
- **Usage:**
1643
-
1644
- ```
1645
- add_filter('fluent_cart/stripe/fallback_order_transaction', function ($transaction, $vendorDataObject) {
1646
- // Look up transaction by metadata
1647
- if (isset($vendorDataObject->metadata->fct_ref_id)) {
1648
- $order = \FluentCart\App\Models\Order::where('uuid', $vendorDataObject->metadata->fct_ref_id)->first();
1649
- if ($order) {
1650
- return \FluentCart\App\Models\OrderTransaction::where('order_id', $order->id)
1651
- ->where('transaction_type', 'charge')
1652
- ->first();
1653
- }
1654
- }
1655
- return $transaction;
1656
- }, 10, 2);
1657
- ```
1658
-
1659
- ---
1660
-
1661
- ## PayPal
1662
-
1663
- ### ` paypal_plan_id `
1664
-
1665
- `fluent_cart/paypal_plan_id` — Filter the PayPal plan ID for subscriptions
1666
-
1667
- **When it runs:** Applied when generating or resolving the PayPal billing plan ID for a subscription product variation. The plan ID is a computed string based on currency, variation, billing interval, and other parameters.
1668
-
1669
- **Parameters:**
1670
-
1671
- - `$planId` (string): The generated plan ID string
1672
- - `$context` (array): Context data
1673
-
1674
- ```
1675
- $context = [
1676
- 'plan_data' => [...], // Plan configuration data
1677
- 'variation' => Variation, // Product variation model
1678
- 'product' => Product // Product model
1679
- ];
1680
- ```
1681
-
1682
- **Returns:** `string` — The modified PayPal plan ID
1683
-
1684
- **Source:** `app/Modules/PaymentMethods/PayPalGateway/PayPalHelper.php:54`
1685
-
1686
- **Usage:**
1687
-
1688
- ```
1689
- add_filter('fluent_cart/paypal_plan_id', function ($planId, $context) {
1690
- // Use a custom plan ID format
1691
- return 'custom_plan_' . $context['variation']->id;
1692
- }, 10, 2);
1693
- ```
1694
-
1695
- ### ` payments/paypal_sdk_src `
1696
-
1697
- `fluent_cart/payments/paypal_sdk_src` — Filter the PayPal SDK JavaScript source URL
1698
-
1699
- **When it runs:** Applied when generating the PayPal JavaScript SDK script URL for the checkout page.
1700
-
1701
- **Parameters:**
1702
-
1703
- - `$sdkSrc` (string): The PayPal SDK URL with query parameters (client-id, currency, intent, vault, etc.)
1704
- - `$data` (array): Additional context data (empty array)
1705
-
1706
- **Returns:** `string` — The modified PayPal SDK URL
1707
-
1708
- **Source:** `app/Modules/PaymentMethods/PayPalGateway/PayPal.php:1179`
1709
-
1710
- **Usage:**
1711
-
1712
- ```
1713
- add_filter('fluent_cart/payments/paypal_sdk_src', function ($sdkSrc, $data) {
1714
- // Add locale parameter
1715
- return add_query_arg('locale', 'en_US', $sdkSrc);
1716
- }, 10, 2);
1717
- ```
1718
-
1719
- ### ` payments/paypal/disable_webhook_verification `
1720
-
1721
- `fluent_cart/payments/paypal/disable_webhook_verification` — Disable PayPal webhook signature verification
1722
-
1723
- **When it runs:** Applied at the start of PayPal webhook verification. Return `'yes'` to skip signature verification entirely. Only use this for debugging or in environments where verification cannot work.
1724
-
1725
- **Parameters:**
1726
-
1727
- - `$disable` (string): Whether to disable verification (default `'no'`)
1728
- - `$data` (array): Additional context data (empty array)
1729
-
1730
- **Returns:** `string` — `'yes'` to skip verification, `'no'` to verify normally
1731
-
1732
- **Source:** `app/Modules/PaymentMethods/PayPalGateway/IPN.php:358`
1733
-
1734
- **Usage:**
1735
-
1736
- ```
1737
- add_filter('fluent_cart/payments/paypal/disable_webhook_verification', function ($disable, $data) {
1738
- // Disable verification in local development
1739
- if (wp_get_environment_type() === 'local') {
1740
- return 'yes';
1741
- }
1742
- return $disable;
1743
- }, 10, 2);
1744
- ```
1745
-
1746
- ### ` payments/paypal/verify_webhook `
1747
-
1748
- `fluent_cart/payments/paypal/verify_webhook` — Control PayPal webhook verification
1749
-
1750
- **When it runs:** Applied before the actual PayPal webhook signature verification step in the main webhook processing flow. Return `false` to skip verification for specific webhook types or modes.
1751
-
1752
- **Parameters:**
1753
-
1754
- - `$verify` (bool): Whether to verify the webhook (default `true`)
1755
- - `$context` (array): Context data
1756
-
1757
- ```
1758
- $context = [
1759
- 'data' => [...], // The webhook payload
1760
- 'mode' => 'live', // 'live' or 'test'
1761
- 'type' => 'PAYMENT.SALE.COMPLETED' // Webhook event type
1762
- ];
1763
- ```
1764
-
1765
- **Returns:** `bool` — Whether to proceed with webhook verification
1766
-
1767
- **Source:** `app/Modules/PaymentMethods/PayPalGateway/IPN.php:481`
1768
-
1769
- **Usage:**
1770
-
1771
- ```
1772
- add_filter('fluent_cart/payments/paypal/verify_webhook', function ($verify, $context) {
1773
- // Skip verification for test mode
1774
- if ($context['mode'] === 'test') {
1775
- return false;
1776
- }
1777
- return $verify;
1778
- }, 10, 2);
1779
- ```
1780
-
1781
- ### ` paypal/vault_attributes `
1782
-
1783
- `fluent_cart/paypal/vault_attributes` — Filter PayPal Vault v3 attributes when saving a buyer for auto-charge
1784
-
1785
- **When it runs:** This filter is applied during a **`system` (auto-charged, store-billed) subscription** checkout when PayPal vaults the buyer's account (Vault v3 save-on-success), so future renewal invoices can be charged merchant-initiated. It lets you adjust the vault attributes sent to PayPal. See [Store-managed + auto-charge](/modules/subscriptions.md#store-managed-auto-charge-system).
1786
-
1787
- **Parameters:**
1788
-
1789
- - `$defaults` (array): The vault attributes
1790
-
1791
- ```
1792
- [
1793
- 'store_in_vault' => 'ON_SUCCESS', // string
1794
- 'usage_type' => 'MERCHANT', // string
1795
- 'customer_type' => 'CONSUMER', // string
1796
- ]
1797
- ```
1798
-
1799
- - `$context` (array): `['order' => Order, 'subscription' => Subscription]`
1800
-
1801
- **Returns:**
1802
-
1803
- - `$defaults` (array): The (possibly modified) vault attributes
1804
-
1805
- **Source:** `app/Modules/PaymentMethods/PayPalGateway/Processor.php:226`
1806
-
1807
- **Usage:**
1808
-
1809
- ```
1810
- add_filter('fluent_cart/paypal/vault_attributes', function($attributes, $context) {
1811
- return $attributes;
1812
- }, 10, 2);
1813
- ```
1814
-
1815
- ### ` payments/paypal_vault_one_time `
1816
-
1817
- `fluent_cart/payments/paypal_vault_one_time` — Filter whether a one-time PayPal order should vault the buyer's payment method
1818
-
1819
- **When it runs:** Applied when building a one-time (non-subscription) PayPal order, wherever `vault_on_success` would otherwise be decided. Letting this vault is what allows the saved-payment-methods module to offer the buyer's PayPal account for future purchases. The default simply preserves whatever `vault_on_success` was already resolved to, so with no listener attached, behavior is unchanged.
1820
-
1821
- **Parameters:**
1822
-
1823
- - `$vaultOnSuccess` (bool): Whether to vault on success (default: `!empty($args['vault_on_success'])`)
1824
- - `$context` (array): Context data
1825
-
1826
- ```
1827
- $context = [
1828
- 'order' => $order, // \FluentCart\App\Models\Order
1829
- 'transaction' => $transaction, // \FluentCart\App\Models\OrderTransaction
1830
- 'subscription' => $subscription, // \FluentCart\App\Models\Subscription|null
1831
- ];
1832
- ```
1833
-
1834
- **Returns:** `bool` — Whether PayPal should vault the buyer's payment method on this one-time order
1835
-
1836
- **Source:** `app/Modules/PaymentMethods/PayPalGateway/Processor.php:214`
1837
-
1838
- **Usage:**
1839
-
1840
- ```
1841
- add_filter('fluent_cart/payments/paypal_vault_one_time', function ($vaultOnSuccess, $context) {
1842
- // Never vault for guest (no-account) checkouts
1843
- if (!$context['order']->customer_id) {
1844
- return false;
1845
- }
1846
- return $vaultOnSuccess;
1847
- }, 10, 2);
1848
- ```
1849
-
1850
- ### ` payments/paypal_vault_rejection_issues `
1851
-
1852
- `fluent_cart/payments/paypal_vault_rejection_issues` — Filter which PayPal error codes are treated as a vaulting rejection
1853
-
1854
- **When it runs:** Applied when inspecting a failed PayPal order-creation response to decide whether the failure was caused specifically by a vaulting/save-on-success problem (as opposed to some other error). If the response's error `details` contain one of these issue codes, FluentCart retries the request without the vault attributes instead of failing the checkout outright — see the `fluent_cart/payments/paypal_vault_rejected` action, fired right before that retry.
1855
-
1856
- **Parameters:**
1857
-
1858
- - `$vaultIssues` (array): PayPal issue codes that indicate a vaulting rejection
1859
-
1860
- ```
1861
- $vaultIssues = [
1862
- 'PAYMENT_SOURCE_CANNOT_BE_USED',
1863
- 'PAYMENT_SOURCE_NOT_VAULTABLE',
1864
- 'VAULTING_NOT_ENABLED',
1865
- 'MERCHANT_NOT_ENABLED_FOR_VAULTING',
1866
- 'VAULT_ID_NOT_SUPPORTED',
1867
- ];
1868
- ```
1869
-
1870
- **Returns:** `array` — The issue codes to treat as a vaulting rejection
1871
-
1872
- **Source:** `app/Modules/PaymentMethods/PayPalGateway/Processor.php:50`
1873
-
1874
- **Usage:**
1875
-
1876
- ```
1877
- add_filter('fluent_cart/payments/paypal_vault_rejection_issues', function ($vaultIssues) {
1878
- // Also retry-without-vault on this less common PayPal issue code
1879
- $vaultIssues[] = 'CUSTOMER_ALREADY_HAS_A_SIMILAR_PAYMENT_SOURCE_SAVED';
1880
- return $vaultIssues;
1881
- }, 10, 1);
1882
- ```
1883
-
1884
- ---
1885
-
1886
- ## Tax
1887
-
1888
- ### ` tax/country_tax_titles `
1889
-
1890
- `fluent_cart/tax/country_tax_titles` — Filter tax title labels per country
1891
-
1892
- **When it runs:** Applied when retrieving the mapping of country codes to their tax identification field labels (e.g., VAT, GST, ABN). Used in checkout forms and tax settings.
1893
-
1894
- **Parameters:**
1895
-
1896
- - `$taxTitles` (array): Associative array of country code => tax label
1897
-
1898
- ```
1899
- $taxTitles = [
1900
- 'AU' => 'ABN',
1901
- 'NZ' => 'GST',
1902
- 'IN' => 'GST',
1903
- 'CA' => 'GST / HST / PST / QST',
1904
- 'GB' => 'VAT',
1905
- 'EU' => 'VAT',
1906
- 'US' => 'EIN / Sales Tax',
1907
- // ... 30+ countries
1908
- ];
1909
- ```
1910
-
1911
- **Returns:** `array` — The modified country tax titles array
1912
-
1913
- **Source:** `app/Modules/Tax/TaxModule.php (line 1730)`
1914
-
1915
- **Usage:**
1916
-
1917
- ```
1918
- add_filter('fluent_cart/tax/country_tax_titles', function ($taxTitles) {
1919
- // Add or override tax labels
1920
- $taxTitles['KR'] = __('BRN / VAT', 'my-plugin'); // South Korea
1921
- $taxTitles['US'] = __('Tax ID', 'my-plugin'); // Simplify US label
1922
- return $taxTitles;
1923
- }, 10, 1);
1924
- ```
1925
-
1926
- ### ` tax_summary_should_render `
1927
-
1928
- `fluent_cart/tax_summary_should_render` — Filter whether the tax summary is rendered for an order receipt
1929
-
1930
- **When it runs:** Applied in `TaxSummaryHelper::computeTaxSummary()` while building the tax summary for an order's receipt surfaces (thank-you page, receipts, emails, PDFs). It runs after the zero-tax short-circuit — when the order has no tax at all and no reverse charge, the summary is already skipped without this filter firing — so it lets you hide the tax summary for orders that do carry tax data.
1931
-
1932
- **Parameters:**
1933
-
1934
- - `$shouldRender` (bool): Whether the tax summary should render (default `true`)
1935
- - `$order` (\FluentCart\App\Models\Order): The order being rendered
1936
-
1937
- **Returns:**
1938
-
1939
- - `bool` — `false` to hide the tax summary block
1940
-
1941
- **Source:** `app/Services/Renderer/Receipt/TaxSummaryHelper.php (line 172)`
1942
-
1943
- **Usage:**
1944
-
1945
- ```
1946
- add_filter('fluent_cart/tax_summary_should_render', function ($shouldRender, $order) {
1947
- // Hide the tax summary for test-mode orders
1948
- if ($order->mode === 'test') {
1949
- return false;
1950
- }
1951
-
1952
- return $shouldRender;
1953
- }, 10, 2);
1954
- ```
1955
-
1956
- ---
1957
-
1958
- ## Mollie (Pro)
1959
-
1960
- ### ` mollie_settings `
1961
-
1962
- `fluent_cart/mollie_settings` Pro — Filter Mollie gateway settings
1963
-
1964
- **When it runs:** Applied when loading Mollie gateway settings during initialization.
1965
-
1966
- **Parameters:**
1967
-
1968
- - `$settings` (array): The Mollie settings array including API keys and configuration
1969
-
1970
- **Returns:** `array` — The modified Mollie settings
1971
-
1972
- **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/MollieGateway/MollieSettingsBase.php:26`
1973
-
1974
- **Usage:**
1975
-
1976
- ```
1977
- add_filter('fluent_cart/mollie_settings', function ($settings) {
1978
- // Override settings for staging
1979
- if (wp_get_environment_type() === 'staging') {
1980
- $settings['payment_mode'] = 'test';
1981
- }
1982
- return $settings;
1983
- }, 10, 1);
1984
- ```
1985
-
1986
- ### ` payments/mollie_payment_args `
1987
-
1988
- `fluent_cart/payments/mollie_payment_args` Pro — Filter Mollie payment data
1989
-
1990
- **When it runs:** Applied when building the payment data array before sending to the Mollie API for payment creation.
1991
-
1992
- **Parameters:**
1993
-
1994
- - `$paymentData` (array): The payment data for the Mollie API
1995
- - `$context` (array): Context data
1996
-
1997
- ```
1998
- $context = [
1999
- 'order' => Order, // Order model
2000
- 'transaction' => Transaction // OrderTransaction model
2001
- ];
2002
- ```
2003
-
2004
- **Returns:** `array` — The modified payment data
2005
-
2006
- **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/MollieGateway/MollieProcessor.php:169`
2007
-
2008
- **Usage:**
2009
-
2010
- ```
2011
- add_filter('fluent_cart/payments/mollie_payment_args', function ($paymentData, $context) {
2012
- // Add a custom description
2013
- $paymentData['description'] = 'Order #' . $context['order']->id . ' - My Store';
2014
- return $paymentData;
2015
- }, 10, 2);
2016
- ```
2017
-
2018
- ### ` mollie/pass_line_items_details `
2019
-
2020
- `fluent_cart/mollie/pass_line_items_details` Pro — Control whether line item details are passed to Mollie
2021
-
2022
- **When it runs:** Applied before building the Mollie payment request. Return `true` to include individual line items in the Mollie order (useful for Klarna, iDEAL, etc.).
2023
-
2024
- **Parameters:**
2025
-
2026
- - `$passLineItems` (bool): Whether to include line items (default `false`)
2027
- - `$context` (array): Array containing `[$order, $transaction]`
2028
-
2029
- **Returns:** `bool` — Whether to pass line item details to Mollie
2030
-
2031
- **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/MollieGateway/MollieProcessor.php:155`
2032
-
2033
- **Usage:**
2034
-
2035
- ```
2036
- add_filter('fluent_cart/mollie/pass_line_items_details', function ($passLineItems, $context) {
2037
- // Enable line items for Klarna support
2038
- return true;
2039
- }, 10, 2);
2040
- ```
2041
-
2042
- ### ` mollie/webhook_url `
2043
-
2044
- `fluent_cart/mollie/webhook_url` Pro — Filter the Mollie webhook URL
2045
-
2046
- **When it runs:** Applied when generating the webhook notification URL sent to Mollie during payment creation.
2047
-
2048
- **Parameters:**
2049
-
2050
- - `$webhookUrl` (string): The IPN/webhook listener URL
2051
-
2052
- **Returns:** `string` — The modified webhook URL
2053
-
2054
- **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/MollieGateway/MollieProcessor.php:341`
2055
-
2056
- **Usage:**
2057
-
2058
- ```
2059
- add_filter('fluent_cart/mollie/webhook_url', function ($webhookUrl) {
2060
- // Use a tunnel URL for local development
2061
- if (wp_get_environment_type() === 'local') {
2062
- return 'https://my-tunnel.ngrok.io/?fct_payment_listener=1&method=mollie';
2063
- }
2064
- return $webhookUrl;
2065
- }, 10, 1);
2066
- ```
2067
-
2068
- ### ` mollie/subscription_description `
2069
-
2070
- `fluent_cart/mollie/subscription_description` Pro — Filter the Mollie subscription description
2071
-
2072
- **When it runs:** Applied when creating a Mollie subscription, allowing you to customize the description shown on the customer's payment statement.
2073
-
2074
- **Parameters:**
2075
-
2076
- - `$description` (string): The generated subscription description
2077
- - `$context` (array): Context data
2078
-
2079
- ```
2080
- $context = [
2081
- 'subscription_model' => Subscription, // Subscription model
2082
- 'currency' => 'EUR' // Currency code
2083
- ];
2084
- ```
2085
-
2086
- **Returns:** `string` — The modified subscription description
2087
-
2088
- **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/MollieGateway/MollieHelper.php:209`
2089
-
2090
- **Usage:**
2091
-
2092
- ```
2093
- add_filter('fluent_cart/mollie/subscription_description', function ($description, $context) {
2094
- return 'MyStore - ' . $context['subscription_model']->item_name;
2095
- }, 10, 2);
2096
- ```
2097
-
2098
- ---
2099
-
2100
- ## Paddle (Pro)
2101
-
2102
- ### ` paddle_product_tax_category `
2103
-
2104
- `fluent_cart/paddle_product_tax_category` Pro — Filter Paddle product tax category
2105
-
2106
- **When it runs:** Applied when FluentCart creates the corresponding product on Paddle, to determine the tax category sent with the product data. Paddle uses tax categories to apply the correct tax rates.
2107
-
2108
- **Parameters:**
2109
-
2110
- - `$taxCategory` (string): The tax category (default `'standard'`)
2111
- - `$data` (array): Context data
2112
-
2113
- ```
2114
- $data = [
2115
- 'product' => $fctProduct, // \FluentCart\App\Models\Product|null — the FluentCart product
2116
- 'variation_id' => $variationId, // int|null — the product variation ID
2117
- ];
2118
- ```
2119
-
2120
- **Returns:** `string` — The Paddle tax category (e.g., `'standard'`, `'digital-goods'`, `'saas'`)
2121
-
2122
- **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/PaddleGateway/Product.php (line 53)`
2123
-
2124
- **Usage:**
2125
-
2126
- ```
2127
- add_filter('fluent_cart/paddle_product_tax_category', function ($taxCategory, $data) {
2128
- if ($data['product'] && $data['product']->ID === 123) {
2129
- return 'digital-goods';
2130
- }
2131
-
2132
- return $taxCategory;
2133
- }, 10, 2);
2134
- ```
2135
-
2136
- ### ` paddle_onetime_price_id `
2137
-
2138
- `fluent_cart/paddle_onetime_price_id` Pro — Filter Paddle one-time price ID
2139
-
2140
- **When it runs:** Applied when resolving the Paddle price ID for a one-time payment product.
2141
-
2142
- **Parameters:**
2143
-
2144
- - `$priceId` (string): The Paddle price ID
2145
-
2146
- **Returns:** `string` — The modified Paddle price ID
2147
-
2148
- **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/PaddleGateway/`
2149
-
2150
- **Usage:**
2151
-
2152
- ```
2153
- add_filter('fluent_cart/paddle_onetime_price_id', function ($priceId) {
2154
- return $priceId;
2155
- }, 10, 1);
2156
- ```
2157
-
2158
- ### ` paddle_recurring_price_id `
2159
-
2160
- `fluent_cart/paddle_recurring_price_id` Pro — Filter Paddle recurring price ID
2161
-
2162
- **When it runs:** Applied when resolving the Paddle price ID for a recurring subscription product.
2163
-
2164
- **Parameters:**
2165
-
2166
- - `$priceId` (string): The Paddle recurring price ID
2167
-
2168
- **Returns:** `string` — The modified Paddle recurring price ID
2169
-
2170
- **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/PaddleGateway/`
2171
-
2172
- **Usage:**
2173
-
2174
- ```
2175
- add_filter('fluent_cart/paddle_recurring_price_id', function ($priceId) {
2176
- return $priceId;
2177
- }, 10, 1);
2178
- ```
2179
-
2180
- ### ` paddle_discount_id `
2181
-
2182
- `fluent_cart/paddle_discount_id` Pro — Filter Paddle discount ID
2183
-
2184
- **When it runs:** Applied when resolving the Paddle discount ID to apply during checkout.
2185
-
2186
- **Parameters:**
2187
-
2188
- - `$discountId` (string): The Paddle discount ID
2189
-
2190
- **Returns:** `string` — The modified Paddle discount ID
2191
-
2192
- **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/PaddleGateway/`
2193
-
2194
- **Usage:**
2195
-
2196
- ```
2197
- add_filter('fluent_cart/paddle_discount_id', function ($discountId) {
2198
- return $discountId;
2199
- }, 10, 1);
2200
- ```
2201
-
2202
- ### ` paddle_pin_checkout_currency `
2203
-
2204
- `fluent_cart/paddle_pin_checkout_currency` Pro — Control whether Paddle checkout is pinned to the order currency
2205
-
2206
- **When it runs:** Applied when creating the server-side Paddle transaction for a checkout. When `true` (default), the transaction's `currency_code` is pinned to the order currency, so the charge always settles in the currency the order was placed in. Return `false` to let Paddle localize the currency by the customer's country; the captured payment then goes through the cross-currency reconciliation route.
2207
-
2208
- Not applied when a discount is used at checkout — flat Paddle discounts are currency-bound, so discounted checkouts are always pinned to the order currency.
2209
-
2210
- **Parameters:**
2211
-
2212
- - `$pinCurrency` (bool): Whether to pin the checkout to the order currency (default `true`)
2213
- - `$context` (array): Context — `order` (`Order` model) and `transaction` (`OrderTransaction` model)
2214
-
2215
- **Returns:** `bool` — `true` to pin the checkout to the order currency, `false` to let Paddle localize it
2216
-
2217
- **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/PaddleGateway/`
2218
-
2219
- **Usage:**
2220
-
2221
- ```
2222
- add_filter('fluent_cart/paddle_pin_checkout_currency', function ($pinCurrency, $context) {
2223
- // Let Paddle localize the checkout currency by customer country
2224
- return false;
2225
- }, 10, 2);
2226
- ```
2227
-
2228
- ### ` paddle_subscription_product_type `
2229
-
2230
- `fluent_cart/paddle_subscription_product_type` Pro — Filter Paddle subscription product type
2231
-
2232
- **When it runs:** Applied when determining the Paddle product type for subscription items.
2233
-
2234
- **Parameters:**
2235
-
2236
- - `$productType` (string): The Paddle product type
2237
-
2238
- **Returns:** `string` — The modified Paddle product type
2239
-
2240
- **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/PaddleGateway/`
2241
-
2242
- **Usage:**
2243
-
2244
- ```
2245
- add_filter('fluent_cart/paddle_subscription_product_type', function ($productType) {
2246
- return $productType;
2247
- }, 10, 1);
2248
- ```
2249
-
2250
- ### ` paddle_subscription_price_type `
2251
-
2252
- `fluent_cart/paddle_subscription_price_type` Pro — Filter Paddle subscription price type
2253
-
2254
- **When it runs:** Applied when determining the Paddle price type for subscription items.
2255
-
2256
- **Parameters:**
2257
-
2258
- - `$priceType` (string): The Paddle price type
2259
-
2260
- **Returns:** `string` — The modified Paddle price type
2261
-
2262
- **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/PaddleGateway/`
2263
-
2264
- **Usage:**
2265
-
2266
- ```
2267
- add_filter('fluent_cart/paddle_subscription_price_type', function ($priceType) {
2268
- return $priceType;
2269
- }, 10, 1);
2270
- ```
2271
-
2272
- ### ` paddle_signup_fee_price_type `
2273
-
2274
- `fluent_cart/paddle_signup_fee_price_type` Pro — Filter Paddle signup fee price type
2275
-
2276
- **When it runs:** Applied when determining the Paddle price type for subscription signup fees.
2277
-
2278
- **Parameters:**
2279
-
2280
- - `$priceType` (string): The Paddle signup fee price type
2281
-
2282
- **Returns:** `string` — The modified Paddle signup fee price type
2283
-
2284
- **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/PaddleGateway/`
2285
-
2286
- **Usage:**
2287
-
2288
- ```
2289
- add_filter('fluent_cart/paddle_signup_fee_price_type', function ($priceType) {
2290
- return $priceType;
2291
- }, 10, 1);
2292
- ```
2293
-
2294
- ### ` paddle_product_id `
2295
-
2296
- `fluent_cart/paddle_product_id` Pro — Filter Paddle one-time product ID
2297
-
2298
- **When it runs:** Applied when resolving the Paddle product ID for one-time payment items.
2299
-
2300
- **Parameters:**
2301
-
2302
- - `$productId` (string): The Paddle product ID
2303
-
2304
- **Returns:** `string` — The modified Paddle product ID
2305
-
2306
- **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/PaddleGateway/`
2307
-
2308
- **Usage:**
2309
-
2310
- ```
2311
- add_filter('fluent_cart/paddle_product_id', function ($productId) {
2312
- return $productId;
2313
- }, 10, 1);
2314
- ```
2315
-
2316
- ### ` paddle_onetime_product_type `
2317
-
2318
- `fluent_cart/paddle_onetime_product_type` Pro — Filter Paddle one-time product type
2319
-
2320
- **When it runs:** Applied when determining the Paddle product type for one-time payment items.
2321
-
2322
- **Parameters:**
2323
-
2324
- - `$productType` (string): The Paddle product type
2325
-
2326
- **Returns:** `string` — The modified Paddle product type
2327
-
2328
- **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/PaddleGateway/`
2329
-
2330
- **Usage:**
2331
-
2332
- ```
2333
- add_filter('fluent_cart/paddle_onetime_product_type', function ($productType) {
2334
- return $productType;
2335
- }, 10, 1);
2336
- ```
2337
-
2338
- ### ` paddle_onetime_price_type `
2339
-
2340
- `fluent_cart/paddle_onetime_price_type` Pro — Filter Paddle one-time price type
2341
-
2342
- **When it runs:** Applied when determining the Paddle price type for one-time payment items.
2343
-
2344
- **Parameters:**
2345
-
2346
- - `$priceType` (string): The Paddle price type
2347
-
2348
- **Returns:** `string` — The modified Paddle price type
2349
-
2350
- **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/PaddleGateway/`
2351
-
2352
- **Usage:**
2353
-
2354
- ```
2355
- add_filter('fluent_cart/paddle_onetime_price_type', function ($priceType) {
2356
- return $priceType;
2357
- }, 10, 1);
2358
- ```
2359
-
2360
- ### ` paddle_addon_product_type `
2361
-
2362
- `fluent_cart/paddle_addon_product_type` Pro — Filter Paddle add-on product type
2363
-
2364
- **When it runs:** Applied when determining the Paddle product type for add-on items.
2365
-
2366
- **Parameters:**
2367
-
2368
- - `$productType` (string): The Paddle add-on product type
2369
-
2370
- **Returns:** `string` — The modified Paddle add-on product type
2371
-
2372
- **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/PaddleGateway/`
2373
-
2374
- **Usage:**
2375
-
2376
- ```
2377
- add_filter('fluent_cart/paddle_addon_product_type', function ($productType) {
2378
- return $productType;
2379
- }, 10, 1);
2380
- ```
2381
-
2382
- ### ` paddle_discount_mode `
2383
-
2384
- `fluent_cart/paddle_discount_mode` Pro — Filter Paddle discount mode
2385
-
2386
- **When it runs:** Applied when determining how discounts are applied in Paddle transactions.
2387
-
2388
- **Parameters:**
2389
-
2390
- - `$discountMode` (string): The discount mode
2391
-
2392
- **Returns:** `string` — The modified discount mode
2393
-
2394
- **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/PaddleGateway/`
2395
-
2396
- **Usage:**
2397
-
2398
- ```
2399
- add_filter('fluent_cart/paddle_discount_mode', function ($discountMode) {
2400
- return $discountMode;
2401
- }, 10, 1);
2402
- ```
2403
-
2404
- ---
2405
-
2406
- ## Authorize.net (Pro)
2407
-
2408
- ### ` authorize_dot_net_supported_currencies `
2409
-
2410
- `fluent_cart/authorize_dot_net_supported_currencies` Pro — Filter Authorize.net supported currencies
2411
-
2412
- **When it runs:** Applied when checking which currencies are supported by the Authorize.net gateway.
2413
-
2414
- **Parameters:**
2415
-
2416
- - `$currencies` (array): Array of supported currency codes
2417
-
2418
- ```
2419
- $currencies = ['USD', 'CAD', 'GBP', 'EUR', ...];
2420
- ```
2421
-
2422
- **Returns:** `array` — The modified array of supported currency codes
2423
-
2424
- **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/AuthorizeDotNetGateway/`
2425
-
2426
- **Usage:**
2427
-
2428
- ```
2429
- add_filter('fluent_cart/authorize_dot_net_supported_currencies', function ($currencies) {
2430
- // Add additional supported currencies
2431
- $currencies[] = 'AUD';
2432
- $currencies[] = 'NZD';
2433
- return $currencies;
2434
- }, 10, 1);
2435
- ```
2436
-
2437
- ### ` authorize_dot_net/transaction_request `
2438
-
2439
- `fluent_cart/authorize_dot_net/transaction_request` Pro — Filter the Authorize.net transaction request before it is sent to the API
2440
-
2441
- **When it runs:** Applied to the assembled `transactionRequest` payload immediately before it is sent to the Authorize.net API. Fires on both the one-time payment path and the subscription first-payment path, so developers can override any Auth.net field (invoice number, customer ID/email, `userFields`, line items, billing/shipping, etc.) without core changes.
2442
-
2443
- **Parameters:**
2444
-
2445
- - `$transactionRequest` (array): The Authorize.net transaction request payload (amount, payment, billTo, shipTo, lineItems, etc.)
2446
- - `$data` (array): Context data
2447
-
2448
- ```
2449
- $data = [
2450
- 'order' => $order, // Order model instance
2451
- 'transaction' => $transaction, // OrderTransaction model instance
2452
- ];
2453
- ```
2454
-
2455
- **Returns:** `array` — The modified transaction request payload
2456
-
2457
- **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/AuthorizeDotNetGateway/AuthorizeDotNetProcessor.php:71` (one-time) and `:542` (subscription first payment)
2458
-
2459
- **Usage:**
2460
-
2461
- ```
2462
- add_filter('fluent_cart/authorize_dot_net/transaction_request', function ($transactionRequest, $data) {
2463
- // Attach a custom purchase order number via userFields
2464
- $transactionRequest['userFields'] = [
2465
- 'userField' => [
2466
- ['name' => 'po_number', 'value' => 'PO-' . $data['order']->id],
2467
- ],
2468
- ];
2469
- return $transactionRequest;
2470
- }, 10, 2);
2471
- ```
2472
-
2473
- ### ` authorize_dot_net/order_description `
2474
-
2475
- `fluent_cart/authorize_dot_net/order_description` Pro — Filter the order description sent to Authorize.net
2476
-
2477
- **When it runs:** Applied when building the order metadata (invoice number and description) for an Authorize.net transaction. The default description is the comma-separated list of item names, or `Order #{id}` when no names are available. The returned value is truncated to 255 characters.
2478
-
2479
- **Parameters:**
2480
-
2481
- - `$default` (string): The default order description (item names or `Order #{id}`)
2482
- - `$data` (array): Context data
2483
-
2484
- ```
2485
- $data = [
2486
- 'order' => $order, // Order model instance
2487
- ];
2488
- ```
2489
-
2490
- **Returns:** `string` — The order description (truncated to 255 chars)
2491
-
2492
- **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/AuthorizeDotNetGateway/AuthorizeDotNetHelper.php:234`
2493
-
2494
- **Usage:**
2495
-
2496
- ```
2497
- add_filter('fluent_cart/authorize_dot_net/order_description', function ($description, $data) {
2498
- // Prefix the description with the store name
2499
- return 'My Store — ' . $description;
2500
- }, 10, 2);
2501
- ```
2502
-
2503
- ### ` should_send_email_notification `
2504
-
2505
- `fluent_cart/should_send_email_notification` — Control whether an automatic email notification should be sent
2506
-
2507
- **When it runs:** This filter is applied before each automatic email notification is sent for an order event. It allows you to selectively block or allow specific email notifications, for example when using a Merchant of Record payment gateway (like Paddle) that handles its own transactional emails.
2508
-
2509
- **Parameters:**
2510
-
2511
- - `$should` (bool): Whether the email should be sent (default: `true`)
2512
- - `$args` (array): Context data about the notification
2513
-
2514
- ```
2515
- $args = [
2516
- 'event' => 'order_paid', // The event triggering the email
2517
- 'mail_name' => 'order_paid_customer', // The specific notification identifier
2518
- 'order' => $order, // Order model instance
2519
- ];
2520
- ```
2521
-
2522
- **Available `mail_name` values:**
2523
-
2524
- - `order_paid_customer` — Purchase receipt to customer
2525
- - `order_paid_admin` — New order alert to admin
2526
- - `order_refunded_customer` — Refund confirmation to customer
2527
- - `order_refunded_admin` — Refund alert to admin
2528
- - `subscription_renewed_customer` — Renewal receipt to customer
2529
- - `subscription_renewed_admin` — Renewal alert to admin
2530
- - `subscription_canceled_customer` — Cancellation notice to customer
2531
- - `subscription_canceled_admin` — Cancellation alert to admin
2532
- - `order_placed_customer` — Order confirmation to customer (offline payment)
2533
- - `order_placed_admin` — Order placed alert to admin (offline payment)
2534
-
2535
- **Returns:**
2536
-
2537
- - `$should` (bool): Whether the email notification should be sent
2538
-
2539
- **Usage:**
2540
-
2541
- ```
2542
- // Block all customer-facing emails for a specific payment gateway
2543
- add_filter('fluent_cart/should_send_email_notification', function($should, $args) {
2544
- $order = $args['order'];
2545
-
2546
- if ($order->payment_method !== 'my_gateway') {
2547
- return $should;
2548
- }
2549
-
2550
- // Only allow order confirmation and admin notifications
2551
- $allowedEmails = [
2552
- 'order_paid_customer',
2553
- 'order_paid_admin',
2554
- ];
2555
-
2556
- return in_array($args['mail_name'], $allowedEmails, true);
2557
- }, 10, 2);
2558
- ```
2559
-
2560
- **Note:** This filter only affects automatic event-driven emails. Manual actions like generating invoices or printing receipts from the admin panel are not affected.
2561
-
2562
- ### ` email_notification/mailer `
2563
-
2564
- `fluent_cart/email_notification/mailer` — Modify the fully prepared Mailer immediately before it sends
2565
-
2566
- **When it runs:** This filter is applied right before an email notification is actually sent — after the recipient, subject, body, and attachments have all been resolved onto the `Mailer` instance. Use it to add CC/BCC recipients, override the From/Reply-To address, attach extra files, or switch HTML/plain-text mode for a specific notification, without touching core code. It fires on every send path: synchronous event-driven sends (`mailEmailsOfEvent()`), direct by-name sends (`mailByEmailName()`), and Action Scheduler async sends (which resolve through `mailByEmailName()`).
2567
-
2568
- **Parameters:**
2569
-
2570
- - `$mailer` (`FluentCart\App\Services\Email\Mailer`): The fully prepared mailer — `to`, `subject`, `body`, and any PDF attachment are already set
2571
- - `$context` (array): Context about the notification being sent
2572
-
2573
- ```
2574
- $context = [
2575
- 'event' => 'order_paid', // The event that triggered the email
2576
- 'mail_name' => 'order_paid_customer', // The specific notification identifier
2577
- 'recipient' => 'customer', // 'customer' | 'admin' | 'user' | 'subscriber'
2578
- 'notification' => $notification, // The resolved notification config array
2579
- 'data' => $data, // The raw event payload (order, customer, subscription, etc.)
2580
- ];
2581
- ```
2582
-
2583
- **Returns:**
2584
-
2585
- - `$mailer` (`Mailer`): The mailer to send. Return the same instance (mutated via its fluent methods) or a different one. Any return value that is not a `Mailer` instance is ignored and the originally prepared mailer is sent instead — a misbehaving listener can never block delivery.
2586
-
2587
- **Usage:**
2588
-
2589
- ```
2590
- // BCC every purchase receipt to a review-collection service, and only that notification
2591
- add_filter(
2592
- 'fluent_cart/email_notification/mailer',
2593
- function ($mailer, $context) {
2594
- if ($context['mail_name'] !== 'order_paid_customer') {
2595
- return $mailer;
2596
- }
2597
-
2598
- $mailer->addCC('[email&#160;protected]');
2599
- $mailer->addBCC('[email&#160;protected]');
2600
- // Also available: $mailer->setFrom(), $mailer->setReplyTo(),
2601
- // $mailer->addAttachment(), $mailer->setIsHtml()
2602
-
2603
- return $mailer;
2604
- },
2605
- 10,
2606
- 2
2607
- );
2608
- ```
2609
-
2610
- **Note:** This is a send-time mailer filter, distinct from `fluent_cart/email_notifications` (which shapes the notification *definitions*, not an in-flight send).
2611
-
2612
- ### ` paddle_allowed_email_notifications `
2613
-
2614
- `fluent_cart/paddle_allowed_email_notifications` Pro — Control which email notifications are allowed for Paddle orders
2615
-
2616
- **When it runs:** This filter is applied when determining whether to send an automatic email notification for a Paddle order. Since Paddle is a Merchant of Record and handles its own payment receipts, refund confirmations, and subscription billing emails, FluentCart blocks most automatic emails for Paddle orders by default. Use this filter to customize which emails are still sent by FluentCart.
2617
-
2618
- **Parameters:**
2619
-
2620
- - `$allowedEmails` (array): List of notification identifiers that FluentCart is allowed to send for Paddle orders
2621
-
2622
- ```
2623
- // Default allowed emails
2624
- $allowedEmails = [
2625
- 'order_paid_customer', // Order confirmation to customer
2626
- 'order_paid_admin', // New order alert to admin
2627
- ];
2628
- ```
2629
-
2630
- **Returns:**
2631
-
2632
- - `$allowedEmails` (array): The modified list of allowed notification identifiers
2633
-
2634
- **Usage:**
2635
-
2636
- ```
2637
- // Allow shipping notifications for Paddle orders
2638
- add_filter('fluent_cart/paddle_allowed_email_notifications', function($allowedEmails) {
2639
- $allowedEmails[] = 'shipping_status_changed_to_shipped_customer';
2640
- $allowedEmails[] = 'shipping_status_changed_to_delivered_customer';
2641
- return $allowedEmails;
2642
- });
2643
- ```
2644
-
2645
- **Available notification identifiers:**
2646
-
2647
- - `order_paid_customer` — Purchase receipt / order confirmation to customer (allowed by default)
2648
- - `order_paid_admin` — New order alert to admin (allowed by default)
2649
- - `order_refunded_customer` — Refund confirmation to customer
2650
- - `order_refunded_admin` — Refund alert to admin
2651
- - `subscription_renewed_customer` — Renewal receipt to customer
2652
- - `subscription_renewed_admin` — Renewal alert to admin
2653
- - `subscription_canceled_customer` — Cancellation notice to customer
2654
- - `subscription_canceled_admin` — Cancellation alert to admin
2655
-
2656
- **Note:** This filter is specific to Paddle orders. For general email notification control across all payment gateways, use the `fluent_cart/should_send_email_notification` filter instead.
2657
-
2658
- ---
1
+ # Orders & Payments
2
+
3
+ All filters related to [Order](/database/models/order.md) lifecycle, payment processing, gateway integrations, and taxes.
4
+
5
+ ## Order Statuses
6
+
7
+ ### ` order_statuses `
8
+
9
+ `fluent_cart/order_statuses` — Filter available order statuses
10
+
11
+ **When it runs:** Applied when retrieving the list of available order statuses throughout the admin and storefront.
12
+
13
+ **Parameters:**
14
+
15
+ - `$statuses` (array): Associative array of order statuses (key => translated label)
16
+
17
+ ```
18
+ $statuses = [
19
+ 'processing' => 'Processing',
20
+ 'completed' => 'Completed',
21
+ 'on-hold' => 'On Hold',
22
+ 'canceled' => 'Canceled',
23
+ 'failed' => 'Failed',
24
+ ];
25
+ ```
26
+
27
+ - `$data` (array): Additional context data (empty array)
28
+
29
+ **Returns:** `array` — The modified order statuses array
30
+
31
+ **Source:** `app/Helpers/Status.php:164`
32
+
33
+ **Usage:**
34
+
35
+ ```
36
+ add_filter('fluent_cart/order_statuses', function ($statuses, $data) {
37
+ // Add a custom order status
38
+ $statuses['awaiting_pickup'] = __('Awaiting Pickup', 'my-plugin');
39
+ return $statuses;
40
+ }, 10, 2);
41
+ ```
42
+
43
+ ### ` editable_order_statuses `
44
+
45
+ `fluent_cart/editable_order_statuses` — Filter manually settable order statuses
46
+
47
+ **When it runs:** Applied when building the list of order statuses an admin can manually set. Both `Status::getEditableOrderStatuses()` and `Helper::getEditableOrderStatuses()` apply it to the default status map and return the result.
48
+
49
+ **Parameters:**
50
+
51
+ - `$statuses` (array): Associative array of editable order statuses (key => translated label)
52
+ - `$data` (array): Additional context data (empty array)
53
+
54
+ **Returns:** `array` — The modified editable order statuses array
55
+
56
+ **Source:** `app/Helpers/Status.php:183`
57
+
58
+ **Usage:**
59
+
60
+ ```
61
+ add_filter('fluent_cart/editable_order_statuses', function ($statuses, $data) {
62
+ unset($statuses['canceled']);
63
+ return $statuses;
64
+ }, 10, 2);
65
+ ```
66
+
67
+ ### ` payment_statuses `
68
+
69
+ `fluent_cart/payment_statuses` — Filter payment statuses
70
+
71
+ **When it runs:** Applied when retrieving the list of available payment statuses used across the order and transaction system.
72
+
73
+ **Parameters:**
74
+
75
+ - `$statuses` (array): Associative array of payment statuses (key => translated label)
76
+
77
+ ```
78
+ $statuses = [
79
+ 'pending' => 'Pending',
80
+ 'paid' => 'Paid',
81
+ 'partially_paid' => 'Partially Paid',
82
+ 'failed' => 'Failed',
83
+ 'refunded' => 'Refunded',
84
+ 'partially_refunded' => 'Partially Refunded',
85
+ 'authorized' => 'Authorized',
86
+ ];
87
+ ```
88
+
89
+ - `$data` (array): Additional context data (empty array)
90
+
91
+ **Returns:** `array` — The modified payment statuses array
92
+
93
+ **Source:** `app/Helpers/Status.php:190`
94
+
95
+ **Usage:**
96
+
97
+ ```
98
+ add_filter('fluent_cart/payment_statuses', function ($statuses, $data) {
99
+ $statuses['on_hold'] = __('On Hold', 'my-plugin');
100
+ return $statuses;
101
+ }, 10, 2);
102
+ ```
103
+
104
+ ### ` transaction_statuses `
105
+
106
+ `fluent_cart/transaction_statuses` — Filter transaction statuses
107
+
108
+ **When it runs:** Applied when retrieving available transaction statuses for the primary transaction system.
109
+
110
+ **Parameters:**
111
+
112
+ - `$statuses` (array): Associative array of transaction statuses (key => translated label)
113
+
114
+ ```
115
+ $statuses = [
116
+ 'pending' => 'Pending',
117
+ 'succeeded' => 'Succeeded',
118
+ 'authorized' => 'Authorized',
119
+ 'failed' => 'Failed',
120
+ 'refunded' => 'Refunded',
121
+ ];
122
+ ```
123
+
124
+ - `$data` (array): Additional context data (empty array)
125
+
126
+ **Returns:** `array` — The modified transaction statuses array
127
+
128
+ **Source:** `app/Helpers/Status.php:205`
129
+
130
+ **Usage:**
131
+
132
+ ```
133
+ add_filter('fluent_cart/transaction_statuses', function ($statuses, $data) {
134
+ $statuses['disputed'] = __('Disputed', 'my-plugin');
135
+ return $statuses;
136
+ }, 10, 2);
137
+ ```
138
+
139
+ ### ` editable_transaction_statuses `
140
+
141
+ `fluent_cart/editable_transaction_statuses` — Filter manually editable transaction statuses
142
+
143
+ **When it runs:** Applied when building the list of transaction statuses an admin can manually set on an order.
144
+
145
+ **Parameters:**
146
+
147
+ - `$statuses` (array): Associative array of editable transaction statuses (key => translated label)
148
+ - `$data` (array): Additional context data (empty array)
149
+
150
+ **Returns:** `array` — The modified editable transaction statuses array
151
+
152
+ **Source:** `app/Helpers/Status.php:230`
153
+
154
+ **Usage:**
155
+
156
+ ```
157
+ add_filter('fluent_cart/editable_transaction_statuses', function ($statuses, $data) {
158
+ unset($statuses['refunded']);
159
+ return $statuses;
160
+ }, 10, 2);
161
+ ```
162
+
163
+ ### ` transaction_success_statuses `
164
+
165
+ `fluent_cart/transaction_success_statuses` — Filter which statuses count as successful transactions
166
+
167
+ **When it runs:** Applied when determining which transaction statuses should be considered "successful" for reporting and order completion logic.
168
+
169
+ **Parameters:**
170
+
171
+ - `$statuses` (array): Indexed array of status strings
172
+
173
+ ```
174
+ $statuses = ['succeeded', 'authorized'];
175
+ ```
176
+
177
+ - `$data` (array): Additional context data (empty array)
178
+
179
+ **Returns:** `array` — The modified success statuses array
180
+
181
+ **Source:** `app/Helpers/Status.php:351`
182
+
183
+ **Usage:**
184
+
185
+ ```
186
+ add_filter('fluent_cart/transaction_success_statuses', function ($statuses, $data) {
187
+ // Also count "captured" as a success status
188
+ $statuses[] = 'captured';
189
+ return $statuses;
190
+ }, 10, 2);
191
+ ```
192
+
193
+ ### ` shipping_statuses `
194
+
195
+ `fluent_cart/shipping_statuses` — Filter shipping statuses
196
+
197
+ **When it runs:** Applied when retrieving the list of available shipping statuses used for order fulfillment.
198
+
199
+ **Parameters:**
200
+
201
+ - `$statuses` (array): Associative array of shipping statuses (key => translated label)
202
+
203
+ ```
204
+ $statuses = [
205
+ 'unshipped' => 'Unshipped',
206
+ 'shipped' => 'Shipped',
207
+ 'delivered' => 'Delivered',
208
+ 'unshippable' => 'Unshippable',
209
+ ];
210
+ ```
211
+
212
+ - `$data` (array): Additional context data (empty array)
213
+
214
+ **Returns:** `array` — The modified shipping statuses array
215
+
216
+ **Source:** `app/Helpers/Status.php:242`
217
+
218
+ **Usage:**
219
+
220
+ ```
221
+ add_filter('fluent_cart/shipping_statuses', function ($statuses, $data) {
222
+ $statuses['in_transit'] = __('In Transit', 'my-plugin');
223
+ return $statuses;
224
+ }, 10, 2);
225
+ ```
226
+
227
+ ### ` editable_shipping_statuses `
228
+
229
+ `fluent_cart/editable_shipping_statuses` — Filter manually settable shipping statuses
230
+
231
+ **When it runs:** Applied when building the list of shipping statuses an admin can manually set on an order. This controls the dropdown options in the order edit screen.
232
+
233
+ **Parameters:**
234
+
235
+ - `$statuses` (array): Associative array of editable shipping statuses (key => translated label) — same default shape as `fluent_cart/shipping_statuses` above
236
+ - `$data` (array): Additional context data (empty array)
237
+
238
+ **Returns:** `array` — The modified editable shipping statuses array
239
+
240
+ **Source:** `app/Helpers/Status.php:259`
241
+
242
+ **Usage:**
243
+
244
+ ```
245
+ add_filter('fluent_cart/editable_shipping_statuses', function ($statuses, $data) {
246
+ unset($statuses['unshippable']);
247
+ return $statuses;
248
+ }, 10, 2);
249
+ ```
250
+
251
+ ---
252
+
253
+ ## Order Data & Lifecycle
254
+
255
+ ### ` orders_list `
256
+
257
+ `fluent_cart/orders_list` — Filter the admin orders list
258
+
259
+ **When it runs:** Applied after retrieving the paginated orders collection for the admin orders list view.
260
+
261
+ **Parameters:**
262
+
263
+ - `$orders` (LengthAwarePaginator): Paginated collection of orders
264
+
265
+ **Returns:** `LengthAwarePaginator` — The modified paginated orders collection
266
+
267
+ **Source:** `app/Http/Controllers/OrderController.php:62`
268
+
269
+ **Usage:**
270
+
271
+ ```
272
+ add_filter('fluent_cart/orders_list', function ($orders) {
273
+ // Add custom data to each order in the list
274
+ foreach ($orders as $order) {
275
+ $order->custom_badge = get_post_meta($order->id, '_custom_badge', true);
276
+ }
277
+ return $orders;
278
+ }, 10, 1);
279
+ ```
280
+
281
+ ### ` order/view `
282
+
283
+ `fluent_cart/order/view` — Filter single order view data
284
+
285
+ **When it runs:** Applied when preparing the data for a single order view in the admin panel.
286
+
287
+ **Parameters:**
288
+
289
+ - `$order` (array): The order data array containing all order details
290
+ - `$data` (array): Additional context data (empty array)
291
+
292
+ **Returns:** `array` — The modified order data
293
+
294
+ **Source:** `app/Http/Controllers/OrderController.php:691`
295
+
296
+ **Usage:**
297
+
298
+ ```
299
+ add_filter('fluent_cart/order/view', function ($order, $data) {
300
+ // Add custom data to the order view
301
+ $order['custom_field'] = 'Custom Value';
302
+ return $order;
303
+ }, 10, 2);
304
+ ```
305
+
306
+ ### ` widgets/single_order `
307
+
308
+ `fluent_cart/widgets/single_order` — Filter single order admin widgets
309
+
310
+ **When it runs:** Applied when loading the stats/widgets section on the single order admin view.
311
+
312
+ **Parameters:**
313
+
314
+ - `$widgets` (array): Array of widget data (default empty)
315
+ - `$order` ([Order](/database/models/order.md)): The Order model instance
316
+
317
+ **Returns:** `array` — Array of widget definitions to display
318
+
319
+ **Source:** `app/Http/Controllers/OrderController.php:1085`
320
+
321
+ **Usage:**
322
+
323
+ ```
324
+ add_filter('fluent_cart/widgets/single_order', function ($widgets, $order) {
325
+ $widgets[] = [
326
+ 'title' => __('Custom Widget', 'my-plugin'),
327
+ 'value' => 'Some data for order #' . $order->id,
328
+ ];
329
+ return $widgets;
330
+ }, 10, 2);
331
+ ```
332
+
333
+ ### ` order/is_subscription_allowed_in_manual_order `
334
+
335
+ `fluent_cart/order/is_subscription_allowed_in_manual_order` — Allow subscriptions in manual orders
336
+
337
+ **When it runs:** Applied when creating a manual order that contains subscription items. By default, subscriptions in manual orders are not supported.
338
+
339
+ **Parameters:**
340
+
341
+ - `$allowed` (bool): Whether subscriptions are allowed (default `false`)
342
+ - `$context` (array): Context data
343
+
344
+ ```
345
+ $context = [
346
+ 'order_items' => [...] // Array of order item data
347
+ ];
348
+ ```
349
+
350
+ **Returns:** `bool` — Whether to allow subscription items in manual orders
351
+
352
+ **Source:** `app/Http/Controllers/OrderController.php:95`
353
+
354
+ **Usage:**
355
+
356
+ ```
357
+ add_filter('fluent_cart/order/is_subscription_allowed_in_manual_order', function ($allowed, $context) {
358
+ // Enable subscriptions in manual orders
359
+ return true;
360
+ }, 10, 2);
361
+ ```
362
+
363
+ ### ` order/type `
364
+
365
+ `fluent_cart/order/type` — Filter order type during manual creation
366
+
367
+ **When it runs:** Applied when determining the order type during manual order creation. The type is automatically set to `'subscription'` if subscription items are detected, otherwise `'payment'`.
368
+
369
+ **Parameters:**
370
+
371
+ - `$type` (string): The order type (`'payment'` or `'subscription'`)
372
+ - `$data` (array): Additional context data (empty array)
373
+
374
+ **Returns:** `string` — The order type string
375
+
376
+ **Source:** `app/Http/Controllers/OrderController.php:108`
377
+
378
+ **Usage:**
379
+
380
+ ```
381
+ add_filter('fluent_cart/order/type', function ($type, $data) {
382
+ return $type;
383
+ }, 10, 2);
384
+ ```
385
+
386
+ ### ` order/expected_license_count `
387
+
388
+ `fluent_cart/order/expected_license_count` — Filter expected license count for an order
389
+
390
+ **When it runs:** Applied when checking how many licenses should exist for an order. Used to detect missing licenses that need to be regenerated.
391
+
392
+ **Parameters:**
393
+
394
+ - `$count` (int): Expected number of licenses (default `0`)
395
+ - `$context` (array): Context data
396
+
397
+ ```
398
+ $context = [
399
+ 'order_items' => [...] // Collection of order items
400
+ ];
401
+ ```
402
+
403
+ **Returns:** `int` — The expected number of licenses
404
+
405
+ **Source:** `app/Http/Controllers/OrderController.php:314,696`
406
+
407
+ **Usage:**
408
+
409
+ ```
410
+ add_filter('fluent_cart/order/expected_license_count', function ($count, $context) {
411
+ foreach ($context['order_items'] as $item) {
412
+ if ($item->requires_license) {
413
+ $count += $item->quantity;
414
+ }
415
+ }
416
+ return $count;
417
+ }, 10, 2);
418
+ ```
419
+
420
+ ### ` create_receipt_number_on_order_create `
421
+
422
+ `fluent_cart/create_receipt_number_on_order_create` — Force receipt number generation on order creation
423
+
424
+ **When it runs:** Applied during the order `creating` model event. By default, receipt numbers are only generated when the payment status is `'paid'`. Return `true` to always generate a receipt number.
425
+
426
+ **Parameters:**
427
+
428
+ - `$force` (bool): Whether to force receipt number creation (default `false`)
429
+
430
+ **Returns:** `bool` — Whether to generate a receipt number regardless of payment status
431
+
432
+ **Source:** `app/Models/Order.php:52`
433
+
434
+ **Usage:**
435
+
436
+ ```
437
+ add_filter('fluent_cart/create_receipt_number_on_order_create', function ($force) {
438
+ // Always create a receipt number when an order is created
439
+ return true;
440
+ }, 10, 1);
441
+ ```
442
+
443
+ ### ` single_order_downloads `
444
+
445
+ `fluent_cart/single_order_downloads` — Filter order downloads data
446
+
447
+ **When it runs:** Applied when preparing the downloadable files for a specific order, allowing you to add, remove, or modify download data.
448
+
449
+ **Parameters:**
450
+
451
+ - `$downloadData` (array): Array of download groups
452
+
453
+ ```
454
+ $downloadData = [
455
+ [
456
+ 'title' => 'Product Name - Variation Title',
457
+ 'product_id' => 123,
458
+ 'variation_id' => 456,
459
+ 'additional_html' => '',
460
+ 'downloads' => [
461
+ ['id' => 1, 'name' => 'File Name', 'url' => '...']
462
+ ]
463
+ ]
464
+ ];
465
+ ```
466
+
467
+ - `$context` (array): Context data
468
+
469
+ ```
470
+ $context = [
471
+ 'order' => Order, // The Order model instance
472
+ 'scope' => 'admin' // 'admin' or 'customer'
473
+ ];
474
+ ```
475
+
476
+ **Returns:** `array` — The modified download data array
477
+
478
+ **Source:** `app/Models/Order.php:1044`
479
+
480
+ **Usage:**
481
+
482
+ ```
483
+ add_filter('fluent_cart/single_order_downloads', function ($downloadData, $context) {
484
+ // Add a bonus download for completed orders
485
+ if ($context['order']->status === 'completed') {
486
+ $downloadData[] = [
487
+ 'title' => 'Bonus Content',
488
+ 'downloads' => [
489
+ ['name' => 'Bonus File', 'url' => 'https://example.com/bonus.pdf']
490
+ ]
491
+ ];
492
+ }
493
+ return $downloadData;
494
+ }, 10, 2);
495
+ ```
496
+
497
+ ### ` order_can_be_deleted `
498
+
499
+ `fluent_cart/order_can_be_deleted` — Filter whether an order can be deleted
500
+
501
+ **When it runs:** Applied when checking if an order is eligible for deletion. By default, orders with active subscriptions cannot be deleted.
502
+
503
+ **Parameters:**
504
+
505
+ - `$canBeDeleted` (true|WP_Error): `true` if deletable, or a `WP_Error` with the reason
506
+ - `$context` (array): Context data
507
+
508
+ ```
509
+ $context = [
510
+ 'order' => Order // The Order model instance
511
+ ];
512
+ ```
513
+
514
+ **Returns:** `true|WP_Error` — `true` to allow deletion, or `WP_Error` to block it
515
+
516
+ **Source:** `app/Models/Order.php:1250`
517
+
518
+ **Usage:**
519
+
520
+ ```
521
+ add_filter('fluent_cart/order_can_be_deleted', function ($canBeDeleted, $context) {
522
+ $order = $context['order'];
523
+ // Prevent deletion of orders less than 30 days old
524
+ if (strtotime($order->created_at) > strtotime('-30 days')) {
525
+ return new \WP_Error('too_recent', __('Orders less than 30 days old cannot be deleted.', 'my-plugin'));
526
+ }
527
+ return $canBeDeleted;
528
+ }, 10, 2);
529
+ ```
530
+
531
+ ### ` min_receipt_number `
532
+
533
+ `fluent_cart/min_receipt_number` — Filter the minimum receipt number
534
+
535
+ **When it runs:** Applied when calculating the next receipt number. If the computed next number is below this minimum, it will be bumped up.
536
+
537
+ **Parameters:**
538
+
539
+ - `$min` (int): The minimum receipt number from store settings (default `1`)
540
+
541
+ **Returns:** `int` — The minimum receipt number to enforce
542
+
543
+ **Source:** `app/Services/OrderService.php:590`
544
+
545
+ **Usage:**
546
+
547
+ ```
548
+ add_filter('fluent_cart/min_receipt_number', function ($min) {
549
+ // Start receipt numbers from 1000
550
+ return 1000;
551
+ }, 10, 1);
552
+ ```
553
+
554
+ ### ` invoice_prefix `
555
+
556
+ `fluent_cart/invoice_prefix` — Filter the invoice number prefix
557
+
558
+ **When it runs:** Applied when generating the invoice number string for new orders. The invoice number is formed as `prefix + receipt_number`.
559
+
560
+ **Parameters:**
561
+
562
+ - `$prefix` (string): The invoice prefix from store settings (default `'INV-'`)
563
+
564
+ **Returns:** `string` — The modified invoice prefix
565
+
566
+ **Source:** `app/Services/OrderService.php:602`
567
+
568
+ **Usage:**
569
+
570
+ ```
571
+ add_filter('fluent_cart/invoice_prefix', function ($prefix) {
572
+ // Use a year-based prefix
573
+ return 'INV-' . date('Y') . '-';
574
+ }, 10, 1);
575
+ ```
576
+
577
+ ### ` order_refund_manually `
578
+
579
+ `fluent_cart/order_refund_manually` — Intercept manual refund processing
580
+
581
+ **When it runs:** Applied during the refund process before the payment gateway refund method is called. Allows you to handle refunds through a custom mechanism instead of the gateway. Not applied when the admin records the refund locally only (`force_local`), because no money moves through FluentCart then.
582
+
583
+ **Parameters:**
584
+
585
+ - `$manualRefund` (array): Manual refund status
586
+
587
+ ```
588
+ $manualRefund = [
589
+ 'status' => 'no', // 'yes' to skip gateway refund
590
+ 'source' => '' // Identifier for the manual refund source
591
+ ];
592
+ ```
593
+
594
+ - `$context` (array): Refund context data
595
+
596
+ ```
597
+ $context = [
598
+ 'refund_amount' => 5000, // Amount in cents
599
+ 'transaction' => Transaction, // OrderTransaction model
600
+ 'order' => Order, // Order model
601
+ 'args' => ['reason' => ''] // Additional refund arguments
602
+ ];
603
+ ```
604
+
605
+ **Returns:** `array` — Array with `'status'` key set to `'yes'` to skip the gateway refund
606
+
607
+ **Source:** `app/Services/Payments/Refund.php:65`
608
+
609
+ **Usage:**
610
+
611
+ ```
612
+ add_filter('fluent_cart/order_refund_manually', function ($manualRefund, $context) {
613
+ // Handle refund via a custom service
614
+ $result = my_custom_refund($context['transaction'], $context['refund_amount']);
615
+ if ($result) {
616
+ return ['status' => 'yes', 'source' => 'my_custom_service'];
617
+ }
618
+ return $manualRefund;
619
+ }, 10, 2);
620
+ ```
621
+
622
+ ### ` transaction/max_refundable_amount `
623
+
624
+ `fluent_cart/transaction/max_refundable_amount` — Filter the maximum amount that can still be refunded on a transaction
625
+
626
+ **When it runs:** Applied on the [`OrderTransaction`](/database/models/order-transaction.md) model when computing how much of a transaction is still refundable. The base amount is the transaction's total minus what has already been refunded. **Note:** the filtered value is clamped by the caller to `[0, $baseAmount]` — a value greater than the base amount you were passed is silently capped back down, so this filter can only shrink the refundable amount, never grow it beyond what's actually left on the transaction.
627
+
628
+ **Parameters:**
629
+
630
+ - `$baseAmount` (int): The unfiltered max refundable amount in cents (`total - refunded_total`)
631
+ - `$transaction` ([OrderTransaction](/database/models/order-transaction.md)): The transaction instance (`$this`)
632
+
633
+ **Returns:** `int` — The (possibly reduced) max refundable amount in cents; automatically clamped to `[0, $baseAmount]`
634
+
635
+ **Source:** `app/Models/OrderTransaction.php:188`
636
+
637
+ **Usage:**
638
+
639
+ ```
640
+ add_filter('fluent_cart/transaction/max_refundable_amount', function ($baseAmount, $transaction) {
641
+ // Hold back a $1 processing fee from what support can refund
642
+ return max(0, $baseAmount - 100);
643
+ }, 10, 2);
644
+ ```
645
+
646
+ ### ` order_status/auto_complete_digital_order `
647
+
648
+ `fluent_cart/order_status/auto_complete_digital_order` — Control auto-completion of digital orders
649
+
650
+ **When it runs:** Applied during payment status reconciliation. When a digital (non-physical) order is paid, it is automatically marked as completed. Return `false` to prevent this behavior.
651
+
652
+ **Parameters:**
653
+
654
+ - `$autoComplete` (bool): Whether to auto-complete the order (default `true`)
655
+ - `$context` (array): Context data
656
+
657
+ ```
658
+ $context = [
659
+ 'order' => Order // The Order model instance
660
+ ];
661
+ ```
662
+
663
+ **Returns:** `bool` — Whether to automatically complete the digital order
664
+
665
+ **Source:** `app/Helpers/StatusHelper.php:281`
666
+
667
+ **Usage:**
668
+
669
+ ```
670
+ add_filter('fluent_cart/order_status/auto_complete_digital_order', function ($autoComplete, $context) {
671
+ // Require manual review for high-value digital orders
672
+ if ($context['order']->total > 50000) { // > $500
673
+ return false;
674
+ }
675
+ return $autoComplete;
676
+ }, 10, 2);
677
+ ```
678
+
679
+ ### ` customer/order_data `
680
+
681
+ `fluent_cart/customer/order_data` — Filter customer portal order data
682
+
683
+ **When it runs:** Applied when preparing order data for display in the customer-facing order details page.
684
+
685
+ **Parameters:**
686
+
687
+ - `$formattedOrderData` (array): The formatted order data array
688
+ - `$context` (array): Context data
689
+
690
+ ```
691
+ $context = [
692
+ 'order' => Order, // The Order model instance
693
+ 'customer' => Customer // The Customer model instance
694
+ ];
695
+ ```
696
+
697
+ **Returns:** `array` — The modified formatted order data
698
+
699
+ **Source:** `app/Http/Controllers/FrontendControllers/CustomerOrderController.php:337`
700
+
701
+ **Usage:**
702
+
703
+ ```
704
+ add_filter('fluent_cart/customer/order_data', function ($formattedOrderData, $context) {
705
+ // Add custom data visible to customers
706
+ $formattedOrderData['estimated_delivery'] = get_post_meta(
707
+ $context['order']->id, '_estimated_delivery', true
708
+ );
709
+ return $formattedOrderData;
710
+ }, 10, 2);
711
+ ```
712
+
713
+ ### ` customer/order_details_section_parts `
714
+
715
+ `fluent_cart/customer/order_details_section_parts` — Filter customer order detail sections
716
+
717
+ **When it runs:** Applied when building the customer-facing order details page. Allows you to inject custom HTML content into predefined section slots.
718
+
719
+ **Parameters:**
720
+
721
+ - `$sections` (array): HTML content for each section slot
722
+
723
+ ```
724
+ $sections = [
725
+ 'before_summary' => '',
726
+ 'after_summary' => '',
727
+ 'after_licenses' => '',
728
+ 'after_subscriptions' => '',
729
+ 'after_downloads' => '',
730
+ 'after_transactions' => '',
731
+ 'end_of_order' => '',
732
+ ];
733
+ ```
734
+
735
+ - `$context` (array): Context data
736
+
737
+ ```
738
+ $context = [
739
+ 'order' => Order, // The Order model instance
740
+ 'formattedData' => [...] // The formatted order data array
741
+ ];
742
+ ```
743
+
744
+ **Returns:** `array` — The modified sections array with HTML content
745
+
746
+ **Source:** `app/Http/Controllers/FrontendControllers/CustomerOrderController.php:344`
747
+
748
+ **Usage:**
749
+
750
+ ```
751
+ add_filter('fluent_cart/customer/order_details_section_parts', function ($sections, $context) {
752
+ $sections['after_summary'] = '<div class="custom-notice">Thank you for your order!</div>';
753
+ return $sections;
754
+ }, 10, 2);
755
+ ```
756
+
757
+ ### ` order/custom_item_changed `
758
+
759
+ `fluent_cart/order/custom_item_changed` — Filter a custom order item's data before it's saved from the order edit screen
760
+
761
+ **When it runs:** Applied in `OrderItemResource` when an admin edits a **custom** (product + variation, non-catalog) line item on the order edit screen. The result is cast to an array and only a fixed set of keys (`id`, `quantity`, `unit_price`, `cost`, `subtotal`, `tax_amount`, `discount_total`, `line_total`, `shipping_charge`) is kept from it — anything else you add is dropped.
762
+
763
+ **Parameters:**
764
+
765
+ - `$oldItem` (array|object): The existing order item row before this edit (matched by `object_id` = variation ID)
766
+ - `$item` (array): The incoming edited item payload from the request
767
+
768
+ **Returns:** `array` — The item data to persist; only the keys listed above are used. Amounts (`unit_price`, `cost`, `subtotal`, `tax_amount`, `discount_total`, `line_total`, `shipping_charge`) are in cents.
769
+
770
+ **Source:** `api/Resource/OrderItemResource.php:282`
771
+
772
+ **Usage:**
773
+
774
+ ```
775
+ add_filter('fluent_cart/order/custom_item_changed', function ($oldItem, $item) {
776
+ // Never let a custom item's unit price go negative
777
+ $item['unit_price'] = max(0, (int) $item['unit_price']);
778
+ return $item;
779
+ }, 10, 2);
780
+ ```
781
+
782
+ ### ` order/delete_test_orders_batch_size `
783
+
784
+ `fluent_cart/order/delete_test_orders_batch_size` — Filter the batch size for the "delete all test orders" bulk action
785
+
786
+ **When it runs:** Applied at the start of `OrderController::handleDeleteTestOrdersBulkAction()`, before querying which test orders to delete in this batch. The admin UI calls this endpoint repeatedly (paging by `last_order_id`) until all test orders are gone; this filter controls how many are deleted per request.
787
+
788
+ **Parameters:**
789
+
790
+ - `$batchSize` (int): The batch size (default `50`); the filtered result is floored to a minimum of `1`
791
+
792
+ **Returns:** `int` — The number of test orders to delete per request
793
+
794
+ **Source:** `app/Http/Controllers/OrderController.php:955`
795
+
796
+ **Usage:**
797
+
798
+ ```
799
+ add_filter('fluent_cart/order/delete_test_orders_batch_size', function ($batchSize) {
800
+ // Smaller batches on a resource-constrained host
801
+ return 20;
802
+ }, 10, 1);
803
+ ```
804
+
805
+ ### ` order/should_restore_stock_on_delete `
806
+
807
+ `fluent_cart/order/should_restore_stock_on_delete` — Filter whether deleting an order restores its reserved/sold stock
808
+
809
+ **When it runs:** Applied in `OrderDeleting::shouldRestoreStockOnOrderDelete()` when an order is being permanently deleted. By default, stock is only restored automatically when the order being deleted is a **test-mode** order — deleting a live order does not touch stock unless you opt in here.
810
+
811
+ **Parameters:**
812
+
813
+ - `$shouldRestore` (bool): Whether to restore stock; default is `true` only when the order is in test mode
814
+ - `$order` ([Order](/database/models/order.md)): The order being deleted (`$event->order`)
815
+ - `$eventData` (array): The full `OrderDeletingEvent` payload as an array
816
+
817
+ **Returns:** `bool` — Whether to restore stock for the items on this order as part of the delete
818
+
819
+ **Source:** `app/Listeners/Order/OrderDeleting.php:89`
820
+
821
+ **Usage:**
822
+
823
+ ```
824
+ add_filter('fluent_cart/order/should_restore_stock_on_delete', function ($shouldRestore, $order, $eventData) {
825
+ // Also restore stock when deleting canceled live orders
826
+ if ($order->status === 'canceled') {
827
+ return true;
828
+ }
829
+ return $shouldRestore;
830
+ }, 10, 3);
831
+ ```
832
+
833
+ ---
834
+
835
+ ## Payment Processing
836
+
837
+ ### ` ipn_url_{$slug} `
838
+
839
+ `fluent_cart/ipn_url_{$slug}` — Filter IPN/webhook listener URL for a payment gateway
840
+
841
+ **When it runs:** Applied by `PaymentHelper::listenerUrl()` when building the IPN/webhook listener URL for a payment gateway. `{$slug}` is the gateway slug (e.g. `stripe`, `paypal`).
842
+
843
+ **Parameters:**
844
+
845
+ - `$data` (array): Array containing the listener URL
846
+
847
+ ```
848
+ $data = [
849
+ 'listener_url' => 'https://yoursite.com/?fct_payment_listener=1&method=stripe'
850
+ ];
851
+ ```
852
+
853
+ **Returns:** `array` — The modified URL data array
854
+
855
+ **Source:** `app/Services/Payments/PaymentHelper.php:27`
856
+
857
+ **Usage:**
858
+
859
+ ```
860
+ add_filter('fluent_cart/ipn_url_stripe', function ($data) {
861
+ $data['listener_url'] = home_url('/custom-stripe-webhook/');
862
+ return $data;
863
+ }, 10, 1);
864
+ ```
865
+
866
+ ### ` payment/validate_custom_item `
867
+
868
+ `fluent_cart/payment/validate_custom_item` — Filter/validate the product and variation resolved for a custom order item during payment
869
+
870
+ **When it runs:** Applied in `ProductItemService` while resolving a **custom** (externally-priced) order item's product and variation objects during payment processing. Returning anything other than an object for either the product or the variation causes the item to be rejected — the caller treats it as invalid and stops processing it.
871
+
872
+ **Parameters:**
873
+
874
+ - `$productVariationPair` (array): Two-element array `[$product, $variation]` — `$variation` starts as a synthetic object built from the order item, with `id` set to the item's `object_id`
875
+ - `$data` (array): The raw custom item data being validated
876
+
877
+ **Returns:** `array` — `[$product, $variation]`; both elements must be objects or the item is treated as invalid
878
+
879
+ **Source:** `app/Services/ProductItemService.php:53`
880
+
881
+ **Usage:**
882
+
883
+ ```
884
+ add_filter('fluent_cart/payment/validate_custom_item', function ($pair, $data) {
885
+ [$product, $variation] = $pair;
886
+ // Reject custom items over $10,000 (stored in cents)
887
+ if ($variation && $variation->item_price > 1000000) {
888
+ return [null, null];
889
+ }
890
+ return [$product, $variation];
891
+ }, 10, 2);
892
+ ```
893
+
894
+ ### ` payment/success_url `
895
+
896
+ `fluent_cart/payment/success_url` — Filter the payment success redirect URL
897
+
898
+ **When it runs:** Applied when generating the URL the customer is redirected to after a successful payment, just before the redirect is issued.
899
+
900
+ **Parameters:**
901
+
902
+ - `$url` (string): The success redirect URL (receipt page with query args already appended)
903
+ - `$context` (array): Context data
904
+
905
+ ```
906
+ $context = [
907
+ 'transaction_hash' => 'abc123...', // Transaction UUID
908
+ 'args' => [], // Additional arguments
909
+ 'payment_method' => 'stripe', // Gateway slug
910
+ 'transaction' => $transaction, // \FluentCart\App\Models\OrderTransaction|null
911
+ 'order' => $order, // \FluentCart\App\Models\Order|null
912
+ ];
913
+ ```
914
+
915
+ **Returns:** `string` — The modified success URL
916
+
917
+ **Source:** `app/Services/Payments/PaymentHelper.php:69`
918
+
919
+ **Usage:**
920
+
921
+ ```
922
+ add_filter('fluent_cart/payment/success_url', function ($url, $context) {
923
+ // Redirect to a custom thank-you page
924
+ return add_query_arg('trx_hash', $context['transaction_hash'], home_url('/thank-you/'));
925
+ }, 10, 2);
926
+ ```
927
+
928
+ ### ` default_payment_method_for_zero_payment `
929
+
930
+ `fluent_cart/default_payment_method_for_zero_payment` — Filter the default payment method for zero-total orders
931
+
932
+ **When it runs:** Applied during checkout validation when the order total (including recurring) is zero. Determines which payment method handles the $0 transaction.
933
+
934
+ **Parameters:**
935
+
936
+ - `$method` (string): Payment method slug (default `'offline_payment'`)
937
+ - `$data` (array): Additional context data (empty array)
938
+
939
+ **Returns:** `string` — The payment method slug to use for zero-total orders
940
+
941
+ **Source:** `app/Services/Payments/PaymentHelper.php:90`
942
+
943
+ **Usage:**
944
+
945
+ ```
946
+ add_filter('fluent_cart/default_payment_method_for_zero_payment', function ($method, $data) {
947
+ // Use Stripe for free trials that have recurring charges
948
+ return 'stripe';
949
+ }, 10, 2);
950
+ ```
951
+
952
+ ### ` get_payment_connect_info_{$method} `
953
+
954
+ `fluent_cart/get_payment_connect_info_{$method}` — Filter payment method connection info
955
+
956
+ **When it runs:** Applied when retrieving connection/setup information for a specific payment method. The `{$method}` is the sanitized gateway slug. Used by gateways that require an OAuth connection flow.
957
+
958
+ **Parameters:**
959
+
960
+ - `$info` (array): Connection info array (default empty)
961
+ - `$data` (array): Additional context data (empty array)
962
+
963
+ **Returns:** `array` — The payment method connection information
964
+
965
+ **Source:** `api/PaymentMethods.php:105`
966
+
967
+ **Usage:**
968
+
969
+ ```
970
+ add_filter('fluent_cart/get_payment_connect_info_stripe', function ($info, $data) {
971
+ $info['connected'] = true;
972
+ $info['account_id'] = 'acct_xxx';
973
+ return $info;
974
+ }, 10, 2);
975
+ ```
976
+
977
+ ### ` transaction/url_{$payment_method} `
978
+
979
+ `fluent_cart/transaction/url_{$payment_method}` — Filter the vendor dashboard URL for a transaction
980
+
981
+ **When it runs:** Applied when generating the URL attribute of an [`OrderTransaction`](/database/models/order-transaction.md) model. The `{$payment_method}` is the gateway slug. This URL typically links to the transaction in the payment provider's dashboard.
982
+
983
+ **Parameters:**
984
+
985
+ - `$url` (string): The vendor URL (default empty string)
986
+ - `$context` (array): Context data
987
+
988
+ ```
989
+ $context = [
990
+ 'transaction' => OrderTransaction, // The transaction model
991
+ 'payment_mode' => 'live', // 'live' or 'test'
992
+ 'vendor_charge_id' => 'ch_xxx', // External charge ID
993
+ 'transaction_type' => 'charge' // Transaction type
994
+ ];
995
+ ```
996
+
997
+ **Returns:** `string` — The URL to the transaction in the payment provider's dashboard
998
+
999
+ **Source:** `app/Models/OrderTransaction.php:129`
1000
+
1001
+ **Usage:**
1002
+
1003
+ ```
1004
+ add_filter('fluent_cart/transaction/url_stripe', function ($url, $context) {
1005
+ $chargeId = $context['vendor_charge_id'];
1006
+ $mode = $context['payment_mode'] === 'test' ? 'test/' : '';
1007
+ return "https://dashboard.stripe.com/{$mode}payments/{$chargeId}";
1008
+ }, 10, 2);
1009
+ ```
1010
+
1011
+ ### ` fluent_cart/transaction/receipt_page_url `
1012
+
1013
+ `fluent_cart/transaction/receipt_page_url` — Filter the transaction receipt page URL
1014
+
1015
+ **When it runs:** Applied when generating the public-facing receipt page URL for a transaction, typically used in email notifications and customer-facing links.
1016
+
1017
+ **Parameters:**
1018
+
1019
+ - `$url` (string): The receipt page URL with `trx_hash` query parameter
1020
+ - `$context` (array): Context data
1021
+
1022
+ ```
1023
+ $context = [
1024
+ 'transaction' => OrderTransaction, // The transaction model
1025
+ 'order' => Order // The parent order model
1026
+ ];
1027
+ ```
1028
+
1029
+ **Returns:** `string` — The modified receipt page URL
1030
+
1031
+ **Source:** `app/Models/OrderTransaction.php:219`
1032
+
1033
+ **Usage:**
1034
+
1035
+ ```
1036
+ add_filter('fluent_cart/transaction/receipt_page_url', function ($url, $context) {
1037
+ // Use a custom receipt page
1038
+ return add_query_arg('trx_hash', $context['transaction']->uuid, home_url('/my-receipt/'));
1039
+ }, 10, 2);
1040
+ ```
1041
+
1042
+ ### ` pdf/can_generate_receipt `
1043
+
1044
+ `fluent_cart/pdf/can_generate_receipt` — Filter whether PDF receipt generation is available
1045
+
1046
+ **When it runs:** Applied in `OrderService::canGenerateReceiptPdf()`, a capability check used by the UI (e.g. a "Download PDF" button) and by callers before attempting `fluent_cart/pdf/generate_receipt`. The default is `true` only when FluentCart Pro is active **and** the FluentPDF plugin is loaded.
1047
+
1048
+ **Parameters:**
1049
+
1050
+ - `$canGenerate` (bool): Whether PDF receipt generation is available, before filtering
1051
+
1052
+ **Returns:** `bool` — Whether to advertise/allow PDF receipt generation
1053
+
1054
+ **Source:** `app/Services/OrderService.php:688`
1055
+
1056
+ **Usage:**
1057
+
1058
+ ```
1059
+ add_filter('fluent_cart/pdf/can_generate_receipt', function ($canGenerate) {
1060
+ // Enable PDF receipts via a custom generator, without FluentPDF
1061
+ return true;
1062
+ }, 10, 1);
1063
+ ```
1064
+
1065
+ ### ` pdf/generate_receipt `
1066
+
1067
+ `fluent_cart/pdf/generate_receipt` — Generate (or return the path to) a PDF receipt for an order
1068
+
1069
+ **When it runs:** Applied wherever FluentCart needs an actual PDF file for an order's receipt: when a customer downloads their receipt as a PDF (`ReceiptHandler`), and when an email notification attaches the receipt PDF (`EmailNotificationMailer`). Core passes `null` and relies entirely on a listener (normally FluentCart Pro + FluentPDF) to generate the file and return its local path; see `fluent_cart/pdf/can_generate_receipt` to check availability first.
1070
+
1071
+ **Parameters:**
1072
+
1073
+ - `$pdfPath` (string|null): The generated PDF's local file path; `null` until a listener supplies one
1074
+ - `$context` (array): Context data
1075
+
1076
+ ```
1077
+ $context = [
1078
+ 'order' => $order, // \FluentCart\App\Models\Order
1079
+ 'template_id' => 'order_receipt', // string — the PDF template to use (varies by call site)
1080
+ ];
1081
+ ```
1082
+
1083
+ **Returns:** `string|null` — The absolute local path to the generated PDF, or `null` if generation isn't available
1084
+
1085
+ **Source:**
1086
+
1087
+ - `app/Hooks/Handlers/ShortCodes/ReceiptHandler.php:98` (customer-facing PDF download)
1088
+ - `app/Services/Email/EmailNotificationMailer.php:435` (email attachment)
1089
+
1090
+ **Usage:**
1091
+
1092
+ ```
1093
+ add_filter('fluent_cart/pdf/generate_receipt', function ($pdfPath, $context) {
1094
+ $order = $context['order'];
1095
+ return my_plugin_generate_receipt_pdf($order, $context['template_id']);
1096
+ }, 10, 2);
1097
+ ```
1098
+
1099
+ ---
1100
+
1101
+ ## Stripe
1102
+
1103
+ ### ` stripe_settings `
1104
+
1105
+ `fluent_cart/stripe_settings` — Filter Stripe gateway settings
1106
+
1107
+ **When it runs:** Applied when loading Stripe gateway settings during initialization.
1108
+
1109
+ **Parameters:**
1110
+
1111
+ - `$settings` (array): The Stripe settings array including keys, modes, and configuration options
1112
+
1113
+ **Returns:** `array` — The modified Stripe settings
1114
+
1115
+ **Source:** `app/Modules/PaymentMethods/StripeGateway/StripeSettingsBase.php:38`
1116
+
1117
+ **Usage:**
1118
+
1119
+ ```
1120
+ add_filter('fluent_cart/stripe_settings', function ($settings) {
1121
+ // Force test mode in staging environments
1122
+ if (wp_get_environment_type() === 'staging') {
1123
+ $settings['payment_mode'] = 'test';
1124
+ }
1125
+ return $settings;
1126
+ }, 10, 1);
1127
+ ```
1128
+
1129
+ ### ` payments/stripe_metadata_subscription `
1130
+
1131
+ `fluent_cart/payments/stripe_metadata_subscription` — Filter Stripe subscription metadata
1132
+
1133
+ **When it runs:** Applied when creating a Stripe subscription, allowing you to add or modify metadata sent to Stripe's subscription object.
1134
+
1135
+ **Parameters:**
1136
+
1137
+ - `$metadata` (array): The metadata array for the Stripe subscription
1138
+
1139
+ ```
1140
+ $metadata = [
1141
+ 'fct_ref_id' => 'order-uuid',
1142
+ 'email' => '[email&#160;protected]',
1143
+ 'name' => 'Customer Name',
1144
+ 'subscription_item' => 'Product Name',
1145
+ 'order_reference' => 'fct_order_id_123',
1146
+ ];
1147
+ ```
1148
+
1149
+ - `$context` (array): Context data
1150
+
1151
+ ```
1152
+ $context = [
1153
+ 'order' => Order, // Order model
1154
+ 'transaction' => Transaction, // OrderTransaction model
1155
+ 'subscription' => Subscription // Subscription model
1156
+ ];
1157
+ ```
1158
+
1159
+ **Returns:** `array` — The modified metadata array (max 50 keys per Stripe limits)
1160
+
1161
+ **Source:** `app/Modules/PaymentMethods/StripeGateway/Processor.php:129`
1162
+
1163
+ **Usage:**
1164
+
1165
+ ```
1166
+ add_filter('fluent_cart/payments/stripe_metadata_subscription', function ($metadata, $context) {
1167
+ $metadata['affiliate_id'] = get_user_meta($context['order']->customer->user_id, 'affiliate_id', true);
1168
+ return $metadata;
1169
+ }, 10, 2);
1170
+ ```
1171
+
1172
+ ### ` payments/stripe_metadata_onetime `
1173
+
1174
+ `fluent_cart/payments/stripe_metadata_onetime` — Filter Stripe one-time payment metadata
1175
+
1176
+ **When it runs:** Applied when creating a Stripe payment intent for a one-time (non-subscription) payment.
1177
+
1178
+ **Parameters:**
1179
+
1180
+ - `$metadata` (array): The metadata array for the Stripe payment intent
1181
+
1182
+ ```
1183
+ $metadata = [
1184
+ 'fct_ref_id' => 'order-uuid',
1185
+ 'Name' => 'Customer Name',
1186
+ 'Email' => '[email&#160;protected]',
1187
+ 'order_reference' => 'fct_order_id_123',
1188
+ ];
1189
+ ```
1190
+
1191
+ - `$context` (array): Context data
1192
+
1193
+ ```
1194
+ $context = [
1195
+ 'order' => Order, // Order model
1196
+ 'transaction' => Transaction // OrderTransaction model
1197
+ ];
1198
+ ```
1199
+
1200
+ **Returns:** `array` — The modified metadata array (max 50 keys per Stripe limits)
1201
+
1202
+ **Source:** `app/Modules/PaymentMethods/StripeGateway/Processor.php:221`
1203
+
1204
+ **Usage:**
1205
+
1206
+ ```
1207
+ add_filter('fluent_cart/payments/stripe_metadata_onetime', function ($metadata, $context) {
1208
+ $metadata['campaign'] = 'spring_sale_2025';
1209
+ if (isset($context['order'])) {
1210
+ $metadata['customer_id'] = $context['order']->customer_id;
1211
+ }
1212
+ return $metadata;
1213
+ }, 10, 2);
1214
+ ```
1215
+
1216
+ ### ` payments/stripe_onetime_intent_args `
1217
+
1218
+ `fluent_cart/payments/stripe_onetime_intent_args` — Filter Stripe payment intent arguments
1219
+
1220
+ **When it runs:** Applied after building the full payment intent data array, just before creating the intent via the Stripe API. This is the last chance to modify intent parameters.
1221
+
1222
+ **Parameters:**
1223
+
1224
+ - `$intentData` (array): The payment intent arguments
1225
+
1226
+ ```
1227
+ $intentData = [
1228
+ 'amount' => 5000, // In smallest currency unit
1229
+ 'currency' => 'usd',
1230
+ 'automatic_payment_methods' => ['enabled' => 'true'],
1231
+ 'metadata' => [...],
1232
+ 'customer' => 'cus_xxx',
1233
+ ];
1234
+ ```
1235
+
1236
+ - `$context` (array): Context data
1237
+
1238
+ ```
1239
+ $context = [
1240
+ 'order' => Order, // Order model
1241
+ 'transaction' => Transaction // OrderTransaction model
1242
+ ];
1243
+ ```
1244
+
1245
+ **Returns:** `array` — The modified payment intent arguments
1246
+
1247
+ **Source:** `app/Modules/PaymentMethods/StripeGateway/Processor.php:664`
1248
+
1249
+ **Usage:**
1250
+
1251
+ ```
1252
+ add_filter('fluent_cart/payments/stripe_onetime_intent_args', function ($intentData, $context) {
1253
+ // Add a statement descriptor
1254
+ $intentData['statement_descriptor_suffix'] = 'Order ' . $context['order']->id;
1255
+ return $intentData;
1256
+ }, 10, 2);
1257
+ ```
1258
+
1259
+ ### ` payments/stripe_checkout_session_args `
1260
+
1261
+ `fluent_cart/payments/stripe_checkout_session_args` — Filter Stripe Checkout session arguments (one-time)
1262
+
1263
+ **When it runs:** Applied when creating a Stripe Checkout session for one-time (non-subscription) hosted payments.
1264
+
1265
+ **Parameters:**
1266
+
1267
+ - `$sessionData` (array): The Checkout session arguments
1268
+
1269
+ ```
1270
+ $sessionData = [
1271
+ 'customer' => 'cus_xxx',
1272
+ 'client_reference_id' => 'order-uuid',
1273
+ 'line_items' => [...],
1274
+ 'mode' => 'payment',
1275
+ 'success_url' => '...',
1276
+ 'cancel_url' => '...',
1277
+ 'metadata' => [...],
1278
+ ];
1279
+ ```
1280
+
1281
+ - `$context` (array): Context data
1282
+
1283
+ ```
1284
+ $context = [
1285
+ 'order' => Order, // Order model
1286
+ 'transaction' => Transaction // OrderTransaction model
1287
+ ];
1288
+ ```
1289
+
1290
+ **Returns:** `array` — The modified Checkout session arguments
1291
+
1292
+ **Source:** `app/Modules/PaymentMethods/StripeGateway/Processor.php:356`
1293
+
1294
+ **Usage:**
1295
+
1296
+ ```
1297
+ add_filter('fluent_cart/payments/stripe_checkout_session_args', function ($sessionData, $context) {
1298
+ // Enable promotion codes on the Checkout page
1299
+ $sessionData['allow_promotion_codes'] = true;
1300
+ return $sessionData;
1301
+ }, 10, 2);
1302
+ ```
1303
+
1304
+ ### ` payments/stripe_subscription_checkout_session_args `
1305
+
1306
+ `fluent_cart/payments/stripe_subscription_checkout_session_args` — Filter Stripe Checkout session arguments (subscription)
1307
+
1308
+ **When it runs:** Applied when creating a Stripe Checkout session for subscription-based hosted payments.
1309
+
1310
+ **Parameters:**
1311
+
1312
+ - `$sessionData` (array): The Checkout session arguments
1313
+
1314
+ ```
1315
+ $sessionData = [
1316
+ 'customer' => 'cus_xxx',
1317
+ 'client_reference_id' => 'order-uuid',
1318
+ 'line_items' => [...],
1319
+ 'mode' => 'subscription',
1320
+ 'success_url' => '...',
1321
+ 'cancel_url' => '...',
1322
+ 'subscription_data' => ['metadata' => [...]],
1323
+ 'metadata' => [...],
1324
+ ];
1325
+ ```
1326
+
1327
+ - `$context` (array): Context data
1328
+
1329
+ ```
1330
+ $context = [
1331
+ 'order' => Order, // Order model
1332
+ 'transaction' => Transaction, // OrderTransaction model
1333
+ 'subscription' => Subscription // Subscription model
1334
+ ];
1335
+ ```
1336
+
1337
+ **Returns:** `array` — The modified Checkout session arguments
1338
+
1339
+ **Source:** `app/Modules/PaymentMethods/StripeGateway/Processor.php:976`
1340
+
1341
+ **Usage:**
1342
+
1343
+ ```
1344
+ add_filter('fluent_cart/payments/stripe_subscription_checkout_session_args', function ($sessionData, $context) {
1345
+ // Add tax ID collection
1346
+ $sessionData['tax_id_collection'] = ['enabled' => true];
1347
+ return $sessionData;
1348
+ }, 10, 2);
1349
+ ```
1350
+
1351
+ ### ` stripe/client_setup_future_usage `
1352
+
1353
+ `fluent_cart/stripe/client_setup_future_usage` — Filter the client-side `setup_future_usage` value for a Stripe PaymentIntent
1354
+
1355
+ **When it runs:** Applied when building the **client-side** PaymentIntent update data for Stripe Elements. **Important:** whatever value this filter resolves to must also be matched on the server-side PaymentIntent built by `fluent_cart/payments/stripe_onetime_intent_args` at place-order time — a mismatch causes Stripe to reject the confirmation. A falsy return removes `setup_future_usage` from the intent entirely.
1356
+
1357
+ **Parameters:**
1358
+
1359
+ - `$setupFutureUsage` (string|null): The current `setup_future_usage` value (e.g. `'off_session'`, `'on_session'`), read from the intent data
1360
+ - `$context` (array): Context data
1361
+
1362
+ ```
1363
+ $context = [
1364
+ 'data' => $data, // array — the raw request data for the intent
1365
+ 'has_subscription' => $hasSubscription, // bool — whether the cart contains a subscription item
1366
+ ];
1367
+ ```
1368
+
1369
+ **Returns:** `string|null` — The `setup_future_usage` value to use, or a falsy value to omit it
1370
+
1371
+ **Source:** `app/Modules/PaymentMethods/StripeGateway/Stripe.php:851`
1372
+
1373
+ **Usage:**
1374
+
1375
+ ```
1376
+ add_filter('fluent_cart/stripe/client_setup_future_usage', function ($setupFutureUsage, $context) {
1377
+ // Always save the card on file when the cart has a subscription
1378
+ return $context['has_subscription'] ? 'off_session' : $setupFutureUsage;
1379
+ }, 10, 2);
1380
+ ```
1381
+
1382
+ ### ` stripe_idempotency_key `
1383
+
1384
+ `fluent_cart/stripe_idempotency_key` — Filter the Stripe idempotency key
1385
+
1386
+ **When it runs:** Applied to the generated idempotency key on Stripe charge requests. The result is sent as the `Idempotency-Key` request header.
1387
+
1388
+ **Parameters:**
1389
+
1390
+ - `$idempotency_key` (string): The generated idempotency key
1391
+ - `$context` (array): Context data
1392
+
1393
+ ```
1394
+ $context = [
1395
+ 'request' => $request, // array — the Stripe API request body
1396
+ ];
1397
+ ```
1398
+
1399
+ **Returns:** `string` — The idempotency key to send in the `Idempotency-Key` header
1400
+
1401
+ **Source:** `app/Modules/PaymentMethods/StripeGateway/API/ApiRequest.php:116`
1402
+
1403
+ **Usage:**
1404
+
1405
+ ```
1406
+ add_filter('fluent_cart/stripe_idempotency_key', function ($key, $context) {
1407
+ return 'fct_' . md5($key . time());
1408
+ }, 10, 2);
1409
+ ```
1410
+
1411
+ ### ` stripe_request_body `
1412
+
1413
+ `fluent_cart/stripe_request_body` — Filter the Stripe API request body
1414
+
1415
+ **When it runs:** Applied to the request body immediately before every request sent to the Stripe API.
1416
+
1417
+ **Parameters:**
1418
+
1419
+ - `$body` (array): The request body data
1420
+ - `$context` (array): Context data
1421
+
1422
+ ```
1423
+ $context = [
1424
+ 'api' => $api, // string — the Stripe API endpoint being called
1425
+ ];
1426
+ ```
1427
+
1428
+ **Returns:** `array` — The modified request body
1429
+
1430
+ **Source:** `app/Modules/PaymentMethods/StripeGateway/API/ApiRequest.php:127`
1431
+
1432
+ **Usage:**
1433
+
1434
+ ```
1435
+ add_filter('fluent_cart/stripe_request_body', function ($body, $context) {
1436
+ error_log('Stripe API call to: ' . $context['api']);
1437
+ return $body;
1438
+ }, 10, 2);
1439
+ ```
1440
+
1441
+ ### ` stripe_request_headers `
1442
+
1443
+ `fluent_cart_stripe_request_headers` — Filter the HTTP headers sent with every Stripe API request
1444
+
1445
+ **When it runs:** Applied each time a request is sent to the Stripe API — the header-level sibling of `fluent_cart/stripe_request_body`. Unlike most Stripe filters in this file, this one was never migrated to the `fluent_cart/` namespace and has no deprecated wrapper — it is the live, current hook name.
1446
+
1447
+ **Parameters:**
1448
+
1449
+ - `$headers` (array): The request headers
1450
+
1451
+ ```
1452
+ $headers = [
1453
+ 'Authorization' => 'Basic ' . base64_encode($secretKey . ':'),
1454
+ 'Stripe-Version' => '2020-08-27', // Stripe API version pinned by FluentCart
1455
+ 'User-Agent' => 'FluentCart/1.x (https://fluentcart.com)',
1456
+ 'X-Stripe-Client-User-Agent' => '{"name":"FluentCart",...}', // JSON-encoded user agent info
1457
+ ];
1458
+ ```
1459
+
1460
+ - `$data` (array): Additional context data (empty array)
1461
+
1462
+ **Returns:** `array` — The modified request headers
1463
+
1464
+ **Source:** `app/Modules/PaymentMethods/StripeGateway/API/ApiRequest.php:88`
1465
+
1466
+ **Usage:**
1467
+
1468
+ ```
1469
+ add_filter('fluent_cart_stripe_request_headers', function ($headers, $data) {
1470
+ // Route Stripe calls through a corporate outbound proxy that needs a custom header
1471
+ $headers['X-Forwarded-Via'] = 'my-proxy';
1472
+ return $headers;
1473
+ }, 10, 2);
1474
+ ```
1475
+
1476
+ ### ` form_disable_stripe_connect `
1477
+
1478
+ `fluent_cart/form_disable_stripe_connect` — Disable Stripe Connect provider option
1479
+
1480
+ **When it runs:** Applied when rendering the Stripe settings form. Return `true` to force manual API keys instead of Stripe Connect.
1481
+
1482
+ **Parameters:**
1483
+
1484
+ - `$disable` (bool): Whether to disable Stripe Connect (default `false`)
1485
+ - `$data` (array): Additional context data (empty array)
1486
+
1487
+ **Returns:** `bool` — `true` to disable Stripe Connect and force API keys mode
1488
+
1489
+ **Source:** `app/Modules/PaymentMethods/StripeGateway/Stripe.php:584`
1490
+
1491
+ **Usage:**
1492
+
1493
+ ```
1494
+ add_filter('fluent_cart/form_disable_stripe_connect', function ($disable, $data) {
1495
+ return true;
1496
+ }, 10, 2);
1497
+ ```
1498
+
1499
+ ### ` stripe_appearance `
1500
+
1501
+ `fluent_cart/stripe_appearance` — Style the embedded Stripe Payment Element
1502
+
1503
+ **When it runs:** Applied when the embedded checkout builds the Stripe Elements options, before the Payment Element is mounted. The element renders inside a Stripe-hosted iframe, so the store's stylesheet never reaches it — this filter is the only styling channel. The returned array is passed verbatim as the `appearance` option of `stripe.elements()`.
1504
+
1505
+ **Parameters:**
1506
+
1507
+ - `$appearance` (array): Full [Stripe Appearance API](https://docs.stripe.com/elements/appearance-api) object (defaults to `['theme' => 'stripe']`). Supported keys: `theme` — `stripe` (default), `night`, or `flat`
1508
+ - `labels` — `above` (default) or `floating`
1509
+ - `variables` — design tokens such as `colorPrimary`, `colorBackground`, `colorText`, `colorDanger`, `fontFamily`, `fontSizeBase`, `spacingUnit`, `borderRadius` (see [variables](https://docs.stripe.com/elements/appearance-api#variables)). Colour variables must be hex or `rgb()`; `rgba()` and `var()` are rejected by Stripe.
1510
+ - `rules` — per-component CSS-like overrides keyed by Stripe selectors such as `.Tab`, `.Tab--selected`, `.Input`, `.Input:focus`, `.Label` (see [rules](https://docs.stripe.com/elements/appearance-api#rules))
1511
+ - `disableAnimations` — `true` to turn off transitions
1512
+
1513
+ **Returns:** `array` — The appearance object handed to Stripe.js
1514
+
1515
+ **Source:** `app/Modules/PaymentMethods/StripeGateway/Stripe.php` (`Stripe::getElementsAppearance()`)
1516
+
1517
+ **Usage:**
1518
+
1519
+ ```
1520
+ // Dark checkout: match the Payment Element to a dark storefront.
1521
+ add_filter('fluent_cart/stripe_appearance', function ($appearance) {
1522
+ return [
1523
+ 'theme' => 'night',
1524
+ 'labels' => 'floating',
1525
+ 'variables' => [
1526
+ 'colorPrimary' => '#f5c542',
1527
+ 'colorBackground' => '#1b1b1f',
1528
+ 'colorText' => '#f4f4f5',
1529
+ 'colorDanger' => '#ff6b6b',
1530
+ 'fontFamily' => 'Inter, system-ui, sans-serif',
1531
+ 'borderRadius' => '10px',
1532
+ ],
1533
+ 'rules' => [
1534
+ '.Tab--selected' => ['borderColor' => '#f5c542'],
1535
+ '.Input:focus' => ['boxShadow' => '0 0 0 2px #f5c542'],
1536
+ ],
1537
+ ];
1538
+ });
1539
+ ```
1540
+
1541
+ A `fontFamily` that is not one of Stripe's built-in fonts only takes effect when the font is also loaded into the iframe via [`fluent_cart/stripe_elements_fonts`](#stripe_elements_fonts).
1542
+
1543
+ ### ` stripe_elements_fonts `
1544
+
1545
+ `fluent_cart/stripe_elements_fonts` — Load custom fonts into the Stripe Payment Element
1546
+
1547
+ **When it runs:** Applied alongside `fluent_cart/stripe_appearance` when the embedded checkout builds the Stripe Elements options. Because the Payment Element lives in a Stripe iframe, fonts loaded on the parent page are invisible to it. Whatever this filter returns is passed as the [`fonts` option](https://docs.stripe.com/js/elements_object/create#stripe_elements-options-fonts) of `stripe.elements()` — a sibling of `appearance`, not part of it — and Stripe loads those sources inside the iframe.
1548
+
1549
+ **Parameters:**
1550
+
1551
+ - `$fonts` (array): List of font sources (defaults to `[]`, so Stripe's own font stack applies). Each entry is one of:[CssFontSource](https://docs.stripe.com/js/appendix/css_font_source_object) — `['cssSrc' => 'https://…']`, a stylesheet URL containing `@font-face` rules. Must be `https`.
1552
+ - [CustomFontSource](https://docs.stripe.com/js/appendix/custom_font_source_object) — `family` and `src` (a CSS `src` value such as `url(https://…/font.woff2)`), plus optional `display`, `style`, `unicodeRange`, `weight`. `weight` is a string (`'400'`), not an integer.
1553
+
1554
+ Entries that are not arrays are dropped before the response is sent.
1555
+
1556
+ **Returns:** `array` — The font sources handed to Stripe.js
1557
+
1558
+ **Source:** `app/Modules/PaymentMethods/StripeGateway/Stripe.php` (`Stripe::getElementsFonts()`)
1559
+
1560
+ **Usage:**
1561
+
1562
+ ```
1563
+ // 1. Load the font inside the Stripe iframe.
1564
+ add_filter('fluent_cart/stripe_elements_fonts', function ($fonts) {
1565
+ // Google Fonts stylesheet (CssFontSource)
1566
+ $fonts[] = ['cssSrc' => 'https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap'];
1567
+
1568
+ // Self-hosted font file (CustomFontSource)
1569
+ $fonts[] = [
1570
+ 'family' => 'Brand Sans',
1571
+ 'src' => 'url(https://example.com/wp-content/themes/brand/fonts/brand-sans.woff2)',
1572
+ 'weight' => '400',
1573
+ 'display' => 'swap',
1574
+ ];
1575
+
1576
+ return $fonts;
1577
+ });
1578
+
1579
+ // 2. Tell the Payment Element to use it. Pass the full Appearance API object —
1580
+ // the filter replaces the default, it does not merge into it.
1581
+ add_filter('fluent_cart/stripe_appearance', function ($appearance) {
1582
+ return [
1583
+ 'theme' => 'night',
1584
+ 'labels' => 'floating',
1585
+ 'variables' => [
1586
+ 'colorPrimary' => '#f5c542',
1587
+ 'colorBackground' => '#1b1b1f',
1588
+ 'colorText' => '#f4f4f5',
1589
+ 'colorDanger' => '#ff6b6b',
1590
+ 'fontFamily' => 'Inter, "Brand Sans", system-ui, sans-serif',
1591
+ 'borderRadius' => '10px',
1592
+ ],
1593
+ 'rules' => [
1594
+ '.Tab--selected' => ['borderColor' => '#f5c542'],
1595
+ '.Input:focus' => ['boxShadow' => '0 0 0 2px #f5c542'],
1596
+ ],
1597
+ ];
1598
+ });
1599
+ ```
1600
+
1601
+ Without step 2 the font is loaded but unused; without step 1 the `fontFamily` falls back to Stripe's default stack.
1602
+
1603
+ ### ` stripe/setup_intent_rate_limit_customer_daily `
1604
+
1605
+ `fluent_cart/stripe/setup_intent_rate_limit_customer_daily` — Filter the daily SetupIntent rate limit per customer
1606
+
1607
+ **When it runs:** Applied when checking and enforcing the rate limit for Stripe SetupIntent creation (used for subscription card updates). Prevents card testing fraud.
1608
+
1609
+ **Parameters:**
1610
+
1611
+ - `$limit` (int): Maximum number of SetupIntent attempts per customer per day (default `3`)
1612
+ - `$customerId` (string): The Stripe customer ID
1613
+
1614
+ **Returns:** `int` — The modified daily rate limit
1615
+
1616
+ **Source:** `app/Modules/PaymentMethods/StripeGateway/SubscriptionsManager.php:92,108`
1617
+
1618
+ **Usage:**
1619
+
1620
+ ```
1621
+ add_filter('fluent_cart/stripe/setup_intent_rate_limit_customer_daily', function ($limit, $customerId) {
1622
+ // Allow more attempts for trusted customers
1623
+ return 5;
1624
+ }, 10, 2);
1625
+ ```
1626
+
1627
+ ### ` stripe/fallback_order_transaction `
1628
+
1629
+ `fluent_cart/stripe/fallback_order_transaction` — Provide a fallback transaction for Stripe webhook events
1630
+
1631
+ **When it runs:** Applied during Stripe webhook processing (`charge.refunded` or `charge.succeeded`) when no matching [`OrderTransaction`](/database/models/order-transaction.md) can be found by `vendor_charge_id`. Allows you to resolve the transaction through custom logic.
1632
+
1633
+ **Parameters:**
1634
+
1635
+ - `$transaction` ([OrderTransaction](/database/models/order-transaction.md)|null): The fallback transaction (default `null`)
1636
+ - `$vendorDataObject` (object): The Stripe event data object containing charge details
1637
+
1638
+ **Returns:** [OrderTransaction](/database/models/order-transaction.md)|null — An `OrderTransaction` instance or `null` if not found
1639
+
1640
+ **Source:** `app/Modules/PaymentMethods/StripeGateway/Webhook/Webhook.php:171`
1641
+
1642
+ **Usage:**
1643
+
1644
+ ```
1645
+ add_filter('fluent_cart/stripe/fallback_order_transaction', function ($transaction, $vendorDataObject) {
1646
+ // Look up transaction by metadata
1647
+ if (isset($vendorDataObject->metadata->fct_ref_id)) {
1648
+ $order = \FluentCart\App\Models\Order::where('uuid', $vendorDataObject->metadata->fct_ref_id)->first();
1649
+ if ($order) {
1650
+ return \FluentCart\App\Models\OrderTransaction::where('order_id', $order->id)
1651
+ ->where('transaction_type', 'charge')
1652
+ ->first();
1653
+ }
1654
+ }
1655
+ return $transaction;
1656
+ }, 10, 2);
1657
+ ```
1658
+
1659
+ ---
1660
+
1661
+ ## PayPal
1662
+
1663
+ ### ` paypal_plan_id `
1664
+
1665
+ `fluent_cart/paypal_plan_id` — Filter the PayPal plan ID for subscriptions
1666
+
1667
+ **When it runs:** Applied when generating or resolving the PayPal billing plan ID for a subscription product variation. The plan ID is a computed string based on currency, variation, billing interval, and other parameters.
1668
+
1669
+ **Parameters:**
1670
+
1671
+ - `$planId` (string): The generated plan ID string
1672
+ - `$context` (array): Context data
1673
+
1674
+ ```
1675
+ $context = [
1676
+ 'plan_data' => [...], // Plan configuration data
1677
+ 'variation' => Variation, // Product variation model
1678
+ 'product' => Product // Product model
1679
+ ];
1680
+ ```
1681
+
1682
+ **Returns:** `string` — The modified PayPal plan ID
1683
+
1684
+ **Source:** `app/Modules/PaymentMethods/PayPalGateway/PayPalHelper.php:54`
1685
+
1686
+ **Usage:**
1687
+
1688
+ ```
1689
+ add_filter('fluent_cart/paypal_plan_id', function ($planId, $context) {
1690
+ // Use a custom plan ID format
1691
+ return 'custom_plan_' . $context['variation']->id;
1692
+ }, 10, 2);
1693
+ ```
1694
+
1695
+ ### ` payments/paypal_sdk_src `
1696
+
1697
+ `fluent_cart/payments/paypal_sdk_src` — Filter the PayPal SDK JavaScript source URL
1698
+
1699
+ **When it runs:** Applied when generating the PayPal JavaScript SDK script URL for the checkout page.
1700
+
1701
+ **Parameters:**
1702
+
1703
+ - `$sdkSrc` (string): The PayPal SDK URL with query parameters (client-id, currency, intent, vault, etc.)
1704
+ - `$data` (array): Additional context data (empty array)
1705
+
1706
+ **Returns:** `string` — The modified PayPal SDK URL
1707
+
1708
+ **Source:** `app/Modules/PaymentMethods/PayPalGateway/PayPal.php:1179`
1709
+
1710
+ **Usage:**
1711
+
1712
+ ```
1713
+ add_filter('fluent_cart/payments/paypal_sdk_src', function ($sdkSrc, $data) {
1714
+ // Add locale parameter
1715
+ return add_query_arg('locale', 'en_US', $sdkSrc);
1716
+ }, 10, 2);
1717
+ ```
1718
+
1719
+ ### ` payments/paypal/disable_webhook_verification `
1720
+
1721
+ `fluent_cart/payments/paypal/disable_webhook_verification` — Disable PayPal webhook signature verification
1722
+
1723
+ **When it runs:** Applied at the start of PayPal webhook verification. Return `'yes'` to skip signature verification entirely. Only use this for debugging or in environments where verification cannot work.
1724
+
1725
+ **Parameters:**
1726
+
1727
+ - `$disable` (string): Whether to disable verification (default `'no'`)
1728
+ - `$data` (array): Additional context data (empty array)
1729
+
1730
+ **Returns:** `string` — `'yes'` to skip verification, `'no'` to verify normally
1731
+
1732
+ **Source:** `app/Modules/PaymentMethods/PayPalGateway/IPN.php:358`
1733
+
1734
+ **Usage:**
1735
+
1736
+ ```
1737
+ add_filter('fluent_cart/payments/paypal/disable_webhook_verification', function ($disable, $data) {
1738
+ // Disable verification in local development
1739
+ if (wp_get_environment_type() === 'local') {
1740
+ return 'yes';
1741
+ }
1742
+ return $disable;
1743
+ }, 10, 2);
1744
+ ```
1745
+
1746
+ ### ` payments/paypal/verify_webhook `
1747
+
1748
+ `fluent_cart/payments/paypal/verify_webhook` — Control PayPal webhook verification
1749
+
1750
+ **When it runs:** Applied before the actual PayPal webhook signature verification step in the main webhook processing flow. Return `false` to skip verification for specific webhook types or modes.
1751
+
1752
+ **Parameters:**
1753
+
1754
+ - `$verify` (bool): Whether to verify the webhook (default `true`)
1755
+ - `$context` (array): Context data
1756
+
1757
+ ```
1758
+ $context = [
1759
+ 'data' => [...], // The webhook payload
1760
+ 'mode' => 'live', // 'live' or 'test'
1761
+ 'type' => 'PAYMENT.SALE.COMPLETED' // Webhook event type
1762
+ ];
1763
+ ```
1764
+
1765
+ **Returns:** `bool` — Whether to proceed with webhook verification
1766
+
1767
+ **Source:** `app/Modules/PaymentMethods/PayPalGateway/IPN.php:481`
1768
+
1769
+ **Usage:**
1770
+
1771
+ ```
1772
+ add_filter('fluent_cart/payments/paypal/verify_webhook', function ($verify, $context) {
1773
+ // Skip verification for test mode
1774
+ if ($context['mode'] === 'test') {
1775
+ return false;
1776
+ }
1777
+ return $verify;
1778
+ }, 10, 2);
1779
+ ```
1780
+
1781
+ ### ` paypal/vault_attributes `
1782
+
1783
+ `fluent_cart/paypal/vault_attributes` — Filter PayPal Vault v3 attributes when saving a buyer for auto-charge
1784
+
1785
+ **When it runs:** This filter is applied during a **`system` (auto-charged, store-billed) subscription** checkout when PayPal vaults the buyer's account (Vault v3 save-on-success), so future renewal invoices can be charged merchant-initiated. It lets you adjust the vault attributes sent to PayPal. See [Store-managed + auto-charge](/modules/subscriptions.md#store-managed-auto-charge-system).
1786
+
1787
+ **Parameters:**
1788
+
1789
+ - `$defaults` (array): The vault attributes
1790
+
1791
+ ```
1792
+ [
1793
+ 'store_in_vault' => 'ON_SUCCESS', // string
1794
+ 'usage_type' => 'MERCHANT', // string
1795
+ 'customer_type' => 'CONSUMER', // string
1796
+ ]
1797
+ ```
1798
+
1799
+ - `$context` (array): `['order' => Order, 'subscription' => Subscription]`
1800
+
1801
+ **Returns:**
1802
+
1803
+ - `$defaults` (array): The (possibly modified) vault attributes
1804
+
1805
+ **Source:** `app/Modules/PaymentMethods/PayPalGateway/Processor.php:226`
1806
+
1807
+ **Usage:**
1808
+
1809
+ ```
1810
+ add_filter('fluent_cart/paypal/vault_attributes', function($attributes, $context) {
1811
+ return $attributes;
1812
+ }, 10, 2);
1813
+ ```
1814
+
1815
+ ### ` payments/paypal_vault_one_time `
1816
+
1817
+ `fluent_cart/payments/paypal_vault_one_time` — Filter whether a one-time PayPal order should vault the buyer's payment method
1818
+
1819
+ **When it runs:** Applied when building a one-time (non-subscription) PayPal order, wherever `vault_on_success` would otherwise be decided. Letting this vault is what allows the saved-payment-methods module to offer the buyer's PayPal account for future purchases. The default simply preserves whatever `vault_on_success` was already resolved to, so with no listener attached, behavior is unchanged.
1820
+
1821
+ **Parameters:**
1822
+
1823
+ - `$vaultOnSuccess` (bool): Whether to vault on success (default: `!empty($args['vault_on_success'])`)
1824
+ - `$context` (array): Context data
1825
+
1826
+ ```
1827
+ $context = [
1828
+ 'order' => $order, // \FluentCart\App\Models\Order
1829
+ 'transaction' => $transaction, // \FluentCart\App\Models\OrderTransaction
1830
+ 'subscription' => $subscription, // \FluentCart\App\Models\Subscription|null
1831
+ ];
1832
+ ```
1833
+
1834
+ **Returns:** `bool` — Whether PayPal should vault the buyer's payment method on this one-time order
1835
+
1836
+ **Source:** `app/Modules/PaymentMethods/PayPalGateway/Processor.php:214`
1837
+
1838
+ **Usage:**
1839
+
1840
+ ```
1841
+ add_filter('fluent_cart/payments/paypal_vault_one_time', function ($vaultOnSuccess, $context) {
1842
+ // Never vault for guest (no-account) checkouts
1843
+ if (!$context['order']->customer_id) {
1844
+ return false;
1845
+ }
1846
+ return $vaultOnSuccess;
1847
+ }, 10, 2);
1848
+ ```
1849
+
1850
+ ### ` payments/paypal_vault_rejection_issues `
1851
+
1852
+ `fluent_cart/payments/paypal_vault_rejection_issues` — Filter which PayPal error codes are treated as a vaulting rejection
1853
+
1854
+ **When it runs:** Applied when inspecting a failed PayPal order-creation response to decide whether the failure was caused specifically by a vaulting/save-on-success problem (as opposed to some other error). If the response's error `details` contain one of these issue codes, FluentCart retries the request without the vault attributes instead of failing the checkout outright — see the `fluent_cart/payments/paypal_vault_rejected` action, fired right before that retry.
1855
+
1856
+ **Parameters:**
1857
+
1858
+ - `$vaultIssues` (array): PayPal issue codes that indicate a vaulting rejection
1859
+
1860
+ ```
1861
+ $vaultIssues = [
1862
+ 'PAYMENT_SOURCE_CANNOT_BE_USED',
1863
+ 'PAYMENT_SOURCE_NOT_VAULTABLE',
1864
+ 'VAULTING_NOT_ENABLED',
1865
+ 'MERCHANT_NOT_ENABLED_FOR_VAULTING',
1866
+ 'VAULT_ID_NOT_SUPPORTED',
1867
+ ];
1868
+ ```
1869
+
1870
+ **Returns:** `array` — The issue codes to treat as a vaulting rejection
1871
+
1872
+ **Source:** `app/Modules/PaymentMethods/PayPalGateway/Processor.php:50`
1873
+
1874
+ **Usage:**
1875
+
1876
+ ```
1877
+ add_filter('fluent_cart/payments/paypal_vault_rejection_issues', function ($vaultIssues) {
1878
+ // Also retry-without-vault on this less common PayPal issue code
1879
+ $vaultIssues[] = 'CUSTOMER_ALREADY_HAS_A_SIMILAR_PAYMENT_SOURCE_SAVED';
1880
+ return $vaultIssues;
1881
+ }, 10, 1);
1882
+ ```
1883
+
1884
+ ---
1885
+
1886
+ ## Tax
1887
+
1888
+ ### ` tax/country_tax_titles `
1889
+
1890
+ `fluent_cart/tax/country_tax_titles` — Filter tax title labels per country
1891
+
1892
+ **When it runs:** Applied when retrieving the mapping of country codes to their tax identification field labels (e.g., VAT, GST, ABN). Used in checkout forms and tax settings.
1893
+
1894
+ **Parameters:**
1895
+
1896
+ - `$taxTitles` (array): Associative array of country code => tax label
1897
+
1898
+ ```
1899
+ $taxTitles = [
1900
+ 'AU' => 'ABN',
1901
+ 'NZ' => 'GST',
1902
+ 'IN' => 'GST',
1903
+ 'CA' => 'GST / HST / PST / QST',
1904
+ 'GB' => 'VAT',
1905
+ 'EU' => 'VAT',
1906
+ 'US' => 'EIN / Sales Tax',
1907
+ // ... 30+ countries
1908
+ ];
1909
+ ```
1910
+
1911
+ **Returns:** `array` — The modified country tax titles array
1912
+
1913
+ **Source:** `app/Modules/Tax/TaxModule.php (line 1730)`
1914
+
1915
+ **Usage:**
1916
+
1917
+ ```
1918
+ add_filter('fluent_cart/tax/country_tax_titles', function ($taxTitles) {
1919
+ // Add or override tax labels
1920
+ $taxTitles['KR'] = __('BRN / VAT', 'my-plugin'); // South Korea
1921
+ $taxTitles['US'] = __('Tax ID', 'my-plugin'); // Simplify US label
1922
+ return $taxTitles;
1923
+ }, 10, 1);
1924
+ ```
1925
+
1926
+ ### ` tax_summary_should_render `
1927
+
1928
+ `fluent_cart/tax_summary_should_render` — Filter whether the tax summary is rendered for an order receipt
1929
+
1930
+ **When it runs:** Applied in `TaxSummaryHelper::computeTaxSummary()` while building the tax summary for an order's receipt surfaces (thank-you page, receipts, emails, PDFs). It runs after the zero-tax short-circuit — when the order has no tax at all and no reverse charge, the summary is already skipped without this filter firing — so it lets you hide the tax summary for orders that do carry tax data.
1931
+
1932
+ **Parameters:**
1933
+
1934
+ - `$shouldRender` (bool): Whether the tax summary should render (default `true`)
1935
+ - `$order` (\FluentCart\App\Models\Order): The order being rendered
1936
+
1937
+ **Returns:**
1938
+
1939
+ - `bool` — `false` to hide the tax summary block
1940
+
1941
+ **Source:** `app/Services/Renderer/Receipt/TaxSummaryHelper.php (line 172)`
1942
+
1943
+ **Usage:**
1944
+
1945
+ ```
1946
+ add_filter('fluent_cart/tax_summary_should_render', function ($shouldRender, $order) {
1947
+ // Hide the tax summary for test-mode orders
1948
+ if ($order->mode === 'test') {
1949
+ return false;
1950
+ }
1951
+
1952
+ return $shouldRender;
1953
+ }, 10, 2);
1954
+ ```
1955
+
1956
+ ---
1957
+
1958
+ ## Mollie (Pro)
1959
+
1960
+ ### ` mollie_settings `
1961
+
1962
+ `fluent_cart/mollie_settings` Pro — Filter Mollie gateway settings
1963
+
1964
+ **When it runs:** Applied when loading Mollie gateway settings during initialization.
1965
+
1966
+ **Parameters:**
1967
+
1968
+ - `$settings` (array): The Mollie settings array including API keys and configuration
1969
+
1970
+ **Returns:** `array` — The modified Mollie settings
1971
+
1972
+ **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/MollieGateway/MollieSettingsBase.php:26`
1973
+
1974
+ **Usage:**
1975
+
1976
+ ```
1977
+ add_filter('fluent_cart/mollie_settings', function ($settings) {
1978
+ // Override settings for staging
1979
+ if (wp_get_environment_type() === 'staging') {
1980
+ $settings['payment_mode'] = 'test';
1981
+ }
1982
+ return $settings;
1983
+ }, 10, 1);
1984
+ ```
1985
+
1986
+ ### ` payments/mollie_payment_args `
1987
+
1988
+ `fluent_cart/payments/mollie_payment_args` Pro — Filter Mollie payment data
1989
+
1990
+ **When it runs:** Applied when building the payment data array before sending to the Mollie API for payment creation.
1991
+
1992
+ **Parameters:**
1993
+
1994
+ - `$paymentData` (array): The payment data for the Mollie API
1995
+ - `$context` (array): Context data
1996
+
1997
+ ```
1998
+ $context = [
1999
+ 'order' => Order, // Order model
2000
+ 'transaction' => Transaction // OrderTransaction model
2001
+ ];
2002
+ ```
2003
+
2004
+ **Returns:** `array` — The modified payment data
2005
+
2006
+ **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/MollieGateway/MollieProcessor.php:169`
2007
+
2008
+ **Usage:**
2009
+
2010
+ ```
2011
+ add_filter('fluent_cart/payments/mollie_payment_args', function ($paymentData, $context) {
2012
+ // Add a custom description
2013
+ $paymentData['description'] = 'Order #' . $context['order']->id . ' - My Store';
2014
+ return $paymentData;
2015
+ }, 10, 2);
2016
+ ```
2017
+
2018
+ ### ` mollie/pass_line_items_details `
2019
+
2020
+ `fluent_cart/mollie/pass_line_items_details` Pro — Control whether line item details are passed to Mollie
2021
+
2022
+ **When it runs:** Applied before building the Mollie payment request. Return `true` to include individual line items in the Mollie order (useful for Klarna, iDEAL, etc.).
2023
+
2024
+ **Parameters:**
2025
+
2026
+ - `$passLineItems` (bool): Whether to include line items (default `false`)
2027
+ - `$context` (array): Array containing `[$order, $transaction]`
2028
+
2029
+ **Returns:** `bool` — Whether to pass line item details to Mollie
2030
+
2031
+ **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/MollieGateway/MollieProcessor.php:155`
2032
+
2033
+ **Usage:**
2034
+
2035
+ ```
2036
+ add_filter('fluent_cart/mollie/pass_line_items_details', function ($passLineItems, $context) {
2037
+ // Enable line items for Klarna support
2038
+ return true;
2039
+ }, 10, 2);
2040
+ ```
2041
+
2042
+ ### ` mollie/webhook_url `
2043
+
2044
+ `fluent_cart/mollie/webhook_url` Pro — Filter the Mollie webhook URL
2045
+
2046
+ **When it runs:** Applied when generating the webhook notification URL sent to Mollie during payment creation.
2047
+
2048
+ **Parameters:**
2049
+
2050
+ - `$webhookUrl` (string): The IPN/webhook listener URL
2051
+
2052
+ **Returns:** `string` — The modified webhook URL
2053
+
2054
+ **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/MollieGateway/MollieProcessor.php:341`
2055
+
2056
+ **Usage:**
2057
+
2058
+ ```
2059
+ add_filter('fluent_cart/mollie/webhook_url', function ($webhookUrl) {
2060
+ // Use a tunnel URL for local development
2061
+ if (wp_get_environment_type() === 'local') {
2062
+ return 'https://my-tunnel.ngrok.io/?fct_payment_listener=1&method=mollie';
2063
+ }
2064
+ return $webhookUrl;
2065
+ }, 10, 1);
2066
+ ```
2067
+
2068
+ ### ` mollie/subscription_description `
2069
+
2070
+ `fluent_cart/mollie/subscription_description` Pro — Filter the Mollie subscription description
2071
+
2072
+ **When it runs:** Applied when creating a Mollie subscription, allowing you to customize the description shown on the customer's payment statement.
2073
+
2074
+ **Parameters:**
2075
+
2076
+ - `$description` (string): The generated subscription description
2077
+ - `$context` (array): Context data
2078
+
2079
+ ```
2080
+ $context = [
2081
+ 'subscription_model' => Subscription, // Subscription model
2082
+ 'currency' => 'EUR' // Currency code
2083
+ ];
2084
+ ```
2085
+
2086
+ **Returns:** `string` — The modified subscription description
2087
+
2088
+ **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/MollieGateway/MollieHelper.php:209`
2089
+
2090
+ **Usage:**
2091
+
2092
+ ```
2093
+ add_filter('fluent_cart/mollie/subscription_description', function ($description, $context) {
2094
+ return 'MyStore - ' . $context['subscription_model']->item_name;
2095
+ }, 10, 2);
2096
+ ```
2097
+
2098
+ ---
2099
+
2100
+ ## Paddle (Pro)
2101
+
2102
+ ### ` paddle_product_tax_category `
2103
+
2104
+ `fluent_cart/paddle_product_tax_category` Pro — Filter Paddle product tax category
2105
+
2106
+ **When it runs:** Applied when FluentCart creates the corresponding product on Paddle, to determine the tax category sent with the product data. Paddle uses tax categories to apply the correct tax rates.
2107
+
2108
+ **Parameters:**
2109
+
2110
+ - `$taxCategory` (string): The tax category (default `'standard'`)
2111
+ - `$data` (array): Context data
2112
+
2113
+ ```
2114
+ $data = [
2115
+ 'product' => $fctProduct, // \FluentCart\App\Models\Product|null — the FluentCart product
2116
+ 'variation_id' => $variationId, // int|null — the product variation ID
2117
+ ];
2118
+ ```
2119
+
2120
+ **Returns:** `string` — The Paddle tax category (e.g., `'standard'`, `'digital-goods'`, `'saas'`)
2121
+
2122
+ **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/PaddleGateway/Product.php (line 53)`
2123
+
2124
+ **Usage:**
2125
+
2126
+ ```
2127
+ add_filter('fluent_cart/paddle_product_tax_category', function ($taxCategory, $data) {
2128
+ if ($data['product'] && $data['product']->ID === 123) {
2129
+ return 'digital-goods';
2130
+ }
2131
+
2132
+ return $taxCategory;
2133
+ }, 10, 2);
2134
+ ```
2135
+
2136
+ ### ` paddle_onetime_price_id `
2137
+
2138
+ `fluent_cart/paddle_onetime_price_id` Pro — Filter Paddle one-time price ID
2139
+
2140
+ **When it runs:** Applied when resolving the Paddle price ID for a one-time payment product.
2141
+
2142
+ **Parameters:**
2143
+
2144
+ - `$priceId` (string): The Paddle price ID
2145
+
2146
+ **Returns:** `string` — The modified Paddle price ID
2147
+
2148
+ **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/PaddleGateway/`
2149
+
2150
+ **Usage:**
2151
+
2152
+ ```
2153
+ add_filter('fluent_cart/paddle_onetime_price_id', function ($priceId) {
2154
+ return $priceId;
2155
+ }, 10, 1);
2156
+ ```
2157
+
2158
+ ### ` paddle_recurring_price_id `
2159
+
2160
+ `fluent_cart/paddle_recurring_price_id` Pro — Filter Paddle recurring price ID
2161
+
2162
+ **When it runs:** Applied when resolving the Paddle price ID for a recurring subscription product.
2163
+
2164
+ **Parameters:**
2165
+
2166
+ - `$priceId` (string): The Paddle recurring price ID
2167
+
2168
+ **Returns:** `string` — The modified Paddle recurring price ID
2169
+
2170
+ **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/PaddleGateway/`
2171
+
2172
+ **Usage:**
2173
+
2174
+ ```
2175
+ add_filter('fluent_cart/paddle_recurring_price_id', function ($priceId) {
2176
+ return $priceId;
2177
+ }, 10, 1);
2178
+ ```
2179
+
2180
+ ### ` paddle_discount_id `
2181
+
2182
+ `fluent_cart/paddle_discount_id` Pro — Filter Paddle discount ID
2183
+
2184
+ **When it runs:** Applied when resolving the Paddle discount ID to apply during checkout.
2185
+
2186
+ **Parameters:**
2187
+
2188
+ - `$discountId` (string): The Paddle discount ID
2189
+
2190
+ **Returns:** `string` — The modified Paddle discount ID
2191
+
2192
+ **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/PaddleGateway/`
2193
+
2194
+ **Usage:**
2195
+
2196
+ ```
2197
+ add_filter('fluent_cart/paddle_discount_id', function ($discountId) {
2198
+ return $discountId;
2199
+ }, 10, 1);
2200
+ ```
2201
+
2202
+ ### ` paddle_pin_checkout_currency `
2203
+
2204
+ `fluent_cart/paddle_pin_checkout_currency` Pro — Control whether Paddle checkout is pinned to the order currency
2205
+
2206
+ **When it runs:** Applied when creating the server-side Paddle transaction for a checkout. When `true` (default), the transaction's `currency_code` is pinned to the order currency, so the charge always settles in the currency the order was placed in. Return `false` to let Paddle localize the currency by the customer's country; the captured payment then goes through the cross-currency reconciliation route.
2207
+
2208
+ Not applied when a discount is used at checkout — flat Paddle discounts are currency-bound, so discounted checkouts are always pinned to the order currency.
2209
+
2210
+ **Parameters:**
2211
+
2212
+ - `$pinCurrency` (bool): Whether to pin the checkout to the order currency (default `true`)
2213
+ - `$context` (array): Context — `order` (`Order` model) and `transaction` (`OrderTransaction` model)
2214
+
2215
+ **Returns:** `bool` — `true` to pin the checkout to the order currency, `false` to let Paddle localize it
2216
+
2217
+ **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/PaddleGateway/`
2218
+
2219
+ **Usage:**
2220
+
2221
+ ```
2222
+ add_filter('fluent_cart/paddle_pin_checkout_currency', function ($pinCurrency, $context) {
2223
+ // Let Paddle localize the checkout currency by customer country
2224
+ return false;
2225
+ }, 10, 2);
2226
+ ```
2227
+
2228
+ ### ` paddle_subscription_product_type `
2229
+
2230
+ `fluent_cart/paddle_subscription_product_type` Pro — Filter Paddle subscription product type
2231
+
2232
+ **When it runs:** Applied when determining the Paddle product type for subscription items.
2233
+
2234
+ **Parameters:**
2235
+
2236
+ - `$productType` (string): The Paddle product type
2237
+
2238
+ **Returns:** `string` — The modified Paddle product type
2239
+
2240
+ **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/PaddleGateway/`
2241
+
2242
+ **Usage:**
2243
+
2244
+ ```
2245
+ add_filter('fluent_cart/paddle_subscription_product_type', function ($productType) {
2246
+ return $productType;
2247
+ }, 10, 1);
2248
+ ```
2249
+
2250
+ ### ` paddle_subscription_price_type `
2251
+
2252
+ `fluent_cart/paddle_subscription_price_type` Pro — Filter Paddle subscription price type
2253
+
2254
+ **When it runs:** Applied when determining the Paddle price type for subscription items.
2255
+
2256
+ **Parameters:**
2257
+
2258
+ - `$priceType` (string): The Paddle price type
2259
+
2260
+ **Returns:** `string` — The modified Paddle price type
2261
+
2262
+ **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/PaddleGateway/`
2263
+
2264
+ **Usage:**
2265
+
2266
+ ```
2267
+ add_filter('fluent_cart/paddle_subscription_price_type', function ($priceType) {
2268
+ return $priceType;
2269
+ }, 10, 1);
2270
+ ```
2271
+
2272
+ ### ` paddle_signup_fee_price_type `
2273
+
2274
+ `fluent_cart/paddle_signup_fee_price_type` Pro — Filter Paddle signup fee price type
2275
+
2276
+ **When it runs:** Applied when determining the Paddle price type for subscription signup fees.
2277
+
2278
+ **Parameters:**
2279
+
2280
+ - `$priceType` (string): The Paddle signup fee price type
2281
+
2282
+ **Returns:** `string` — The modified Paddle signup fee price type
2283
+
2284
+ **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/PaddleGateway/`
2285
+
2286
+ **Usage:**
2287
+
2288
+ ```
2289
+ add_filter('fluent_cart/paddle_signup_fee_price_type', function ($priceType) {
2290
+ return $priceType;
2291
+ }, 10, 1);
2292
+ ```
2293
+
2294
+ ### ` paddle_product_id `
2295
+
2296
+ `fluent_cart/paddle_product_id` Pro — Filter Paddle one-time product ID
2297
+
2298
+ **When it runs:** Applied when resolving the Paddle product ID for one-time payment items.
2299
+
2300
+ **Parameters:**
2301
+
2302
+ - `$productId` (string): The Paddle product ID
2303
+
2304
+ **Returns:** `string` — The modified Paddle product ID
2305
+
2306
+ **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/PaddleGateway/`
2307
+
2308
+ **Usage:**
2309
+
2310
+ ```
2311
+ add_filter('fluent_cart/paddle_product_id', function ($productId) {
2312
+ return $productId;
2313
+ }, 10, 1);
2314
+ ```
2315
+
2316
+ ### ` paddle_onetime_product_type `
2317
+
2318
+ `fluent_cart/paddle_onetime_product_type` Pro — Filter Paddle one-time product type
2319
+
2320
+ **When it runs:** Applied when determining the Paddle product type for one-time payment items.
2321
+
2322
+ **Parameters:**
2323
+
2324
+ - `$productType` (string): The Paddle product type
2325
+
2326
+ **Returns:** `string` — The modified Paddle product type
2327
+
2328
+ **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/PaddleGateway/`
2329
+
2330
+ **Usage:**
2331
+
2332
+ ```
2333
+ add_filter('fluent_cart/paddle_onetime_product_type', function ($productType) {
2334
+ return $productType;
2335
+ }, 10, 1);
2336
+ ```
2337
+
2338
+ ### ` paddle_onetime_price_type `
2339
+
2340
+ `fluent_cart/paddle_onetime_price_type` Pro — Filter Paddle one-time price type
2341
+
2342
+ **When it runs:** Applied when determining the Paddle price type for one-time payment items.
2343
+
2344
+ **Parameters:**
2345
+
2346
+ - `$priceType` (string): The Paddle price type
2347
+
2348
+ **Returns:** `string` — The modified Paddle price type
2349
+
2350
+ **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/PaddleGateway/`
2351
+
2352
+ **Usage:**
2353
+
2354
+ ```
2355
+ add_filter('fluent_cart/paddle_onetime_price_type', function ($priceType) {
2356
+ return $priceType;
2357
+ }, 10, 1);
2358
+ ```
2359
+
2360
+ ### ` paddle_addon_product_type `
2361
+
2362
+ `fluent_cart/paddle_addon_product_type` Pro — Filter Paddle add-on product type
2363
+
2364
+ **When it runs:** Applied when determining the Paddle product type for add-on items.
2365
+
2366
+ **Parameters:**
2367
+
2368
+ - `$productType` (string): The Paddle add-on product type
2369
+
2370
+ **Returns:** `string` — The modified Paddle add-on product type
2371
+
2372
+ **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/PaddleGateway/`
2373
+
2374
+ **Usage:**
2375
+
2376
+ ```
2377
+ add_filter('fluent_cart/paddle_addon_product_type', function ($productType) {
2378
+ return $productType;
2379
+ }, 10, 1);
2380
+ ```
2381
+
2382
+ ### ` paddle_discount_mode `
2383
+
2384
+ `fluent_cart/paddle_discount_mode` Pro — Filter Paddle discount mode
2385
+
2386
+ **When it runs:** Applied when determining how discounts are applied in Paddle transactions.
2387
+
2388
+ **Parameters:**
2389
+
2390
+ - `$discountMode` (string): The discount mode
2391
+
2392
+ **Returns:** `string` — The modified discount mode
2393
+
2394
+ **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/PaddleGateway/`
2395
+
2396
+ **Usage:**
2397
+
2398
+ ```
2399
+ add_filter('fluent_cart/paddle_discount_mode', function ($discountMode) {
2400
+ return $discountMode;
2401
+ }, 10, 1);
2402
+ ```
2403
+
2404
+ ---
2405
+
2406
+ ## Authorize.net (Pro)
2407
+
2408
+ ### ` authorize_dot_net_supported_currencies `
2409
+
2410
+ `fluent_cart/authorize_dot_net_supported_currencies` Pro — Filter Authorize.net supported currencies
2411
+
2412
+ **When it runs:** Applied when checking which currencies are supported by the Authorize.net gateway.
2413
+
2414
+ **Parameters:**
2415
+
2416
+ - `$currencies` (array): Array of supported currency codes
2417
+
2418
+ ```
2419
+ $currencies = ['USD', 'CAD', 'GBP', 'EUR', ...];
2420
+ ```
2421
+
2422
+ **Returns:** `array` — The modified array of supported currency codes
2423
+
2424
+ **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/AuthorizeDotNetGateway/`
2425
+
2426
+ **Usage:**
2427
+
2428
+ ```
2429
+ add_filter('fluent_cart/authorize_dot_net_supported_currencies', function ($currencies) {
2430
+ // Add additional supported currencies
2431
+ $currencies[] = 'AUD';
2432
+ $currencies[] = 'NZD';
2433
+ return $currencies;
2434
+ }, 10, 1);
2435
+ ```
2436
+
2437
+ ### ` authorize_dot_net/transaction_request `
2438
+
2439
+ `fluent_cart/authorize_dot_net/transaction_request` Pro — Filter the Authorize.net transaction request before it is sent to the API
2440
+
2441
+ **When it runs:** Applied to the assembled `transactionRequest` payload immediately before it is sent to the Authorize.net API. Fires on both the one-time payment path and the subscription first-payment path, so developers can override any Auth.net field (invoice number, customer ID/email, `userFields`, line items, billing/shipping, etc.) without core changes.
2442
+
2443
+ **Parameters:**
2444
+
2445
+ - `$transactionRequest` (array): The Authorize.net transaction request payload (amount, payment, billTo, shipTo, lineItems, etc.)
2446
+ - `$data` (array): Context data
2447
+
2448
+ ```
2449
+ $data = [
2450
+ 'order' => $order, // Order model instance
2451
+ 'transaction' => $transaction, // OrderTransaction model instance
2452
+ ];
2453
+ ```
2454
+
2455
+ **Returns:** `array` — The modified transaction request payload
2456
+
2457
+ **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/AuthorizeDotNetGateway/AuthorizeDotNetProcessor.php:71` (one-time) and `:542` (subscription first payment)
2458
+
2459
+ **Usage:**
2460
+
2461
+ ```
2462
+ add_filter('fluent_cart/authorize_dot_net/transaction_request', function ($transactionRequest, $data) {
2463
+ // Attach a custom purchase order number via userFields
2464
+ $transactionRequest['userFields'] = [
2465
+ 'userField' => [
2466
+ ['name' => 'po_number', 'value' => 'PO-' . $data['order']->id],
2467
+ ],
2468
+ ];
2469
+ return $transactionRequest;
2470
+ }, 10, 2);
2471
+ ```
2472
+
2473
+ ### ` authorize_dot_net/order_description `
2474
+
2475
+ `fluent_cart/authorize_dot_net/order_description` Pro — Filter the order description sent to Authorize.net
2476
+
2477
+ **When it runs:** Applied when building the order metadata (invoice number and description) for an Authorize.net transaction. The default description is the comma-separated list of item names, or `Order #{id}` when no names are available. The returned value is truncated to 255 characters.
2478
+
2479
+ **Parameters:**
2480
+
2481
+ - `$default` (string): The default order description (item names or `Order #{id}`)
2482
+ - `$data` (array): Context data
2483
+
2484
+ ```
2485
+ $data = [
2486
+ 'order' => $order, // Order model instance
2487
+ ];
2488
+ ```
2489
+
2490
+ **Returns:** `string` — The order description (truncated to 255 chars)
2491
+
2492
+ **Source:** `fluent-cart-pro/app/Modules/PaymentMethods/AuthorizeDotNetGateway/AuthorizeDotNetHelper.php:234`
2493
+
2494
+ **Usage:**
2495
+
2496
+ ```
2497
+ add_filter('fluent_cart/authorize_dot_net/order_description', function ($description, $data) {
2498
+ // Prefix the description with the store name
2499
+ return 'My Store — ' . $description;
2500
+ }, 10, 2);
2501
+ ```
2502
+
2503
+ ### ` should_send_email_notification `
2504
+
2505
+ `fluent_cart/should_send_email_notification` — Control whether an automatic email notification should be sent
2506
+
2507
+ **When it runs:** This filter is applied before each automatic email notification is sent for an order event. It allows you to selectively block or allow specific email notifications, for example when using a Merchant of Record payment gateway (like Paddle) that handles its own transactional emails.
2508
+
2509
+ **Parameters:**
2510
+
2511
+ - `$should` (bool): Whether the email should be sent (default: `true`)
2512
+ - `$args` (array): Context data about the notification
2513
+
2514
+ ```
2515
+ $args = [
2516
+ 'event' => 'order_paid', // The event triggering the email
2517
+ 'mail_name' => 'order_paid_customer', // The specific notification identifier
2518
+ 'order' => $order, // Order model instance
2519
+ ];
2520
+ ```
2521
+
2522
+ **Available `mail_name` values:**
2523
+
2524
+ - `order_paid_customer` — Purchase receipt to customer
2525
+ - `order_paid_admin` — New order alert to admin
2526
+ - `order_refunded_customer` — Refund confirmation to customer
2527
+ - `order_refunded_admin` — Refund alert to admin
2528
+ - `subscription_renewed_customer` — Renewal receipt to customer
2529
+ - `subscription_renewed_admin` — Renewal alert to admin
2530
+ - `subscription_canceled_customer` — Cancellation notice to customer
2531
+ - `subscription_canceled_admin` — Cancellation alert to admin
2532
+ - `order_placed_customer` — Order confirmation to customer (offline payment)
2533
+ - `order_placed_admin` — Order placed alert to admin (offline payment)
2534
+
2535
+ **Returns:**
2536
+
2537
+ - `$should` (bool): Whether the email notification should be sent
2538
+
2539
+ **Usage:**
2540
+
2541
+ ```
2542
+ // Block all customer-facing emails for a specific payment gateway
2543
+ add_filter('fluent_cart/should_send_email_notification', function($should, $args) {
2544
+ $order = $args['order'];
2545
+
2546
+ if ($order->payment_method !== 'my_gateway') {
2547
+ return $should;
2548
+ }
2549
+
2550
+ // Only allow order confirmation and admin notifications
2551
+ $allowedEmails = [
2552
+ 'order_paid_customer',
2553
+ 'order_paid_admin',
2554
+ ];
2555
+
2556
+ return in_array($args['mail_name'], $allowedEmails, true);
2557
+ }, 10, 2);
2558
+ ```
2559
+
2560
+ **Note:** This filter only affects automatic event-driven emails. Manual actions like generating invoices or printing receipts from the admin panel are not affected.
2561
+
2562
+ ### ` email_notification/mailer `
2563
+
2564
+ `fluent_cart/email_notification/mailer` — Modify the fully prepared Mailer immediately before it sends
2565
+
2566
+ **When it runs:** This filter is applied right before an email notification is actually sent — after the recipient, subject, body, and attachments have all been resolved onto the `Mailer` instance. Use it to add CC/BCC recipients, override the From/Reply-To address, attach extra files, or switch HTML/plain-text mode for a specific notification, without touching core code. It fires on every send path: synchronous event-driven sends (`mailEmailsOfEvent()`), direct by-name sends (`mailByEmailName()`), and Action Scheduler async sends (which resolve through `mailByEmailName()`).
2567
+
2568
+ **Parameters:**
2569
+
2570
+ - `$mailer` (`FluentCart\App\Services\Email\Mailer`): The fully prepared mailer — `to`, `subject`, `body`, and any PDF attachment are already set
2571
+ - `$context` (array): Context about the notification being sent
2572
+
2573
+ ```
2574
+ $context = [
2575
+ 'event' => 'order_paid', // The event that triggered the email
2576
+ 'mail_name' => 'order_paid_customer', // The specific notification identifier
2577
+ 'recipient' => 'customer', // 'customer' | 'admin' | 'user' | 'subscriber'
2578
+ 'notification' => $notification, // The resolved notification config array
2579
+ 'data' => $data, // The raw event payload (order, customer, subscription, etc.)
2580
+ ];
2581
+ ```
2582
+
2583
+ **Returns:**
2584
+
2585
+ - `$mailer` (`Mailer`): The mailer to send. Return the same instance (mutated via its fluent methods) or a different one. Any return value that is not a `Mailer` instance is ignored and the originally prepared mailer is sent instead — a misbehaving listener can never block delivery.
2586
+
2587
+ **Usage:**
2588
+
2589
+ ```
2590
+ // BCC every purchase receipt to a review-collection service, and only that notification
2591
+ add_filter(
2592
+ 'fluent_cart/email_notification/mailer',
2593
+ function ($mailer, $context) {
2594
+ if ($context['mail_name'] !== 'order_paid_customer') {
2595
+ return $mailer;
2596
+ }
2597
+
2598
+ $mailer->addCC('[email&#160;protected]');
2599
+ $mailer->addBCC('[email&#160;protected]');
2600
+ // Also available: $mailer->setFrom(), $mailer->setReplyTo(),
2601
+ // $mailer->addAttachment(), $mailer->setIsHtml()
2602
+
2603
+ return $mailer;
2604
+ },
2605
+ 10,
2606
+ 2
2607
+ );
2608
+ ```
2609
+
2610
+ **Note:** This is a send-time mailer filter, distinct from `fluent_cart/email_notifications` (which shapes the notification *definitions*, not an in-flight send).
2611
+
2612
+ ### ` paddle_allowed_email_notifications `
2613
+
2614
+ `fluent_cart/paddle_allowed_email_notifications` Pro — Control which email notifications are allowed for Paddle orders
2615
+
2616
+ **When it runs:** This filter is applied when determining whether to send an automatic email notification for a Paddle order. Since Paddle is a Merchant of Record and handles its own payment receipts, refund confirmations, and subscription billing emails, FluentCart blocks most automatic emails for Paddle orders by default. Use this filter to customize which emails are still sent by FluentCart.
2617
+
2618
+ **Parameters:**
2619
+
2620
+ - `$allowedEmails` (array): List of notification identifiers that FluentCart is allowed to send for Paddle orders
2621
+
2622
+ ```
2623
+ // Default allowed emails
2624
+ $allowedEmails = [
2625
+ 'order_paid_customer', // Order confirmation to customer
2626
+ 'order_paid_admin', // New order alert to admin
2627
+ ];
2628
+ ```
2629
+
2630
+ **Returns:**
2631
+
2632
+ - `$allowedEmails` (array): The modified list of allowed notification identifiers
2633
+
2634
+ **Usage:**
2635
+
2636
+ ```
2637
+ // Allow shipping notifications for Paddle orders
2638
+ add_filter('fluent_cart/paddle_allowed_email_notifications', function($allowedEmails) {
2639
+ $allowedEmails[] = 'shipping_status_changed_to_shipped_customer';
2640
+ $allowedEmails[] = 'shipping_status_changed_to_delivered_customer';
2641
+ return $allowedEmails;
2642
+ });
2643
+ ```
2644
+
2645
+ **Available notification identifiers:**
2646
+
2647
+ - `order_paid_customer` — Purchase receipt / order confirmation to customer (allowed by default)
2648
+ - `order_paid_admin` — New order alert to admin (allowed by default)
2649
+ - `order_refunded_customer` — Refund confirmation to customer
2650
+ - `order_refunded_admin` — Refund alert to admin
2651
+ - `subscription_renewed_customer` — Renewal receipt to customer
2652
+ - `subscription_renewed_admin` — Renewal alert to admin
2653
+ - `subscription_canceled_customer` — Cancellation notice to customer
2654
+ - `subscription_canceled_admin` — Cancellation alert to admin
2655
+
2656
+ **Note:** This filter is specific to Paddle orders. For general email notification control across all payment gateways, use the `fluent_cart/should_send_email_notification` filter instead.
2657
+
2658
+ ---