fluentcart-developer 2.3.3 → 3.0.0
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.
- package/dist/cards/fluentcart/tools.d.ts.map +1 -1
- package/dist/cards/fluentcart/tools.js +2368 -2323
- package/dist/cards/fluentcart/tools.js.map +1 -1
- package/dist/paths.d.ts +1 -1
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +1 -1
- package/dist/paths.js.map +1 -1
- package/dist/reference-reader.d.ts +32 -1
- package/dist/reference-reader.d.ts.map +1 -1
- package/dist/reference-reader.js +111 -22
- package/dist/reference-reader.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +8 -1
- package/dist/server.js.map +1 -1
- package/dist/skills/fluentcart-developer/SKILL.md +66 -538
- package/dist/skills/fluentcart-developer/references/api/authentication.md +452 -0
- package/dist/skills/fluentcart-developer/references/api/coupons.md +786 -0
- package/dist/skills/fluentcart-developer/references/api/customers.md +889 -0
- package/dist/skills/fluentcart-developer/references/api/files.md +609 -0
- package/dist/skills/fluentcart-developer/references/api/index.md +432 -0
- package/dist/skills/fluentcart-developer/references/api/licensing.md +633 -0
- package/dist/skills/fluentcart-developer/references/api/order-bump.md +384 -0
- package/dist/skills/fluentcart-developer/references/api/orders.md +814 -0
- package/dist/skills/fluentcart-developer/references/api/products.md +866 -0
- package/dist/skills/fluentcart-developer/references/api/roles-permissions.md +536 -0
- package/dist/skills/fluentcart-developer/references/api/subscriptions.md +827 -0
- package/dist/skills/fluentcart-developer/references/database/index.md +44 -0
- package/dist/skills/fluentcart-developer/references/database/models/activity.md +178 -0
- package/dist/skills/fluentcart-developer/references/database/models/applied-coupon.md +291 -0
- package/dist/skills/fluentcart-developer/references/database/models/attribute-group.md +239 -0
- package/dist/skills/fluentcart-developer/references/database/models/attribute-relation.md +181 -0
- package/dist/skills/fluentcart-developer/references/database/models/attribute-term.md +219 -0
- package/dist/skills/fluentcart-developer/references/database/models/cart.md +645 -0
- package/dist/skills/fluentcart-developer/references/database/models/coupon.md +427 -0
- package/dist/skills/fluentcart-developer/references/database/models/customer-addresses.md +348 -0
- package/dist/skills/fluentcart-developer/references/database/models/customer-meta.md +156 -0
- package/dist/skills/fluentcart-developer/references/database/models/customer.md +584 -0
- package/dist/skills/fluentcart-developer/references/database/models/dynamic-model.md +163 -0
- package/dist/skills/fluentcart-developer/references/database/models/label-relationship.md +155 -0
- package/dist/skills/fluentcart-developer/references/database/models/label.md +153 -0
- package/dist/skills/fluentcart-developer/references/database/models/license-activation.md +182 -0
- package/dist/skills/fluentcart-developer/references/database/models/license-meta.md +163 -0
- package/dist/skills/fluentcart-developer/references/database/models/license-site.md +208 -0
- package/dist/skills/fluentcart-developer/references/database/models/license.md +640 -0
- package/dist/skills/fluentcart-developer/references/database/models/meta.md +233 -0
- package/dist/skills/fluentcart-developer/references/database/models/order-address.md +391 -0
- package/dist/skills/fluentcart-developer/references/database/models/order-download-permission.md +144 -0
- package/dist/skills/fluentcart-developer/references/database/models/order-item.md +383 -0
- package/dist/skills/fluentcart-developer/references/database/models/order-meta.md +303 -0
- package/dist/skills/fluentcart-developer/references/database/models/order-operation.md +158 -0
- package/dist/skills/fluentcart-developer/references/database/models/order-promotion-stat.md +175 -0
- package/dist/skills/fluentcart-developer/references/database/models/order-promotion.md +250 -0
- package/dist/skills/fluentcart-developer/references/database/models/order-tax-rate.md +172 -0
- package/dist/skills/fluentcart-developer/references/database/models/order-transaction.md +440 -0
- package/dist/skills/fluentcart-developer/references/database/models/order.md +727 -0
- package/dist/skills/fluentcart-developer/references/database/models/product-detail.md +397 -0
- package/dist/skills/fluentcart-developer/references/database/models/product-download.md +258 -0
- package/dist/skills/fluentcart-developer/references/database/models/product-meta.md +153 -0
- package/dist/skills/fluentcart-developer/references/database/models/product-variation.md +556 -0
- package/dist/skills/fluentcart-developer/references/database/models/product.md +580 -0
- package/dist/skills/fluentcart-developer/references/database/models/relationships.md +427 -0
- package/dist/skills/fluentcart-developer/references/database/models/scheduled-action.md +175 -0
- package/dist/skills/fluentcart-developer/references/database/models/shipping-class.md +148 -0
- package/dist/skills/fluentcart-developer/references/database/models/shipping-method.md +280 -0
- package/dist/skills/fluentcart-developer/references/database/models/shipping-zone.md +205 -0
- package/dist/skills/fluentcart-developer/references/database/models/subscription-meta.md +173 -0
- package/dist/skills/fluentcart-developer/references/database/models/subscription.md +528 -0
- package/dist/skills/fluentcart-developer/references/database/models/tax-class.md +195 -0
- package/dist/skills/fluentcart-developer/references/database/models/tax-rate.md +225 -0
- package/dist/skills/fluentcart-developer/references/database/models/user-meta.md +166 -0
- package/dist/skills/fluentcart-developer/references/database/models/user.md +220 -0
- package/dist/skills/fluentcart-developer/references/database/models.md +404 -0
- package/dist/skills/fluentcart-developer/references/database/query-builder.md +860 -0
- package/dist/skills/fluentcart-developer/references/database/readme.md +276 -0
- package/dist/skills/fluentcart-developer/references/database/schema.md +1002 -0
- package/dist/skills/fluentcart-developer/references/engineering/adding-custom-pages-to-the-customer-dashboard.md +395 -0
- package/dist/skills/fluentcart-developer/references/engineering/index.md +4 -0
- package/dist/skills/fluentcart-developer/references/engineering.md +4 -0
- package/dist/skills/fluentcart-developer/references/getting-started.md +249 -0
- package/dist/skills/fluentcart-developer/references/guides/frontend.md +519 -0
- package/dist/skills/fluentcart-developer/references/guides/index.md +107 -0
- package/dist/skills/fluentcart-developer/references/guides/integrations.md +600 -0
- package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/index.md +237 -0
- package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/labels-and-tracking.md +481 -0
- package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/live-rates.md +269 -0
- package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/reference.md +223 -0
- package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/settings.md +370 -0
- package/dist/skills/fluentcart-developer/references/guides/shipping-carrier.md +237 -0
- package/dist/skills/fluentcart-developer/references/{subscription-customization.md → guides/subscriptions.md} +57 -37
- package/dist/skills/fluentcart-developer/references/hooks/actions/admin-and-templates.md +1079 -0
- package/dist/skills/fluentcart-developer/references/hooks/actions/cart-and-checkout.md +1795 -0
- package/dist/skills/fluentcart-developer/references/hooks/actions/customers-and-users.md +327 -0
- package/dist/skills/fluentcart-developer/references/hooks/actions/licenses.md +829 -0
- package/dist/skills/fluentcart-developer/references/hooks/actions/modules.md +81 -0
- package/dist/skills/fluentcart-developer/references/hooks/actions/orders.md +757 -0
- package/dist/skills/fluentcart-developer/references/hooks/actions/payments-and-integrations.md +1163 -0
- package/dist/skills/fluentcart-developer/references/hooks/actions/pro-modules.md +219 -0
- package/dist/skills/fluentcart-developer/references/hooks/actions/products-and-coupons.md +1019 -0
- package/dist/skills/fluentcart-developer/references/hooks/actions/subscriptions.md +1290 -0
- package/dist/skills/fluentcart-developer/references/hooks/actions.md +16 -0
- package/dist/skills/fluentcart-developer/references/hooks/deprecated.md +60 -0
- package/dist/skills/fluentcart-developer/references/hooks/filters/cart-and-checkout.md +2032 -0
- package/dist/skills/fluentcart-developer/references/hooks/filters/customers-and-subscriptions.md +1746 -0
- package/dist/skills/fluentcart-developer/references/hooks/filters/integrations-and-advanced.md +2439 -0
- package/dist/skills/fluentcart-developer/references/hooks/filters/modules.md +464 -0
- package/dist/skills/fluentcart-developer/references/hooks/filters/orders-and-payments.md +2658 -0
- package/dist/skills/fluentcart-developer/references/hooks/filters/pro-modules.md +502 -0
- package/dist/skills/fluentcart-developer/references/hooks/filters/products-and-pricing.md +1785 -0
- package/dist/skills/fluentcart-developer/references/hooks/filters/settings-and-configuration.md +2966 -0
- package/dist/skills/fluentcart-developer/references/hooks/filters.md +14 -0
- package/dist/skills/fluentcart-developer/references/hooks/index.md +35 -0
- package/dist/skills/fluentcart-developer/references/index.md +625 -0
- package/dist/skills/fluentcart-developer/references/{fee-system-guide.md → modules/fee-system.md} +38 -60
- package/dist/skills/fluentcart-developer/references/{ghost-product-selling.md → modules/ghost-product-selling.md} +71 -89
- package/dist/skills/fluentcart-developer/references/modules/index.md +484 -0
- package/dist/skills/fluentcart-developer/references/modules/licensing.md +342 -0
- package/dist/skills/fluentcart-developer/references/modules/order-bump.md +433 -0
- package/dist/skills/fluentcart-developer/references/modules/payment-methods.md +129 -0
- package/dist/skills/fluentcart-developer/references/modules/refunds.md +170 -0
- package/dist/skills/fluentcart-developer/references/modules/shipping.md +846 -0
- package/dist/skills/fluentcart-developer/references/modules/storage.md +986 -0
- package/dist/skills/fluentcart-developer/references/modules/subscription-vendor-ids.md +186 -0
- package/dist/skills/fluentcart-developer/references/modules/subscriptions.md +678 -0
- package/dist/skills/fluentcart-developer/references/payment-methods-integration/index.md +164 -0
- package/dist/skills/fluentcart-developer/references/payment-methods-integration/paddle-example.md +1648 -0
- package/dist/skills/fluentcart-developer/references/payment-methods-integration/payment/setting/fields.md +353 -0
- package/dist/skills/fluentcart-developer/references/payment-methods-integration/quick-implementation.md +1079 -0
- package/dist/skills/fluentcart-developer/references/payment-methods-integration.md +164 -0
- package/dist/skills/fluentcart-developer/references/restapi/checkout.md +573 -0
- package/dist/skills/fluentcart-developer/references/restapi/coupons.md +958 -0
- package/dist/skills/fluentcart-developer/references/restapi/customer-profile.md +1423 -0
- package/dist/skills/fluentcart-developer/references/{rest-api-customers.md → restapi/customers.md} +406 -424
- package/dist/skills/fluentcart-developer/references/restapi/dashboard.md +1083 -0
- package/dist/skills/fluentcart-developer/references/restapi/data-export.md +132 -0
- package/dist/skills/fluentcart-developer/references/restapi/email-notifications.md +846 -0
- package/dist/skills/fluentcart-developer/references/restapi/files.md +313 -0
- package/dist/skills/fluentcart-developer/references/restapi/index.md +127 -0
- package/dist/skills/fluentcart-developer/references/restapi/integrations.md +1000 -0
- package/dist/skills/fluentcart-developer/references/restapi/inventory.md +192 -0
- package/dist/skills/fluentcart-developer/references/restapi/labels-and-attributes.md +797 -0
- package/dist/skills/fluentcart-developer/references/restapi/licensing.md +1733 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-available-shipping-methods.md +30 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-checkout-summary.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-country-info.md +29 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-order-info.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-shipping-methods-list-view.md +30 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/login.md +66 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/place-order.md +179 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/apply-coupon.md +83 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/cancel-coupon.md +87 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/check-product-eligibility.md +59 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/create-coupon.md +230 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/delete-coupon.md +29 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/get-coupon-settings.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/get-coupon.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/list-coupon-codes.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/list-coupons.md +37 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/re-apply-coupons.md +75 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/store-coupon-settings.md +40 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/update-coupon.md +133 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/create-address-checkout.md +138 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/create-profile-address.md +119 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/dashboard-overview.md +22 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/delete-profile-address.md +46 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-order-details.md +30 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-portal-sections.md +29 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-profile-details.md +22 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-transaction-billing-address.md +30 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-upgrade-paths.md +31 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/list-downloads.md +29 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/list-orders.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/make-profile-address-primary.md +55 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/pause-subscription.md +29 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/resume-subscription.md +29 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/save-transaction-billing-address.md +92 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/select-address-for-checkout.md +32 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/update-profile-address.md +115 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/update-profile-details.md +69 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/attach-user.md +50 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/bulk-actions.md +65 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/create-address.md +135 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/create-customer.md +108 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/delete-address.md +62 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/detach-user.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/find-customer-order.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-attachable-users.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-customer-addresses.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-customer-orders.md +37 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-customer-stats.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-customer.md +32 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/list-customers.md +37 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/recalculate-ltv.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/set-primary-address.md +72 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/update-additional-info.md +55 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/update-address.md +144 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/customers/update-customer.md +123 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/attach-note-to-order.md +49 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/create-all-pages.md +21 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/create-single-page.md +55 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/delete-activity.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-country-info.md +29 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-dashboard-stats.md +22 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-filter-options.md +31 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-onboarding-data.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-onboarding-settings.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-print-templates.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-search-options.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-widgets.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/initialize-app.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/list-activities.md +33 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/list-attachments.md +21 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/list-countries.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/mark-activity-read.md +53 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/run-data-backfills.md +21 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/save-onboarding-settings.md +54 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/save-onboarding-tax-settings.md +73 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/save-print-templates.md +64 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/upload-attachment.md +42 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/export-customers-batch.md +129 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/export-licenses-batch.md +133 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/export-orders-batch.md +129 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/export-subscriptions-batch.md +129 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/get-customers-export-schema.md +21 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/get-licenses-export-schema.md +26 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/get-orders-export-schema.md +21 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/get-subscriptions-export-schema.md +21 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/enable-notification.md +57 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-digest-settings.md +22 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-notification.md +30 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-reminders.md +22 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-settings.md +22 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-shortcodes.md +22 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/list-notifications.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/preview-default-template.md +66 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/preview-notification.md +50 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/save-digest-settings.md +101 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/save-reminders.md +162 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/save-settings.md +99 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/send-digest-test.md +47 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/send-manual-reminder.md +51 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/update-notification.md +93 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/files/delete-file.md +31 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/files/get-bucket-list.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/files/list-files.md +30 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/files/upload-editor-file.md +32 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/files/upload-file.md +34 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/integration/chained-data-request.md +46 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/integration/change-feed-status.md +51 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/integration/delete-feed.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-dynamic-options.md +29 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-feed-lists.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-feed-settings.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-global-feeds.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-global-settings.md +26 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/integration/install-addon-plugin.md +49 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/integration/list-addons.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/integration/save-feed-settings.md +52 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/integration/set-global-settings.md +50 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/bulk-update-stock.md +94 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/export-inventory.md +81 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/get-adjustment-history.md +26 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/get-inventory-stats.md +21 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/list-inventory.md +33 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/update-stock.md +75 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/create-attribute-group.md +31 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/create-label.md +31 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/create-terms.md +90 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/delete-attribute-group.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/delete-attribute-term.md +29 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/get-attribute-group.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/get-attribute-library.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/list-attribute-groups.md +32 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/list-attribute-terms.md +33 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/list-labels.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/reorder-groups.md +51 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/reorder-terms.md +56 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/update-attribute-group.md +37 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/update-attribute-term.md +39 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/update-label-selections.md +32 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/activate-plugin-license.md +41 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/activate-site-admin.md +60 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/deactivate-plugin-license.md +18 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/deactivate-site-admin.md +67 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/deactivate-site-customer.md +47 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/delete-license.md +24 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/extend-license-validity.md +47 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-customer-license-details.md +25 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-customer-licenses-admin.md +26 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-license-activations.md +25 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-license-details.md +25 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-license-site.md +30 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-plugin-license-status.md +18 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-product-license-settings.md +24 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/list-customer-licenses.md +25 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/list-license-sites.md +33 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/list-licenses.md +38 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-activate-license.md +54 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-check-license.md +26 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-deactivate-license.md +46 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-download-license-package.md +23 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-get-license-version.md +26 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/regenerate-license-key.md +24 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/save-product-license-settings.md +193 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/update-license-activation-limit.md +53 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/update-license-status.md +52 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/create-order-bump.md +47 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/delete-order-bump.md +25 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/get-order-bump.md +25 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/list-order-bumps.md +29 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/update-order-bump.md +141 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/accept-dispute.md +47 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/bulk-actions.md +72 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/calculate-shipping.md +67 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/calculate-tax.md +98 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/change-customer.md +50 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/charge-now.md +29 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/create-and-change-customer.md +92 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/create-custom-order-item.md +68 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/create-order.md +351 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/create-renewal-now.md +29 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/delete-order.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/generate-missing-licenses.md +29 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-order-transactions.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-order.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-renewal.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-shipping-methods.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-single-transaction.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/list-order-currencies.md +22 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/list-orders.md +42 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/list-renewals.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/mark-as-paid.md +61 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/price-order.md +135 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/refund-order.md +72 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/resend-renewal-invoice.md +29 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/skip-renewal.md +48 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/sync-order-statuses.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/sync-pending-transaction.md +29 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-order-address-id.md +60 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-order-address.md +98 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-order.md +172 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-statuses.md +77 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-subscription-details.md +84 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-transaction-status.md +51 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/orders/void-renewal.md +30 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/create-pdf-template.md +42 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/delete-pdf-template.md +26 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/download-pdf-preview.md +44 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-factory-default-templates.md +19 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-pdf-status.md +21 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-pdf-template.md +26 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-saved-templates.md +21 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-seller-details.md +19 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/list-pdf-templates.md +19 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/save-pdf-template.md +53 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/save-seller-details.md +97 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/add-product-terms.md +64 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/bulk-edit-fetch.md +30 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/bulk-insert-products.md +62 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/bulk-update-products.md +59 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/bulk-update-variants.md +83 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/change-integration-status.md +64 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/create-dummy-products.md +45 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/create-product.md +81 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/create-variation.md +181 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-downloadable-file.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-product-integration.md +30 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-product.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-taxonomy-term.md +55 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-upgrade-path.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-variation.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/do-bulk-action.md +56 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/duplicate-product.md +56 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/fetch-products-by-ids.md +26 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/fetch-taxonomy-terms.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/fetch-terms-by-parent.md +60 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/fetch-variations-by-ids.md +26 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/find-subscription-variants.md +26 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-bundle-info.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-downloadable-url.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-max-excerpt-word-count.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-pricing-widgets.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-product-integration-feeds.md +29 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-product-integration-settings.md +31 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-product-pricing.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-product.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-related-products.md +31 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-upgrade-settings.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-variation-upgrade-paths.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/group-bulk-update-variants.md +103 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/list-all-variants.md +26 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/list-product-variations.md +26 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/list-products.md +34 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/remove-shipping-class.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/remove-tax-class.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/save-bundle-info.md +56 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/save-product-integration.md +62 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/save-upgrade-path.md +78 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/search-product-variant-options.md +29 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/search-products-by-name.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/search-variants-by-name.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/set-variation-media.md +74 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/suggest-sku.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/sync-downloadable-files.md +134 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/sync-taxonomy-terms.md +61 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/toggle-product-tax-exemption.md +56 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-downloadable-file.md +98 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-inventory.md +56 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-long-desc-editor-mode.md +49 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-manage-stock.md +53 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-product-detail.md +58 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-product-pricing.md +225 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-shipping-class.md +49 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-tax-class.md +49 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-upgrade-path.md +78 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-variant-option.md +79 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-variant-tax-exemption.md +56 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-variation-pricing-table.md +49 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-variation.md +105 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/public-shop/get-product-views.md +34 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/public-shop/list-products.md +42 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/public-shop/search-products.md +30 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/channel-rules.md +24 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/country-heat-map.md +22 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/coupon-overview.md +37 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/coupons.md +36 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-insights.md +31 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-overview.md +36 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-repeat.md +35 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-segment-customers.md +36 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-segments.md +30 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-value.md +34 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/dashboard-stats.md +30 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/failed-orders.md +34 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/fetch-new-vs-returning-customer.md +34 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/fetch-report-by-day-and-hour.md +34 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/fetch-report-meta.md +29 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/fetch-top-sold-products.md +34 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/future-renewals.md +31 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/generate-retention-snapshots.md +24 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/get-overview.md +30 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/get-recent-activities.md +26 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/get-recent-orders.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/get-revenue.md +37 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/installments-at-risk.md +35 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/installments-variations.md +33 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/installments.md +33 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/item-count-distribution.md +34 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/license-chart.md +30 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/license-pie-chart.md +22 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/license-summary.md +22 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/locations.md +43 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/order-chart.md +37 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/order-completion-time.md +34 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/order-mix.md +34 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/order-value-distribution.md +34 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/payment-methods-disputes.md +38 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/payment-methods-methods.md +36 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/payment-methods.md +37 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/product-comparison-launch.md +33 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/product-comparison.md +40 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/product-detail.md +37 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/product-sales.md +37 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/refunds-overview.md +37 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/retention-snapshots-step.md +45 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/sales-growth-chart.md +35 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/save-channel-rules.md +73 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/source-channels.md +37 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/sources.md +49 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-cohorts.md +33 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-health.md +30 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-rebuys.md +37 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-retention.md +34 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-variations.md +22 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscriptions-overview.md +37 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/reports/weeks-between-refund.md +34 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/assign-role.md +48 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/delete-role-assignment.md +47 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/get-role.md +25 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/list-managers.md +18 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/list-roles.md +18 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/search-users.md +25 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/update-role.md +43 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/saved-views/create-saved-view.md +106 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/saved-views/delete-saved-view.md +26 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/saved-views/list-saved-views.md +25 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/saved-views/update-saved-view.md +83 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/activate-payment-addon.md +44 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/activate-plugin-addon.md +44 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/change-storage-driver-status.md +56 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/check-paypal-webhook.md +26 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/create-storage-bucket.md +63 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/disconnect-payment-method.md +55 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/exchange-paypal-seller-auth-token.md +62 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-active-storage-drivers.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-checkout-fields.md +22 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-email-shortcodes.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-mcp-config-snippets.md +26 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-mcp-status.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-module-settings.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-payment-method-connection-info.md +26 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-payment-method-settings.md +26 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-permissions.md +22 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-plugin-addons.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-storage-driver-settings.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-store-settings.md +26 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/install-mcp-adapter.md +21 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/install-payment-addon.md +60 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/install-plugin-addon.md +64 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/list-all-payment-methods.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/list-all-storage-drivers.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/list-storage-buckets.md +67 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/reorder-payment-methods.md +55 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/reset-storage-driver-settings.md +45 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-checkout-fields.md +133 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-confirmation-settings.md +68 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-module-settings.md +68 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-payment-method-design.md +67 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-payment-method-settings.md +58 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-permissions.md +68 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-storage-driver-settings.md +62 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-store-settings.md +239 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/setup-paypal-webhook.md +48 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/toggle-mcp.md +40 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/verify-storage-driver-connection.md +62 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/settings/verify-turnstile-keys.md +55 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/create-shipping-class.md +73 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/create-shipping-method.md +110 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/create-shipping-zone.md +56 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/delete-shipping-class.md +29 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/delete-shipping-method.md +29 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/delete-shipping-zone.md +29 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-shipping-class-profile.md +30 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-shipping-class.md +29 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-shipping-packages.md +22 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-shipping-zone.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-zone-countries.md +22 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-zone-states.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/list-shipping-classes.md +31 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/list-shipping-zones.md +31 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/save-shipping-packages.md +112 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/update-shipping-class.md +79 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/update-shipping-method.md +113 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/update-shipping-zone.md +62 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/update-zone-order.md +52 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/cancel-auto-renew.md +30 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/cancel-subscription.md +52 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/confirm-subscription-switch.md +70 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/fetch-subscription-remote.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/generate-early-payment-link.md +29 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/get-customer-subscription.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/get-or-create-plan.md +69 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/get-setup-intent-attempts.md +30 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/get-subscription.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/initiate-early-payment.md +31 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/list-customer-subscriptions.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/list-subscriptions.md +39 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/pause-subscription.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/reactivate-subscription.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/resume-subscription.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/switch-payment-method.md +70 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/update-payment-method.md +69 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/update-vendor-ids.md +56 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/verify-vendor-ids.md +56 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/create-tax-class.md +51 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/create-tax-rate.md +117 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/delete-product-override.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/delete-shipping-tax-override.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/delete-tax-class.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/delete-tax-rate.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-country-tax-id.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-country-tax-rates.md +28 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-eu-vat-product-overrides.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-oss-country-rates.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-preconfigured-tax-rates.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-product-overrides.md +27 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-tax-settings.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/list-all-tax-rates.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/list-tax-classes.md +20 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/list-tax-records.md +37 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/mark-taxes-as-filed.md +58 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/reset-eu-vat-rates.md +21 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-configured-countries.md +57 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-country-tax-id.md +50 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-eu-vat-cross-border-settings.md +127 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-oss-country-rates.md +100 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-product-override.md +110 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-shipping-tax-override.md +52 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-tax-settings.md +166 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/update-country-status.md +54 -0
- package/dist/skills/fluentcart-developer/references/restapi/operations/tax/update-tax-rate.md +116 -0
- package/dist/skills/fluentcart-developer/references/restapi/order-bumps.md +433 -0
- package/dist/skills/fluentcart-developer/references/{rest-api-orders.md → restapi/orders.md} +146 -396
- package/dist/skills/fluentcart-developer/references/restapi/pdf-templates.md +212 -0
- package/dist/skills/fluentcart-developer/references/{rest-api-products.md → restapi/products.md} +354 -566
- package/dist/skills/fluentcart-developer/references/restapi/public-shop.md +191 -0
- package/dist/skills/fluentcart-developer/references/restapi/reports.md +3773 -0
- package/dist/skills/fluentcart-developer/references/restapi/roles.md +403 -0
- package/dist/skills/fluentcart-developer/references/restapi/saved-views.md +136 -0
- package/dist/skills/fluentcart-developer/references/restapi/settings.md +1423 -0
- package/dist/skills/fluentcart-developer/references/{rest-api-shipping.md → restapi/shipping.md} +243 -138
- package/dist/skills/fluentcart-developer/references/restapi/subscriptions.md +1169 -0
- package/dist/skills/fluentcart-developer/references/restapi/tax.md +1551 -0
- package/dist/skills/fluentcart-developer/references/restapi.md +127 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/skills/fluentcart-developer/.claude-plugin/plugin.json +0 -12
- package/dist/skills/fluentcart-developer/.mcp.json +0 -11
- package/dist/skills/fluentcart-developer/references/action-hooks-admin-templates.md +0 -787
- package/dist/skills/fluentcart-developer/references/action-hooks-cart-checkout.md +0 -1355
- package/dist/skills/fluentcart-developer/references/action-hooks-customers-users.md +0 -266
- package/dist/skills/fluentcart-developer/references/action-hooks-licenses.md +0 -855
- package/dist/skills/fluentcart-developer/references/action-hooks-orders.md +0 -631
- package/dist/skills/fluentcart-developer/references/action-hooks-payments-integrations.md +0 -963
- package/dist/skills/fluentcart-developer/references/action-hooks-products-coupons.md +0 -585
- package/dist/skills/fluentcart-developer/references/action-hooks-subscriptions.md +0 -661
- package/dist/skills/fluentcart-developer/references/customer-dashboard-endpoints.md +0 -169
- package/dist/skills/fluentcart-developer/references/database-models-query-builder.md +0 -194
- package/dist/skills/fluentcart-developer/references/database-models-reference.md +0 -604
- package/dist/skills/fluentcart-developer/references/database-schema-reference.md +0 -947
- package/dist/skills/fluentcart-developer/references/engineering-notes.md +0 -154
- package/dist/skills/fluentcart-developer/references/filter-hooks-cart-checkout.md +0 -1202
- package/dist/skills/fluentcart-developer/references/filter-hooks-customers-subscriptions.md +0 -902
- package/dist/skills/fluentcart-developer/references/filter-hooks-integrations-advanced.md +0 -1598
- package/dist/skills/fluentcart-developer/references/filter-hooks-orders-payments.md +0 -1319
- package/dist/skills/fluentcart-developer/references/filter-hooks-products-pricing.md +0 -628
- package/dist/skills/fluentcart-developer/references/filter-hooks-settings-configuration.md +0 -1177
- package/dist/skills/fluentcart-developer/references/fluentcart-developer-guide.md +0 -154
- package/dist/skills/fluentcart-developer/references/hooks-complete-index.md +0 -834
- package/dist/skills/fluentcart-developer/references/models-complete-index.md +0 -912
- package/dist/skills/fluentcart-developer/references/modules-and-extensions-reference.md +0 -224
- package/dist/skills/fluentcart-developer/references/order-bump-module.md +0 -163
- package/dist/skills/fluentcart-developer/references/paddle-gateway-case-study.md +0 -1931
- package/dist/skills/fluentcart-developer/references/payment-gateway-integration.md +0 -761
- package/dist/skills/fluentcart-developer/references/rest-api-checkout.md +0 -288
- package/dist/skills/fluentcart-developer/references/rest-api-coupons.md +0 -801
- package/dist/skills/fluentcart-developer/references/rest-api-customer-profile.md +0 -190
- package/dist/skills/fluentcart-developer/references/rest-api-dashboard-utilities.md +0 -219
- package/dist/skills/fluentcart-developer/references/rest-api-email-notifications.md +0 -619
- package/dist/skills/fluentcart-developer/references/rest-api-files.md +0 -290
- package/dist/skills/fluentcart-developer/references/rest-api-integrations.md +0 -324
- package/dist/skills/fluentcart-developer/references/rest-api-labels-attributes.md +0 -321
- package/dist/skills/fluentcart-developer/references/rest-api-licensing.md +0 -174
- package/dist/skills/fluentcart-developer/references/rest-api-order-bumps.md +0 -200
- package/dist/skills/fluentcart-developer/references/rest-api-overview.md +0 -131
- package/dist/skills/fluentcart-developer/references/rest-api-public-shop.md +0 -172
- package/dist/skills/fluentcart-developer/references/rest-api-reference.md +0 -552
- package/dist/skills/fluentcart-developer/references/rest-api-reports.md +0 -377
- package/dist/skills/fluentcart-developer/references/rest-api-roles-permissions.md +0 -147
- package/dist/skills/fluentcart-developer/references/rest-api-settings.md +0 -528
- package/dist/skills/fluentcart-developer/references/rest-api-subscriptions.md +0 -938
- package/dist/skills/fluentcart-developer/references/rest-api-tax.md +0 -356
- package/dist/skills/fluentcart-developer/references/shipping-module-guide.md +0 -126
- package/dist/skills/fluentcart-developer/references/software-licensing-sdk.md +0 -228
- package/dist/skills/fluentcart-developer/references/storage-drivers-module.md +0 -140
package/dist/skills/fluentcart-developer/references/hooks/filters/integrations-and-advanced.md
ADDED
|
@@ -0,0 +1,2439 @@
|
|
|
1
|
+
# Integrations & Advanced
|
|
2
|
+
|
|
3
|
+
All filters related to external integrations, file storage, templates, [License](/database/models/license.md) management, and advanced features.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Integration Actions & Feeds
|
|
8
|
+
|
|
9
|
+
### ` order_integrations `
|
|
10
|
+
|
|
11
|
+
`fluent_cart/integration/order_integrations` — Filter all registered order integrations
|
|
12
|
+
|
|
13
|
+
**When it runs:** This filter is applied when retrieving the list of all registered order integrations. It is used across integration event handling, integration controllers, product integration setup, global settings, and addon modules.
|
|
14
|
+
|
|
15
|
+
**Parameters:**
|
|
16
|
+
|
|
17
|
+
- `$integrations` (array): Array of registered integrations (default `[]`)
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
$integrations = [
|
|
21
|
+
'mailchimp' => [
|
|
22
|
+
'title' => 'MailChimp',
|
|
23
|
+
'logo' => 'https://example.com/mailchimp-logo.png',
|
|
24
|
+
'enabled' => true
|
|
25
|
+
]
|
|
26
|
+
];
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Returns:**
|
|
30
|
+
|
|
31
|
+
- `$integrations` (array): The modified integrations array
|
|
32
|
+
|
|
33
|
+
**Source:** `IntegrationEventListener.php:54,247,386`, `IntegrationController.php:96,150`, `ProductIntegrationsController.php:18,48`, `GlobalIntegrationSettings.php:84`, `AddOnModule.php:16`
|
|
34
|
+
|
|
35
|
+
**Usage:**
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
add_filter('fluent_cart/integration/order_integrations', function ($integrations) {
|
|
39
|
+
$integrations['custom_crm'] = [
|
|
40
|
+
'title' => 'Custom CRM',
|
|
41
|
+
'logo' => 'https://example.com/crm-logo.png',
|
|
42
|
+
'enabled' => true,
|
|
43
|
+
];
|
|
44
|
+
return $integrations;
|
|
45
|
+
});
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### ` run_all_actions_on_async `
|
|
49
|
+
|
|
50
|
+
`fluent_cart/integration/run_all_actions_on_async` — Force all integration actions to run asynchronously
|
|
51
|
+
|
|
52
|
+
**When it runs:** This filter controls whether integration actions should be dispatched asynchronously instead of running immediately during order processing.
|
|
53
|
+
|
|
54
|
+
**Parameters:**
|
|
55
|
+
|
|
56
|
+
- `$async` (bool): Whether to force async execution (default `false`)
|
|
57
|
+
- `$order` ([Order](/database/models/order.md)): The order model
|
|
58
|
+
- `$hook` (string): The integration hook being fired
|
|
59
|
+
|
|
60
|
+
**Returns:**
|
|
61
|
+
|
|
62
|
+
- `$async` (bool): Whether to run actions asynchronously
|
|
63
|
+
|
|
64
|
+
**Source:** `IntegrationEventListener.php:145`
|
|
65
|
+
|
|
66
|
+
**Usage:**
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
add_filter('fluent_cart/integration/run_all_actions_on_async', function ($async, $order, $hook) {
|
|
70
|
+
// Force async for large orders to avoid timeout
|
|
71
|
+
if ($order->total > 100000) {
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
return $async;
|
|
75
|
+
}, 10, 3);
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### ` global_notification_types `
|
|
79
|
+
|
|
80
|
+
`fluent_cart/integration/global_notification_types` — Filter available notification types
|
|
81
|
+
|
|
82
|
+
**When it runs:** This filter is applied when retrieving the list of available global notification types for integrations.
|
|
83
|
+
|
|
84
|
+
**Parameters:**
|
|
85
|
+
|
|
86
|
+
- `$types` (array): Array of notification types (default `[]`)
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
$types = [
|
|
90
|
+
'email' => [
|
|
91
|
+
'title' => 'Email Notification',
|
|
92
|
+
'description' => 'Send email notifications'
|
|
93
|
+
]
|
|
94
|
+
];
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Returns:**
|
|
98
|
+
|
|
99
|
+
- `$types` (array): The modified notification types array
|
|
100
|
+
|
|
101
|
+
**Source:** `GlobalIntegrationSettings.php:119`
|
|
102
|
+
|
|
103
|
+
**Usage:**
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
add_filter('fluent_cart/integration/global_notification_types', function ($types) {
|
|
107
|
+
$types['sms'] = [
|
|
108
|
+
'title' => 'SMS Notification',
|
|
109
|
+
'description' => 'Send SMS notifications on order events',
|
|
110
|
+
];
|
|
111
|
+
return $types;
|
|
112
|
+
});
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### ` global_notification_feed_{$feed_key} `
|
|
116
|
+
|
|
117
|
+
`fluent_cart/integration/global_notification_feed_{$feed_key}` — Filter notification feed data (DYNAMIC)
|
|
118
|
+
|
|
119
|
+
**When it runs:** This dynamic filter is applied when retrieving notification feed data for a specific feed key. The `{$feed_key}` portion is replaced with the actual feed identifier.
|
|
120
|
+
|
|
121
|
+
**Parameters:**
|
|
122
|
+
|
|
123
|
+
- `$feedData` (array): The notification feed data
|
|
124
|
+
|
|
125
|
+
**Returns:**
|
|
126
|
+
|
|
127
|
+
- `$feedData` (array): The modified feed data
|
|
128
|
+
|
|
129
|
+
**Source:** `GlobalIntegrationSettings.php:151`
|
|
130
|
+
|
|
131
|
+
**Usage:**
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
add_filter('fluent_cart/integration/global_notification_feed_email_alerts', function ($feedData) {
|
|
135
|
+
// Modify email alert feed data
|
|
136
|
+
$feedData['recipients'][] = '[email protected]';
|
|
137
|
+
return $feedData;
|
|
138
|
+
});
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### ` get_global_integration_actions `
|
|
142
|
+
|
|
143
|
+
`fluent_cart/integration/get_global_integration_actions` — Filter global integration actions
|
|
144
|
+
|
|
145
|
+
**When it runs:** This filter is applied when retrieving available global integration actions that can be triggered by order events.
|
|
146
|
+
|
|
147
|
+
**Parameters:**
|
|
148
|
+
|
|
149
|
+
- `$actions` (array): Array of integration actions (default `[]`)
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
$actions = [
|
|
153
|
+
'mailchimp_subscribe' => [
|
|
154
|
+
'title' => 'Subscribe to MailChimp',
|
|
155
|
+
'enabled' => true
|
|
156
|
+
]
|
|
157
|
+
];
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**Returns:**
|
|
161
|
+
|
|
162
|
+
- `$actions` (array): The modified integration actions array
|
|
163
|
+
|
|
164
|
+
**Source:** `GlobalIntegrationActionHandler.php:22`
|
|
165
|
+
|
|
166
|
+
**Usage:**
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
add_filter('fluent_cart/integration/get_global_integration_actions', function ($actions) {
|
|
170
|
+
$actions['custom_webhook'] = [
|
|
171
|
+
'title' => 'Fire Custom Webhook',
|
|
172
|
+
'enabled' => true,
|
|
173
|
+
];
|
|
174
|
+
return $actions;
|
|
175
|
+
});
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### ` notifying_async_{$feedKey} `
|
|
179
|
+
|
|
180
|
+
`fluent_cart/integration/notifying_async_{$feedKey}` — Control async notification per feed (DYNAMIC)
|
|
181
|
+
|
|
182
|
+
**When it runs:** This dynamic filter controls whether a specific notification feed should be dispatched asynchronously. The `{$feedKey}` is replaced with the actual feed key.
|
|
183
|
+
|
|
184
|
+
**Parameters:**
|
|
185
|
+
|
|
186
|
+
- `$async` (bool): Whether to process this notification asynchronously (default `true`)
|
|
187
|
+
|
|
188
|
+
**Returns:**
|
|
189
|
+
|
|
190
|
+
- `$async` (bool): Whether to use async processing
|
|
191
|
+
|
|
192
|
+
**Source:** `GlobalNotificationHandler.php:104`
|
|
193
|
+
|
|
194
|
+
**Usage:**
|
|
195
|
+
|
|
196
|
+
```
|
|
197
|
+
add_filter('fluent_cart/integration/notifying_async_email_alerts', function ($async) {
|
|
198
|
+
// Force synchronous for email alerts
|
|
199
|
+
return false;
|
|
200
|
+
});
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### ` webhook/payload `
|
|
204
|
+
|
|
205
|
+
`fluent_cart/webhook/payload` Pro — Filter webhook payload before sending
|
|
206
|
+
|
|
207
|
+
**When it runs:** This filter is applied to the webhook payload body after it is constructed but before it is encoded and sent to the external endpoint. Allows complete customization of webhook data.
|
|
208
|
+
|
|
209
|
+
**Parameters:**
|
|
210
|
+
|
|
211
|
+
- `$payloadBody` (array): The payload body data
|
|
212
|
+
- `$context` (array): Context data
|
|
213
|
+
|
|
214
|
+
```
|
|
215
|
+
$context = [
|
|
216
|
+
'order' => $orderModel, // The order model
|
|
217
|
+
'feed' => $feedConfig, // The webhook feed configuration
|
|
218
|
+
'event_data' => $eventData // The original event data
|
|
219
|
+
];
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
**Returns:**
|
|
223
|
+
|
|
224
|
+
- `$payloadBody` (array): The modified payload body
|
|
225
|
+
|
|
226
|
+
**Source:** `fluent-cart-pro/app/Modules/Integrations/WebhookConnect.php:251`
|
|
227
|
+
|
|
228
|
+
**Usage:**
|
|
229
|
+
|
|
230
|
+
```
|
|
231
|
+
add_filter('fluent_cart/webhook/payload', function ($payloadBody, $context) {
|
|
232
|
+
// Add custom field to payload
|
|
233
|
+
$payloadBody['custom_meta'] = [
|
|
234
|
+
'source' => 'fluentcart',
|
|
235
|
+
'timestamp' => gmdate('Y-m-d H:i:s')
|
|
236
|
+
];
|
|
237
|
+
|
|
238
|
+
// Remove sensitive data
|
|
239
|
+
unset($payloadBody['customer']['email']);
|
|
240
|
+
|
|
241
|
+
return $payloadBody;
|
|
242
|
+
}, 10, 2);
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## Integration Settings & Configuration
|
|
248
|
+
|
|
249
|
+
### ` global_integration_settings_{$key} `
|
|
250
|
+
|
|
251
|
+
`fluent_cart/integration/global_integration_settings_{$key}` — Filter integration settings (DYNAMIC)
|
|
252
|
+
|
|
253
|
+
**When it runs:** This dynamic filter is applied when retrieving settings for a specific integration. The `{$key}` is replaced with the integration key (e.g., `mailchimp`, `zapier`).
|
|
254
|
+
|
|
255
|
+
**Parameters:**
|
|
256
|
+
|
|
257
|
+
- `$settings` (array): The integration settings (default `[]`)
|
|
258
|
+
|
|
259
|
+
**Returns:**
|
|
260
|
+
|
|
261
|
+
- `$settings` (array): The modified settings array
|
|
262
|
+
|
|
263
|
+
**Source:** `GlobalIntegrationSettings.php:24`
|
|
264
|
+
|
|
265
|
+
**Usage:**
|
|
266
|
+
|
|
267
|
+
```
|
|
268
|
+
add_filter('fluent_cart/integration/global_integration_settings_mailchimp', function ($settings) {
|
|
269
|
+
// Override MailChimp API key from environment
|
|
270
|
+
$settings['api_key'] = defined('MAILCHIMP_API_KEY') ? MAILCHIMP_API_KEY : $settings['api_key'];
|
|
271
|
+
return $settings;
|
|
272
|
+
});
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### ` global_integration_fields_{$key} `
|
|
276
|
+
|
|
277
|
+
`fluent_cart/integration/global_integration_fields_{$key}` — Filter integration field definitions (DYNAMIC)
|
|
278
|
+
|
|
279
|
+
**When it runs:** This dynamic filter is applied when retrieving field definitions for a specific integration configuration form. The `{$key}` is replaced with the integration key.
|
|
280
|
+
|
|
281
|
+
**Parameters:**
|
|
282
|
+
|
|
283
|
+
- `$fields` (array): The field definitions (default `[]`)
|
|
284
|
+
|
|
285
|
+
**Returns:**
|
|
286
|
+
|
|
287
|
+
- `$fields` (array): The modified field definitions
|
|
288
|
+
|
|
289
|
+
**Source:** `GlobalIntegrationSettings.php:25`
|
|
290
|
+
|
|
291
|
+
**Usage:**
|
|
292
|
+
|
|
293
|
+
```
|
|
294
|
+
add_filter('fluent_cart/integration/global_integration_fields_mailchimp', function ($fields) {
|
|
295
|
+
$fields[] = [
|
|
296
|
+
'key' => 'double_optin',
|
|
297
|
+
'label' => 'Enable Double Opt-in',
|
|
298
|
+
'type' => 'checkbox',
|
|
299
|
+
];
|
|
300
|
+
return $fields;
|
|
301
|
+
});
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
### ` get_integration_defaults_{$name} `
|
|
305
|
+
|
|
306
|
+
`fluent_cart/integration/get_integration_defaults_{$name}` — Filter integration defaults (DYNAMIC)
|
|
307
|
+
|
|
308
|
+
**When it runs:** This dynamic filter is applied when retrieving default settings for a specific integration. The `{$name}` is replaced with the integration name.
|
|
309
|
+
|
|
310
|
+
**Parameters:**
|
|
311
|
+
|
|
312
|
+
- `$defaults` (array): The default settings values
|
|
313
|
+
|
|
314
|
+
**Returns:**
|
|
315
|
+
|
|
316
|
+
- `$defaults` (array): The modified defaults
|
|
317
|
+
|
|
318
|
+
**Source:** `GlobalIntegrationSettings.php:199,201`
|
|
319
|
+
|
|
320
|
+
**Usage:**
|
|
321
|
+
|
|
322
|
+
```
|
|
323
|
+
add_filter('fluent_cart/integration/get_integration_defaults_mailchimp', function ($defaults) {
|
|
324
|
+
$defaults['list_id'] = 'default_list_123';
|
|
325
|
+
$defaults['tags'] = ['fluentcart-customer'];
|
|
326
|
+
return $defaults;
|
|
327
|
+
});
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
### ` get_integration_settings_fields_{$name} `
|
|
331
|
+
|
|
332
|
+
`fluent_cart/integration/get_integration_settings_fields_{$name}` — Filter integration settings fields (DYNAMIC)
|
|
333
|
+
|
|
334
|
+
**When it runs:** This dynamic filter is applied when retrieving the settings field definitions for a specific integration. The `{$name}` is replaced with the integration name.
|
|
335
|
+
|
|
336
|
+
**Parameters:**
|
|
337
|
+
|
|
338
|
+
- `$fields` (array): The field definitions (default `[]`)
|
|
339
|
+
|
|
340
|
+
**Returns:**
|
|
341
|
+
|
|
342
|
+
- `$fields` (array): The modified field definitions
|
|
343
|
+
|
|
344
|
+
**Source:** `GlobalIntegrationSettings.php:204,276`, `IntegrationHelper.php:27`
|
|
345
|
+
|
|
346
|
+
**Usage:**
|
|
347
|
+
|
|
348
|
+
```
|
|
349
|
+
add_filter('fluent_cart/integration/get_integration_settings_fields_zapier', function ($fields) {
|
|
350
|
+
$fields[] = [
|
|
351
|
+
'key' => 'webhook_url',
|
|
352
|
+
'label' => 'Webhook URL',
|
|
353
|
+
'type' => 'url',
|
|
354
|
+
'required' => true,
|
|
355
|
+
'placeholder' => 'https://hooks.zapier.com/...',
|
|
356
|
+
];
|
|
357
|
+
return $fields;
|
|
358
|
+
});
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
### ` save_integration_values_{$name} `
|
|
362
|
+
|
|
363
|
+
`fluent_cart/integration/save_integration_values_{$name}` — Filter before saving integration data (DYNAMIC)
|
|
364
|
+
|
|
365
|
+
**When it runs:** This dynamic filter is applied just before integration settings are saved to the database. The `{$name}` is replaced with the integration name.
|
|
366
|
+
|
|
367
|
+
**Parameters:**
|
|
368
|
+
|
|
369
|
+
- `$integration` (Meta): The Meta model instance containing the integration data
|
|
370
|
+
|
|
371
|
+
**Returns:**
|
|
372
|
+
|
|
373
|
+
- `$integration` (Meta): The modified Meta model
|
|
374
|
+
|
|
375
|
+
**Source:** `GlobalIntegrationSettings.php:248`
|
|
376
|
+
|
|
377
|
+
**Usage:**
|
|
378
|
+
|
|
379
|
+
```
|
|
380
|
+
add_filter('fluent_cart/integration/save_integration_values_mailchimp', function ($integration) {
|
|
381
|
+
// Encrypt API key before saving
|
|
382
|
+
$value = $integration->value;
|
|
383
|
+
if (!empty($value['api_key'])) {
|
|
384
|
+
$value['api_key_encrypted'] = encrypt($value['api_key']);
|
|
385
|
+
}
|
|
386
|
+
$integration->value = $value;
|
|
387
|
+
return $integration;
|
|
388
|
+
});
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
### ` get_integration_merge_fields_{$name} `
|
|
392
|
+
|
|
393
|
+
`fluent_cart/integration/get_integration_merge_fields_{$name}` — Filter integration merge/mapping fields (DYNAMIC)
|
|
394
|
+
|
|
395
|
+
**When it runs:** This dynamic filter is applied when retrieving merge fields for a specific integration. These fields are used for mapping FluentCart data to external service fields.
|
|
396
|
+
|
|
397
|
+
**Parameters:**
|
|
398
|
+
|
|
399
|
+
- `$list` (array): The merge fields list
|
|
400
|
+
- `$listId` (string): The list or audience ID
|
|
401
|
+
|
|
402
|
+
**Returns:**
|
|
403
|
+
|
|
404
|
+
- `$list` (array): The modified merge fields
|
|
405
|
+
|
|
406
|
+
**Source:** `GlobalIntegrationSettings.php:369`
|
|
407
|
+
|
|
408
|
+
**Usage:**
|
|
409
|
+
|
|
410
|
+
```
|
|
411
|
+
add_filter('fluent_cart/integration/get_integration_merge_fields_mailchimp', function ($list, $listId) {
|
|
412
|
+
$list[] = [
|
|
413
|
+
'key' => 'COMPANY',
|
|
414
|
+
'label' => 'Company Name',
|
|
415
|
+
'type' => 'text',
|
|
416
|
+
];
|
|
417
|
+
return $list;
|
|
418
|
+
}, 10, 2);
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
### ` integration_options_{$key} `
|
|
422
|
+
|
|
423
|
+
`fluent_cart/integration/integration_options_{$key}` — Filter dynamic integration options (DYNAMIC)
|
|
424
|
+
|
|
425
|
+
**When it runs:** This dynamic filter is applied when retrieving option values for an integration dropdown or selection field. The `{$key}` is replaced with the option key.
|
|
426
|
+
|
|
427
|
+
**Parameters:**
|
|
428
|
+
|
|
429
|
+
- `$options` (array): The options array (default `[]`)
|
|
430
|
+
|
|
431
|
+
**Returns:**
|
|
432
|
+
|
|
433
|
+
- `$options` (array): The modified options
|
|
434
|
+
|
|
435
|
+
**Source:** `IntegrationController.php:302`
|
|
436
|
+
|
|
437
|
+
**Usage:**
|
|
438
|
+
|
|
439
|
+
```
|
|
440
|
+
add_filter('fluent_cart/integration/integration_options_mailchimp_lists', function ($options) {
|
|
441
|
+
// Add a custom list option
|
|
442
|
+
$options[] = [
|
|
443
|
+
'id' => 'custom_list',
|
|
444
|
+
'title' => 'Custom Audience',
|
|
445
|
+
];
|
|
446
|
+
return $options;
|
|
447
|
+
});
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
### ` integration_saving_data_{$provider} `
|
|
451
|
+
|
|
452
|
+
`fluent_cart/integration/integration_saving_data_{$provider}` — Filter integration data before validation (DYNAMIC)
|
|
453
|
+
|
|
454
|
+
**When it runs:** This dynamic filter is applied to integration data before it undergoes validation when saving. The `{$provider}` is replaced with the provider key.
|
|
455
|
+
|
|
456
|
+
**Parameters:**
|
|
457
|
+
|
|
458
|
+
- `$validatedData` (array): The validated integration data
|
|
459
|
+
|
|
460
|
+
**Returns:**
|
|
461
|
+
|
|
462
|
+
- `$validatedData` (array): The modified data
|
|
463
|
+
|
|
464
|
+
**Source:** `IntegrationHelper.php:62`
|
|
465
|
+
|
|
466
|
+
**Usage:**
|
|
467
|
+
|
|
468
|
+
```
|
|
469
|
+
add_filter('fluent_cart/integration/integration_saving_data_mailchimp', function ($validatedData) {
|
|
470
|
+
// Normalize tags before saving
|
|
471
|
+
if (!empty($validatedData['tags'])) {
|
|
472
|
+
$validatedData['tags'] = array_map('strtolower', $validatedData['tags']);
|
|
473
|
+
}
|
|
474
|
+
return $validatedData;
|
|
475
|
+
});
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
### ` editing_integration_{$key} `
|
|
479
|
+
|
|
480
|
+
`fluent_cart/integration/editing_integration_{$key}` — Filter integration data when editing (DYNAMIC)
|
|
481
|
+
|
|
482
|
+
**When it runs:** This dynamic filter is applied when an integration is being loaded for editing in the admin UI.
|
|
483
|
+
|
|
484
|
+
**Parameters:**
|
|
485
|
+
|
|
486
|
+
- `$data` (array): The integration data for editing
|
|
487
|
+
- `$args` (array): Additional context arguments
|
|
488
|
+
|
|
489
|
+
**Returns:**
|
|
490
|
+
|
|
491
|
+
- `$data` (array): The modified integration data
|
|
492
|
+
|
|
493
|
+
**Source:** `IntegrationHelper.php:80`
|
|
494
|
+
|
|
495
|
+
**Usage:**
|
|
496
|
+
|
|
497
|
+
```
|
|
498
|
+
add_filter('fluent_cart/integration/editing_integration_mailchimp', function ($data, $args) {
|
|
499
|
+
// Decrypt API key for display
|
|
500
|
+
if (!empty($data['api_key_encrypted'])) {
|
|
501
|
+
$data['api_key'] = decrypt($data['api_key_encrypted']);
|
|
502
|
+
}
|
|
503
|
+
return $data;
|
|
504
|
+
}, 10, 2);
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
---
|
|
508
|
+
|
|
509
|
+
## Integration Addons
|
|
510
|
+
|
|
511
|
+
### ` addons `
|
|
512
|
+
|
|
513
|
+
`fluent_cart/integration/addons` — Filter the integration addons list
|
|
514
|
+
|
|
515
|
+
**When it runs:** This filter is applied when retrieving the list of available integration addons in the admin interface.
|
|
516
|
+
|
|
517
|
+
**Parameters:**
|
|
518
|
+
|
|
519
|
+
- `$addons` (array): Array of addon definitions
|
|
520
|
+
|
|
521
|
+
**Returns:**
|
|
522
|
+
|
|
523
|
+
- `$addons` (array): The modified addons array
|
|
524
|
+
|
|
525
|
+
**Source:** `AddonsController.php:87`
|
|
526
|
+
|
|
527
|
+
**Usage:**
|
|
528
|
+
|
|
529
|
+
```
|
|
530
|
+
add_filter('fluent_cart/integration/addons', function ($addons) {
|
|
531
|
+
$addons['my_addon'] = [
|
|
532
|
+
'title' => 'My Custom Addon',
|
|
533
|
+
'description' => 'Adds custom integration functionality',
|
|
534
|
+
'logo' => 'https://example.com/addon-logo.png',
|
|
535
|
+
'enabled' => true,
|
|
536
|
+
];
|
|
537
|
+
return $addons;
|
|
538
|
+
});
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
### ` installable_repo_plugins `
|
|
542
|
+
|
|
543
|
+
`fluent_cart/installable_repo_plugins` — Filter installable plugin recommendations
|
|
544
|
+
|
|
545
|
+
**When it runs:** This filter is applied when retrieving the list of recommended plugins that can be installed from within the FluentCart admin.
|
|
546
|
+
|
|
547
|
+
**Parameters:**
|
|
548
|
+
|
|
549
|
+
- `$plugins` (array): Array of installable plugin definitions
|
|
550
|
+
|
|
551
|
+
**Returns:**
|
|
552
|
+
|
|
553
|
+
- `$plugins` (array): The modified plugins array
|
|
554
|
+
|
|
555
|
+
**Source:** `AddonsController.php:121`, `GlobalIntegrationSettings.php:396`
|
|
556
|
+
|
|
557
|
+
**Usage:**
|
|
558
|
+
|
|
559
|
+
```
|
|
560
|
+
add_filter('fluent_cart/installable_repo_plugins', function ($plugins) {
|
|
561
|
+
$plugins[] = [
|
|
562
|
+
'title' => 'FluentCRM',
|
|
563
|
+
'slug' => 'fluent-crm',
|
|
564
|
+
'description' => 'Email marketing automation',
|
|
565
|
+
'url' => 'https://wordpress.org/plugins/fluent-crm/',
|
|
566
|
+
];
|
|
567
|
+
return $plugins;
|
|
568
|
+
});
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
---
|
|
572
|
+
|
|
573
|
+
## File Storage & Downloads
|
|
574
|
+
|
|
575
|
+
### ` local_file_blocked_extensions `
|
|
576
|
+
|
|
577
|
+
`fluent_cart/local_file_blocked_extensions` — Filter blocked file extensions for local storage
|
|
578
|
+
|
|
579
|
+
**When it runs:** This filter is applied when validating a file upload to local storage, allowing you to modify the list of blocked file extensions.
|
|
580
|
+
|
|
581
|
+
**Parameters:**
|
|
582
|
+
|
|
583
|
+
- `$blockedExts` (array): Array of blocked file extensions
|
|
584
|
+
- `$localFilePath` (string): Local file path
|
|
585
|
+
- `$uploadToFilePath` (string): Target upload path
|
|
586
|
+
- `$fileInfo` (array): File information array
|
|
587
|
+
- Additional context parameters
|
|
588
|
+
|
|
589
|
+
**Returns:**
|
|
590
|
+
|
|
591
|
+
- `$blockedExts` (array): The modified blocked extensions array
|
|
592
|
+
|
|
593
|
+
**Source:** `LocalDriver.php:129`
|
|
594
|
+
|
|
595
|
+
**Usage:**
|
|
596
|
+
|
|
597
|
+
```
|
|
598
|
+
add_filter('fluent_cart/local_file_blocked_extensions', function ($blockedExts, $localFilePath, $uploadToFilePath, $fileInfo) {
|
|
599
|
+
// Block additional extensions
|
|
600
|
+
$blockedExts[] = 'svg';
|
|
601
|
+
$blockedExts[] = 'webp';
|
|
602
|
+
return $blockedExts;
|
|
603
|
+
}, 10, 4);
|
|
604
|
+
```
|
|
605
|
+
|
|
606
|
+
### ` download_expiration_minutes `
|
|
607
|
+
|
|
608
|
+
`fluent_cart/download_expiration_minutes` — Filter S3 download link expiration time
|
|
609
|
+
|
|
610
|
+
**When it runs:** This filter controls how long a pre-signed S3 download URL remains valid.
|
|
611
|
+
|
|
612
|
+
**Parameters:**
|
|
613
|
+
|
|
614
|
+
- `$expirationMinutes` (int): Expiration time in minutes
|
|
615
|
+
- `$context` (array): Context data
|
|
616
|
+
|
|
617
|
+
```
|
|
618
|
+
$context = [
|
|
619
|
+
'file_path' => 'products/my-file.zip',
|
|
620
|
+
'bucket' => 'my-bucket',
|
|
621
|
+
'driver' => 's3'
|
|
622
|
+
];
|
|
623
|
+
```
|
|
624
|
+
|
|
625
|
+
**Returns:**
|
|
626
|
+
|
|
627
|
+
- `$expirationMinutes` (int): The modified expiration time in minutes
|
|
628
|
+
|
|
629
|
+
**Source:** `S3Driver.php:237,252`
|
|
630
|
+
|
|
631
|
+
**Usage:**
|
|
632
|
+
|
|
633
|
+
```
|
|
634
|
+
add_filter('fluent_cart/download_expiration_minutes', function ($expirationMinutes, $context) {
|
|
635
|
+
// Extend expiration for large files
|
|
636
|
+
if (str_ends_with($context['file_path'], '.zip')) {
|
|
637
|
+
return 120; // 2 hours
|
|
638
|
+
}
|
|
639
|
+
return $expirationMinutes;
|
|
640
|
+
}, 10, 2);
|
|
641
|
+
```
|
|
642
|
+
|
|
643
|
+
### ` download_link_validity_in_minutes `
|
|
644
|
+
|
|
645
|
+
`fluent_cart/download_link_validity_in_minutes` — Filter download link validity duration
|
|
646
|
+
|
|
647
|
+
**When it runs:** This filter controls how long a download link remains valid for customer-facing downloads.
|
|
648
|
+
|
|
649
|
+
**Parameters:**
|
|
650
|
+
|
|
651
|
+
- `$minutes` (int): Link validity in minutes (default `60`)
|
|
652
|
+
- `$context` (array): Context data
|
|
653
|
+
|
|
654
|
+
```
|
|
655
|
+
$context = [
|
|
656
|
+
'product_download' => $downloadModel,
|
|
657
|
+
'order_id' => 123,
|
|
658
|
+
'is_admin' => false
|
|
659
|
+
];
|
|
660
|
+
```
|
|
661
|
+
|
|
662
|
+
**Returns:**
|
|
663
|
+
|
|
664
|
+
- `$minutes` (int): The modified validity in minutes
|
|
665
|
+
|
|
666
|
+
**Source:** `Helper.php:1430`
|
|
667
|
+
|
|
668
|
+
**Usage:**
|
|
669
|
+
|
|
670
|
+
```
|
|
671
|
+
add_filter('fluent_cart/download_link_validity_in_minutes', function ($minutes, $context) {
|
|
672
|
+
// Give admins longer download windows
|
|
673
|
+
if ($context['is_admin']) {
|
|
674
|
+
return 1440; // 24 hours
|
|
675
|
+
}
|
|
676
|
+
return $minutes;
|
|
677
|
+
}, 10, 2);
|
|
678
|
+
```
|
|
679
|
+
|
|
680
|
+
### ` product_download/can_be_downloaded `
|
|
681
|
+
|
|
682
|
+
`fluent_cart/product_download/can_be_downloaded` — Filter whether a file can be downloaded
|
|
683
|
+
|
|
684
|
+
**When it runs:** This filter is applied during download validation to determine if a customer is allowed to download a specific file.
|
|
685
|
+
|
|
686
|
+
**Parameters:**
|
|
687
|
+
|
|
688
|
+
- `$canDownload` (bool|WP_Error): Whether the file can be downloaded, or a WP_Error with rejection reason
|
|
689
|
+
|
|
690
|
+
**Returns:**
|
|
691
|
+
|
|
692
|
+
- `$canDownload` (bool|WP_Error): The modified download permission
|
|
693
|
+
|
|
694
|
+
**Source:** `FileDownloader.php:95`
|
|
695
|
+
|
|
696
|
+
**Usage:**
|
|
697
|
+
|
|
698
|
+
```
|
|
699
|
+
add_filter('fluent_cart/product_download/can_be_downloaded', function ($canDownload) {
|
|
700
|
+
// Block downloads during maintenance
|
|
701
|
+
if (get_option('fluent_cart_maintenance_mode')) {
|
|
702
|
+
return new \WP_Error('maintenance', 'Downloads are temporarily disabled during maintenance.');
|
|
703
|
+
}
|
|
704
|
+
return $canDownload;
|
|
705
|
+
});
|
|
706
|
+
```
|
|
707
|
+
|
|
708
|
+
### ` get_global_storage_settings_{$driver} `
|
|
709
|
+
|
|
710
|
+
`fluent_cart/storage/get_global_storage_settings_{$driver}` — Filter storage driver settings (DYNAMIC)
|
|
711
|
+
|
|
712
|
+
**When it runs:** This dynamic filter is applied when retrieving settings for a specific storage driver. The `{$driver}` is replaced with the driver name (e.g., `s3`, `local`).
|
|
713
|
+
|
|
714
|
+
**Parameters:**
|
|
715
|
+
|
|
716
|
+
- `$settings` (array): The storage driver settings (default `[]`)
|
|
717
|
+
|
|
718
|
+
**Returns:**
|
|
719
|
+
|
|
720
|
+
- `$settings` (array): The modified settings
|
|
721
|
+
|
|
722
|
+
**Source:** `api/StorageDrivers.php:18`
|
|
723
|
+
|
|
724
|
+
**Usage:**
|
|
725
|
+
|
|
726
|
+
```
|
|
727
|
+
add_filter('fluent_cart/storage/get_global_storage_settings_s3', function ($settings) {
|
|
728
|
+
// Override S3 settings from environment variables
|
|
729
|
+
$settings['bucket'] = defined('S3_BUCKET') ? S3_BUCKET : $settings['bucket'];
|
|
730
|
+
$settings['region'] = defined('S3_REGION') ? S3_REGION : $settings['region'];
|
|
731
|
+
return $settings;
|
|
732
|
+
});
|
|
733
|
+
```
|
|
734
|
+
|
|
735
|
+
### ` get_global_storage_drivers `
|
|
736
|
+
|
|
737
|
+
`fluent_cart/storage/get_global_storage_drivers` — Filter all available storage drivers
|
|
738
|
+
|
|
739
|
+
**When it runs:** This filter is applied when retrieving the list of all available storage drivers.
|
|
740
|
+
|
|
741
|
+
**Parameters:**
|
|
742
|
+
|
|
743
|
+
- `$drivers` (array): Array of storage driver definitions (default `[]`)
|
|
744
|
+
|
|
745
|
+
**Returns:**
|
|
746
|
+
|
|
747
|
+
- `$drivers` (array): The modified drivers array
|
|
748
|
+
|
|
749
|
+
**Source:** `StorageDrivers.php:28`
|
|
750
|
+
|
|
751
|
+
**Usage:**
|
|
752
|
+
|
|
753
|
+
```
|
|
754
|
+
add_filter('fluent_cart/storage/get_global_storage_drivers', function ($drivers) {
|
|
755
|
+
$drivers['backblaze'] = [
|
|
756
|
+
'title' => 'Backblaze B2',
|
|
757
|
+
'description' => 'Store files on Backblaze B2',
|
|
758
|
+
'handler' => 'BackblazeDriver',
|
|
759
|
+
];
|
|
760
|
+
return $drivers;
|
|
761
|
+
});
|
|
762
|
+
```
|
|
763
|
+
|
|
764
|
+
### ` get_global_storage_driver_status_{$driver} `
|
|
765
|
+
|
|
766
|
+
`fluent_cart/storage/get_global_storage_driver_status_{$driver}` — Filter storage driver status (DYNAMIC)
|
|
767
|
+
|
|
768
|
+
**When it runs:** This dynamic filter retrieves the connection status for a specific storage driver.
|
|
769
|
+
|
|
770
|
+
**Parameters:**
|
|
771
|
+
|
|
772
|
+
- `$status` (array): The driver status (default `[]`)
|
|
773
|
+
|
|
774
|
+
**Returns:**
|
|
775
|
+
|
|
776
|
+
- `$status` (array): The modified status array
|
|
777
|
+
|
|
778
|
+
**Source:** `StorageDrivers.php:65`
|
|
779
|
+
|
|
780
|
+
**Usage:**
|
|
781
|
+
|
|
782
|
+
```
|
|
783
|
+
add_filter('fluent_cart/storage/get_global_storage_driver_status_s3', function ($status) {
|
|
784
|
+
$status['connected'] = true;
|
|
785
|
+
$status['message'] = 'Connected to S3 bucket successfully';
|
|
786
|
+
return $status;
|
|
787
|
+
});
|
|
788
|
+
```
|
|
789
|
+
|
|
790
|
+
### ` verify_driver_connect_info_{$driver} `
|
|
791
|
+
|
|
792
|
+
`fluent_cart/verify_driver_connect_info_{$driver}` — Filter driver connection verification (DYNAMIC)
|
|
793
|
+
|
|
794
|
+
**When it runs:** This dynamic filter is applied when verifying the connection info for a storage driver.
|
|
795
|
+
|
|
796
|
+
**Parameters:**
|
|
797
|
+
|
|
798
|
+
- `$settings` (array): The driver connection settings
|
|
799
|
+
|
|
800
|
+
**Returns:**
|
|
801
|
+
|
|
802
|
+
- `$settings` (array): The modified settings (may include error information)
|
|
803
|
+
|
|
804
|
+
**Source:** `StorageDrivers.php:79`
|
|
805
|
+
|
|
806
|
+
**Usage:**
|
|
807
|
+
|
|
808
|
+
```
|
|
809
|
+
add_filter('fluent_cart/verify_driver_connect_info_s3', function ($settings) {
|
|
810
|
+
// Validate credentials before saving
|
|
811
|
+
try {
|
|
812
|
+
$client = new \Aws\S3\S3Client($settings);
|
|
813
|
+
$client->listBuckets();
|
|
814
|
+
$settings['verified'] = true;
|
|
815
|
+
} catch (\Exception $e) {
|
|
816
|
+
$settings['error'] = $e->getMessage();
|
|
817
|
+
}
|
|
818
|
+
return $settings;
|
|
819
|
+
});
|
|
820
|
+
```
|
|
821
|
+
|
|
822
|
+
### ` storage_settings_before_update_{$slug} `
|
|
823
|
+
|
|
824
|
+
`fluent_cart/storage/storage_settings_before_update_{$slug}` — Filter storage settings before saving (DYNAMIC)
|
|
825
|
+
|
|
826
|
+
**When it runs:** This dynamic filter is applied just before storage driver settings are saved, allowing you to validate or modify them.
|
|
827
|
+
|
|
828
|
+
**Parameters:**
|
|
829
|
+
|
|
830
|
+
- `$settings` (array): The new settings to save
|
|
831
|
+
- `$oldSettings` (array): The previous settings
|
|
832
|
+
|
|
833
|
+
**Returns:**
|
|
834
|
+
|
|
835
|
+
- `$settings` (array): The modified settings
|
|
836
|
+
|
|
837
|
+
**Source:** `BaseStorageDriver.php:152`
|
|
838
|
+
|
|
839
|
+
**Usage:**
|
|
840
|
+
|
|
841
|
+
```
|
|
842
|
+
add_filter('fluent_cart/storage/storage_settings_before_update_s3', function ($settings, $oldSettings) {
|
|
843
|
+
// Preserve the secret key if not provided in the update
|
|
844
|
+
if (empty($settings['secret_key']) && !empty($oldSettings['secret_key'])) {
|
|
845
|
+
$settings['secret_key'] = $oldSettings['secret_key'];
|
|
846
|
+
}
|
|
847
|
+
return $settings;
|
|
848
|
+
}, 10, 2);
|
|
849
|
+
```
|
|
850
|
+
|
|
851
|
+
### ` storage/s3_prevent_overwrite `
|
|
852
|
+
|
|
853
|
+
`fluent_cart/storage/s3_prevent_overwrite` — Filter whether an S3 upload may overwrite an existing object
|
|
854
|
+
|
|
855
|
+
**When it runs:** Applied in `S3FileUploader`'s constructor, before the S3 request signature is generated, while preparing to upload a file to the S3-compatible storage driver. It is resolved once per upload and the result is baked into the signed request, so a listener cannot change it after signing.
|
|
856
|
+
|
|
857
|
+
**Parameters:**
|
|
858
|
+
|
|
859
|
+
- `$preventOverwrite` (bool): Whether to refuse the upload instead of overwriting an existing object at the same key. Default `false`.
|
|
860
|
+
- `$context` (array): Context data
|
|
861
|
+
|
|
862
|
+
```
|
|
863
|
+
$context = [
|
|
864
|
+
'bucket' => $this->bucket, // string — the target S3 bucket
|
|
865
|
+
's3_file_path' => $this->s3FilePath, // string — the destination object key
|
|
866
|
+
];
|
|
867
|
+
```
|
|
868
|
+
|
|
869
|
+
**Returns:** `bool` — whether the upload should refuse to overwrite an existing object
|
|
870
|
+
|
|
871
|
+
**Source:** `app/Services/FileSystem/Drivers/S3/S3FileUploader.php:64`
|
|
872
|
+
|
|
873
|
+
**Usage:**
|
|
874
|
+
|
|
875
|
+
```
|
|
876
|
+
add_filter('fluent_cart/storage/s3_prevent_overwrite', function ($preventOverwrite, $context) {
|
|
877
|
+
// Never allow overwriting objects already stored under "licenses/"
|
|
878
|
+
if (strpos($context['s3_file_path'], 'licenses/') === 0) {
|
|
879
|
+
return true;
|
|
880
|
+
}
|
|
881
|
+
return $preventOverwrite;
|
|
882
|
+
}, 10, 2);
|
|
883
|
+
```
|
|
884
|
+
|
|
885
|
+
### ` storage/settings_response `
|
|
886
|
+
|
|
887
|
+
`fluent_cart/storage/settings_response` — Filter a storage driver's settings-screen response
|
|
888
|
+
|
|
889
|
+
**When it runs:** Applied in `BaseStorageDriver::getSettingsResponse()` after the driver's raw settings (and, if applicable, the settings-template payload) have been assembled for the admin Storage settings screen. Runs for every storage driver before the driver-specific `fluent_cart/storage/settings_response_{$slug}` filter gets the same, already-filtered value.
|
|
890
|
+
|
|
891
|
+
**Parameters:**
|
|
892
|
+
|
|
893
|
+
- `$response` (array): The settings response payload sent to the admin UI
|
|
894
|
+
- `$driver` ([BaseStorageDriver](/database/models/order.md)): The storage driver instance (e.g. the S3 or local driver)
|
|
895
|
+
|
|
896
|
+
**Returns:** `array` — the modified settings response
|
|
897
|
+
|
|
898
|
+
**Source:** `app/Modules/StorageDrivers/BaseStorageDriver.php:184`
|
|
899
|
+
|
|
900
|
+
**Usage:**
|
|
901
|
+
|
|
902
|
+
```
|
|
903
|
+
add_filter('fluent_cart/storage/settings_response', function ($response, $driver) {
|
|
904
|
+
// Flag drivers that still need a connection test
|
|
905
|
+
if (empty($response['verified'])) {
|
|
906
|
+
$response['needs_verification'] = true;
|
|
907
|
+
}
|
|
908
|
+
return $response;
|
|
909
|
+
}, 10, 2);
|
|
910
|
+
```
|
|
911
|
+
|
|
912
|
+
### ` storage/settings_response_{slug} `
|
|
913
|
+
|
|
914
|
+
`fluent_cart/storage/settings_response_{$slug}` — Filter one storage driver's settings-screen response (DYNAMIC)
|
|
915
|
+
|
|
916
|
+
**When it runs:** Fires immediately after `fluent_cart/storage/settings_response` above, in the same `BaseStorageDriver::getSettingsResponse()` call, receiving the value that generic filter already returned. The `{$slug}` portion is replaced with the driver's own slug (e.g. `s3`, `local`), so a listener can target one specific driver without checking `$driver->slug` itself.
|
|
917
|
+
|
|
918
|
+
**Parameters:**
|
|
919
|
+
|
|
920
|
+
- `$response` (array): The settings response payload, already passed through `fluent_cart/storage/settings_response`
|
|
921
|
+
- `$driver` ([BaseStorageDriver](/database/models/order.md)): The storage driver instance
|
|
922
|
+
|
|
923
|
+
**Returns:** `array` — the modified settings response
|
|
924
|
+
|
|
925
|
+
**Source:** `app/Modules/StorageDrivers/BaseStorageDriver.php:186`
|
|
926
|
+
|
|
927
|
+
**Usage:**
|
|
928
|
+
|
|
929
|
+
```
|
|
930
|
+
add_filter('fluent_cart/storage/settings_response_s3', function ($response, $driver) {
|
|
931
|
+
// Surface the configured region directly at the top level for the S3 driver
|
|
932
|
+
$response['region_label'] = $response['settings']['region'] ?? 'us-east-1';
|
|
933
|
+
return $response;
|
|
934
|
+
}, 10, 2);
|
|
935
|
+
```
|
|
936
|
+
|
|
937
|
+
---
|
|
938
|
+
|
|
939
|
+
## Data Backfills & Migrations
|
|
940
|
+
|
|
941
|
+
### ` data_backfills/chunk_budget `
|
|
942
|
+
|
|
943
|
+
`fluent_cart/data_backfills/chunk_budget` — Filter the chunk size and per-run budget for a data backfill task
|
|
944
|
+
|
|
945
|
+
**When it runs:** Applied at the start of a chunked data-backfill task (e.g. the `completed_next_billing_date` backfill that repairs subscription billing-date rows), before it selects its first batch of rows. Controls how many rows are processed per chunk and how many chunks may run in a single request, so it is mainly useful for shrinking the batch size in tests against a small table — production leaves the defaults as-is.
|
|
946
|
+
|
|
947
|
+
**Parameters:**
|
|
948
|
+
|
|
949
|
+
- `$budget` (array): The chunk/run budget, keyed by:
|
|
950
|
+
|
|
951
|
+
```
|
|
952
|
+
$budget = [
|
|
953
|
+
'chunk_size' => 500, // int — rows processed per chunk
|
|
954
|
+
'max_chunks_per_run' => 10, // int — maximum chunks processed in one request
|
|
955
|
+
];
|
|
956
|
+
```
|
|
957
|
+
|
|
958
|
+
- `$context` (array): Context data
|
|
959
|
+
|
|
960
|
+
```
|
|
961
|
+
$context = [
|
|
962
|
+
'slug' => 'completed_next_billing_date', // string — identifies which backfill task is running
|
|
963
|
+
];
|
|
964
|
+
```
|
|
965
|
+
|
|
966
|
+
**Returns:** `array` — the modified budget, same shape as `$budget`
|
|
967
|
+
|
|
968
|
+
**Source:** `database/DataBackfills.php:535`
|
|
969
|
+
|
|
970
|
+
**Usage:**
|
|
971
|
+
|
|
972
|
+
```
|
|
973
|
+
add_filter('fluent_cart/data_backfills/chunk_budget', function ($budget, $context) {
|
|
974
|
+
// Use a much smaller chunk size in a test environment
|
|
975
|
+
if ($context['slug'] === 'completed_next_billing_date' && wp_get_environment_type() !== 'production') {
|
|
976
|
+
$budget['chunk_size'] = 5;
|
|
977
|
+
$budget['max_chunks_per_run'] = 2;
|
|
978
|
+
}
|
|
979
|
+
return $budget;
|
|
980
|
+
}, 10, 2);
|
|
981
|
+
```
|
|
982
|
+
|
|
983
|
+
---
|
|
984
|
+
|
|
985
|
+
## Localization & Address
|
|
986
|
+
|
|
987
|
+
### ` country_state_options `
|
|
988
|
+
|
|
989
|
+
`fluent_cart/country_state_options` — Filter country and state options
|
|
990
|
+
|
|
991
|
+
**When it runs:** This filter is applied when retrieving country and state dropdown options for address forms.
|
|
992
|
+
|
|
993
|
+
**Parameters:**
|
|
994
|
+
|
|
995
|
+
- `$options` (array): The country/state options array
|
|
996
|
+
|
|
997
|
+
**Returns:**
|
|
998
|
+
|
|
999
|
+
- `$options` (array): The modified options
|
|
1000
|
+
|
|
1001
|
+
**Source:** `LocalizationManager.php:425`
|
|
1002
|
+
|
|
1003
|
+
**Usage:**
|
|
1004
|
+
|
|
1005
|
+
```
|
|
1006
|
+
add_filter('fluent_cart/country_state_options', function ($options) {
|
|
1007
|
+
// Remove a country from the list
|
|
1008
|
+
unset($options['countries']['XX']);
|
|
1009
|
+
return $options;
|
|
1010
|
+
});
|
|
1011
|
+
```
|
|
1012
|
+
|
|
1013
|
+
### ` address/postcode/format `
|
|
1014
|
+
|
|
1015
|
+
`fluent_cart/address/postcode/format` — Filter postcode formatting
|
|
1016
|
+
|
|
1017
|
+
**When it runs:** This filter is applied when formatting a postcode value, typically during address validation.
|
|
1018
|
+
|
|
1019
|
+
**Parameters:**
|
|
1020
|
+
|
|
1021
|
+
- `$postcode` (string): The trimmed postcode value
|
|
1022
|
+
- `$country` (string): The country code
|
|
1023
|
+
|
|
1024
|
+
**Returns:**
|
|
1025
|
+
|
|
1026
|
+
- `$postcode` (string): The formatted postcode
|
|
1027
|
+
|
|
1028
|
+
**Source:** `PostcodeVerification.php:53`
|
|
1029
|
+
|
|
1030
|
+
**Usage:**
|
|
1031
|
+
|
|
1032
|
+
```
|
|
1033
|
+
add_filter('fluent_cart/address/postcode/format', function ($postcode, $country) {
|
|
1034
|
+
// Format UK postcodes with a space
|
|
1035
|
+
if ($country === 'GB' && strlen($postcode) > 3 && strpos($postcode, ' ') === false) {
|
|
1036
|
+
return substr($postcode, 0, -3) . ' ' . substr($postcode, -3);
|
|
1037
|
+
}
|
|
1038
|
+
return $postcode;
|
|
1039
|
+
}, 10, 2);
|
|
1040
|
+
```
|
|
1041
|
+
|
|
1042
|
+
### ` address/postcode/is_valid `
|
|
1043
|
+
|
|
1044
|
+
`fluent_cart/address/postcode/is_valid` — Filter postcode validation result
|
|
1045
|
+
|
|
1046
|
+
**When it runs:** This filter is applied after postcode validation to allow custom validation rules.
|
|
1047
|
+
|
|
1048
|
+
**Parameters:**
|
|
1049
|
+
|
|
1050
|
+
- `$valid` (bool): Whether the postcode is valid
|
|
1051
|
+
- `$postcode` (string): The postcode being validated
|
|
1052
|
+
- `$country` (string): The country code
|
|
1053
|
+
|
|
1054
|
+
**Returns:**
|
|
1055
|
+
|
|
1056
|
+
- `$valid` (bool): The modified validation result
|
|
1057
|
+
|
|
1058
|
+
**Source:** `PostcodeVerification.php:154`
|
|
1059
|
+
|
|
1060
|
+
**Usage:**
|
|
1061
|
+
|
|
1062
|
+
```
|
|
1063
|
+
add_filter('fluent_cart/address/postcode/is_valid', function ($valid, $postcode, $country) {
|
|
1064
|
+
// Add custom validation for specific country
|
|
1065
|
+
if ($country === 'XX') {
|
|
1066
|
+
return preg_match('/^\d{5}$/', $postcode) === 1;
|
|
1067
|
+
}
|
|
1068
|
+
return $valid;
|
|
1069
|
+
}, 10, 3);
|
|
1070
|
+
```
|
|
1071
|
+
|
|
1072
|
+
---
|
|
1073
|
+
|
|
1074
|
+
## Templates & Frontend
|
|
1075
|
+
|
|
1076
|
+
### ` template/disable_taxonomy_fallback `
|
|
1077
|
+
|
|
1078
|
+
`fluent_cart/template/disable_taxonomy_fallback` — Disable taxonomy fallback template
|
|
1079
|
+
|
|
1080
|
+
**When it runs:** This filter controls whether the taxonomy fallback template should be disabled.
|
|
1081
|
+
|
|
1082
|
+
**Parameters:**
|
|
1083
|
+
|
|
1084
|
+
- `$disable` (bool): Whether to disable taxonomy fallback (default `false`)
|
|
1085
|
+
|
|
1086
|
+
**Returns:**
|
|
1087
|
+
|
|
1088
|
+
- `$disable` (bool): The modified value
|
|
1089
|
+
|
|
1090
|
+
**Source:** `TemplateLoader.php:113`
|
|
1091
|
+
|
|
1092
|
+
**Usage:**
|
|
1093
|
+
|
|
1094
|
+
```
|
|
1095
|
+
add_filter('fluent_cart/template/disable_taxonomy_fallback', function ($disable) {
|
|
1096
|
+
// Disable taxonomy fallback when using a custom theme
|
|
1097
|
+
return true;
|
|
1098
|
+
});
|
|
1099
|
+
```
|
|
1100
|
+
|
|
1101
|
+
### ` has_block_template `
|
|
1102
|
+
|
|
1103
|
+
`fluent_cart/has_block_template` — Filter block template existence check
|
|
1104
|
+
|
|
1105
|
+
**When it runs:** This filter is applied when checking if a block template exists for the current page.
|
|
1106
|
+
|
|
1107
|
+
**Parameters:**
|
|
1108
|
+
|
|
1109
|
+
- `$hasTemplate` (bool): Whether a block template exists
|
|
1110
|
+
|
|
1111
|
+
**Returns:**
|
|
1112
|
+
|
|
1113
|
+
- `$hasTemplate` (bool): The modified result
|
|
1114
|
+
|
|
1115
|
+
**Source:** `TemplateLoader.php:193`
|
|
1116
|
+
|
|
1117
|
+
**Usage:**
|
|
1118
|
+
|
|
1119
|
+
```
|
|
1120
|
+
add_filter('fluent_cart/has_block_template', function ($hasTemplate) {
|
|
1121
|
+
// Force classic template rendering
|
|
1122
|
+
return false;
|
|
1123
|
+
});
|
|
1124
|
+
```
|
|
1125
|
+
|
|
1126
|
+
### ` template_loader_files `
|
|
1127
|
+
|
|
1128
|
+
`fluent_cart/template_loader_files` — Filter template files to load
|
|
1129
|
+
|
|
1130
|
+
**When it runs:** This filter is applied when determining which template files should be loaded for the current request.
|
|
1131
|
+
|
|
1132
|
+
**Parameters:**
|
|
1133
|
+
|
|
1134
|
+
- `$files` (array): Array of template file paths (default `[]`)
|
|
1135
|
+
|
|
1136
|
+
**Returns:**
|
|
1137
|
+
|
|
1138
|
+
- `$files` (array): The modified template files array
|
|
1139
|
+
|
|
1140
|
+
**Source:** `TemplateLoader.php:206`
|
|
1141
|
+
|
|
1142
|
+
**Usage:**
|
|
1143
|
+
|
|
1144
|
+
```
|
|
1145
|
+
add_filter('fluent_cart/template_loader_files', function ($files) {
|
|
1146
|
+
// Add custom template file
|
|
1147
|
+
$files[] = get_stylesheet_directory() . '/fluent-cart/custom-template.php';
|
|
1148
|
+
return $files;
|
|
1149
|
+
});
|
|
1150
|
+
```
|
|
1151
|
+
|
|
1152
|
+
### ` template_path `
|
|
1153
|
+
|
|
1154
|
+
`fluent_cart/template_path` — Filter theme template path
|
|
1155
|
+
|
|
1156
|
+
**When it runs:** This filter controls the directory path within a theme where FluentCart template overrides are located.
|
|
1157
|
+
|
|
1158
|
+
**Parameters:**
|
|
1159
|
+
|
|
1160
|
+
- `$path` (string): The template directory path (default `'fluent-cart/'`)
|
|
1161
|
+
|
|
1162
|
+
**Returns:**
|
|
1163
|
+
|
|
1164
|
+
- `$path` (string): The modified template path
|
|
1165
|
+
|
|
1166
|
+
**Source:** `TemplateLoader.php:248`
|
|
1167
|
+
|
|
1168
|
+
**Usage:**
|
|
1169
|
+
|
|
1170
|
+
```
|
|
1171
|
+
add_filter('fluent_cart/template_path', function ($path) {
|
|
1172
|
+
// Use a custom directory for template overrides
|
|
1173
|
+
return 'my-store/templates/';
|
|
1174
|
+
});
|
|
1175
|
+
```
|
|
1176
|
+
|
|
1177
|
+
### ` template_part_content `
|
|
1178
|
+
|
|
1179
|
+
`fluent_cart/template_part_content` — Filter template part content (canonical)
|
|
1180
|
+
|
|
1181
|
+
**When it runs:** Applied when a template part (e.g. the product-modal template part) renders, before the slug-specific `fluent_cart/template_part_content_{$slug}` filter and before `do_blocks()` parsing.
|
|
1182
|
+
|
|
1183
|
+
**Parameters:**
|
|
1184
|
+
|
|
1185
|
+
- `$content` (string): The raw template part block markup, before block parsing
|
|
1186
|
+
- `$slug` (string): The template part's registered slug (e.g. `product_modal`)
|
|
1187
|
+
- `$args` (array): Arguments passed to the template part renderer
|
|
1188
|
+
|
|
1189
|
+
**Returns:** `string` — the modified template part content
|
|
1190
|
+
|
|
1191
|
+
**Source:** `app/Modules/Templating/BlockTemplates/TemplateParts/ProductModalTemplatePart.php:245`
|
|
1192
|
+
|
|
1193
|
+
**Usage:**
|
|
1194
|
+
|
|
1195
|
+
```
|
|
1196
|
+
add_filter('fluent_cart/template_part_content', function ($content, $slug, $args) {
|
|
1197
|
+
if ($slug === 'product_modal') {
|
|
1198
|
+
$content = '<div class="custom-wrapper">' . $content . '</div>';
|
|
1199
|
+
}
|
|
1200
|
+
return $content;
|
|
1201
|
+
}, 10, 3);
|
|
1202
|
+
```
|
|
1203
|
+
|
|
1204
|
+
### ` template_part_content_{slug} `
|
|
1205
|
+
|
|
1206
|
+
`fluent_cart/template_part_content_{$slug}` — Filter one template part's content by slug (canonical, DYNAMIC)
|
|
1207
|
+
|
|
1208
|
+
**When it runs:** Fires immediately after `fluent_cart/template_part_content` above, in the same render call, receiving the value that generic filter already returned. The `{$slug}` portion is replaced with the template part's own slug, so a listener can target one specific template part without checking `$slug` itself.
|
|
1209
|
+
|
|
1210
|
+
**Parameters:**
|
|
1211
|
+
|
|
1212
|
+
- `$content` (string): The template part content, already passed through `fluent_cart/template_part_content`
|
|
1213
|
+
- `$args` (array): Arguments passed to the template part renderer
|
|
1214
|
+
|
|
1215
|
+
**Returns:** `string` — the modified content
|
|
1216
|
+
|
|
1217
|
+
**Source:** `app/Modules/Templating/BlockTemplates/TemplateParts/ProductModalTemplatePart.php:246`
|
|
1218
|
+
|
|
1219
|
+
**Usage:**
|
|
1220
|
+
|
|
1221
|
+
```
|
|
1222
|
+
add_filter('fluent_cart/template_part_content_product_modal', function ($content, $args) {
|
|
1223
|
+
// Append a badge just to the product-modal template part
|
|
1224
|
+
$content .= '<span class="badge">New</span>';
|
|
1225
|
+
return $content;
|
|
1226
|
+
}, 10, 2);
|
|
1227
|
+
```
|
|
1228
|
+
|
|
1229
|
+
### ` template_part_output `
|
|
1230
|
+
|
|
1231
|
+
`fluent_cart/template_part_output` — Filter template part rendered output (canonical)
|
|
1232
|
+
|
|
1233
|
+
**When it runs:** Applied after a template part's block markup has been parsed with `do_blocks()`, and before the slug-specific `fluent_cart/template_part_output_{$slug}` filter.
|
|
1234
|
+
|
|
1235
|
+
**Parameters:**
|
|
1236
|
+
|
|
1237
|
+
- `$output` (string): The rendered HTML output of the template part
|
|
1238
|
+
- `$slug` (string): The template part's registered slug
|
|
1239
|
+
- `$args` (array): Arguments passed to the template part renderer
|
|
1240
|
+
|
|
1241
|
+
**Returns:** `string` — the modified output
|
|
1242
|
+
|
|
1243
|
+
**Source:** `app/Modules/Templating/BlockTemplates/TemplateParts/ProductModalTemplatePart.php:252`
|
|
1244
|
+
|
|
1245
|
+
**Usage:**
|
|
1246
|
+
|
|
1247
|
+
```
|
|
1248
|
+
add_filter('fluent_cart/template_part_output', function ($output, $slug, $args) {
|
|
1249
|
+
// Minify whitespace in every template part's output
|
|
1250
|
+
return preg_replace('/\s+/', ' ', $output);
|
|
1251
|
+
}, 10, 3);
|
|
1252
|
+
```
|
|
1253
|
+
|
|
1254
|
+
### ` template_part_output_{slug} `
|
|
1255
|
+
|
|
1256
|
+
`fluent_cart/template_part_output_{$slug}` — Filter one template part's rendered output by slug (canonical, DYNAMIC)
|
|
1257
|
+
|
|
1258
|
+
**When it runs:** Fires immediately after `fluent_cart/template_part_output` above, in the same render call, receiving the already-filtered output. The `{$slug}` portion is replaced with the template part's own slug.
|
|
1259
|
+
|
|
1260
|
+
**Parameters:**
|
|
1261
|
+
|
|
1262
|
+
- `$output` (string): The rendered output, already passed through `fluent_cart/template_part_output`
|
|
1263
|
+
- `$args` (array): Arguments passed to the template part renderer
|
|
1264
|
+
|
|
1265
|
+
**Returns:** `string` — the modified output
|
|
1266
|
+
|
|
1267
|
+
**Source:** `app/Modules/Templating/BlockTemplates/TemplateParts/ProductModalTemplatePart.php:253`
|
|
1268
|
+
|
|
1269
|
+
**Usage:**
|
|
1270
|
+
|
|
1271
|
+
```
|
|
1272
|
+
add_filter('fluent_cart/template_part_output_product_modal', function ($output, $args) {
|
|
1273
|
+
return str_replace('<div class="fct-modal"', '<div class="fct-modal" data-tracking="true"', $output);
|
|
1274
|
+
}, 10, 2);
|
|
1275
|
+
```
|
|
1276
|
+
|
|
1277
|
+
### ` buttons/enable_floating_cart_button `
|
|
1278
|
+
|
|
1279
|
+
`fluent_cart/buttons/enable_floating_cart_button` — Filter floating cart button visibility
|
|
1280
|
+
|
|
1281
|
+
**When it runs:** This filter controls whether the floating cart button is displayed on the frontend.
|
|
1282
|
+
|
|
1283
|
+
**Parameters:**
|
|
1284
|
+
|
|
1285
|
+
- `$enabled` (bool): Whether the floating cart button is enabled (default `true`)
|
|
1286
|
+
|
|
1287
|
+
**Returns:**
|
|
1288
|
+
|
|
1289
|
+
- `$enabled` (bool): The modified value
|
|
1290
|
+
|
|
1291
|
+
**Source:** `app/Hooks/Cart/CartLoader.php:49`
|
|
1292
|
+
|
|
1293
|
+
**Usage:**
|
|
1294
|
+
|
|
1295
|
+
```
|
|
1296
|
+
add_filter('fluent_cart/buttons/enable_floating_cart_button', function ($enabled) {
|
|
1297
|
+
// Disable floating cart on specific pages
|
|
1298
|
+
if (is_page('landing-page')) {
|
|
1299
|
+
return false;
|
|
1300
|
+
}
|
|
1301
|
+
return $enabled;
|
|
1302
|
+
});
|
|
1303
|
+
```
|
|
1304
|
+
|
|
1305
|
+
---
|
|
1306
|
+
|
|
1307
|
+
## Widgets & Dashboard
|
|
1308
|
+
|
|
1309
|
+
### ` {$widgetName} `
|
|
1310
|
+
|
|
1311
|
+
`fluent_cart/{$widgetName}` — Filter widget data by name (DYNAMIC)
|
|
1312
|
+
|
|
1313
|
+
**When it runs:** This dynamic filter is applied when a dashboard widget retrieves its data. The `{$widgetName}` is replaced with the specific widget name.
|
|
1314
|
+
|
|
1315
|
+
**Parameters:**
|
|
1316
|
+
|
|
1317
|
+
- `$widgetData` (mixed): The widget data returned by `widgetData()` method
|
|
1318
|
+
|
|
1319
|
+
**Returns:**
|
|
1320
|
+
|
|
1321
|
+
- `$widgetData` (mixed): The modified widget data
|
|
1322
|
+
|
|
1323
|
+
**Source:** `app/Services/Widgets/BaseWidget.php:16`
|
|
1324
|
+
|
|
1325
|
+
**Usage:**
|
|
1326
|
+
|
|
1327
|
+
```
|
|
1328
|
+
add_filter('fluent_cart/revenue_widget', function ($widgetData) {
|
|
1329
|
+
// Add custom metric to revenue widget
|
|
1330
|
+
$widgetData['custom_metric'] = calculate_custom_metric();
|
|
1331
|
+
return $widgetData;
|
|
1332
|
+
});
|
|
1333
|
+
```
|
|
1334
|
+
|
|
1335
|
+
### ` widgets/{$filter} `
|
|
1336
|
+
|
|
1337
|
+
`fluent_cart/widgets/{$filter}` — Filter widget data by filter key (DYNAMIC)
|
|
1338
|
+
|
|
1339
|
+
**When it runs:** This dynamic filter is applied when retrieving widget data for a specific filter key in the widgets controller.
|
|
1340
|
+
|
|
1341
|
+
**Parameters:**
|
|
1342
|
+
|
|
1343
|
+
- `$result` (array): The widget result data (default `[]`)
|
|
1344
|
+
- `$data` (array): The request data
|
|
1345
|
+
|
|
1346
|
+
**Returns:**
|
|
1347
|
+
|
|
1348
|
+
- `$result` (array): The modified widget data
|
|
1349
|
+
|
|
1350
|
+
**Source:** `WidgetsController.php:36`
|
|
1351
|
+
|
|
1352
|
+
**Usage:**
|
|
1353
|
+
|
|
1354
|
+
```
|
|
1355
|
+
add_filter('fluent_cart/widgets/sales_overview', function ($result, $data) {
|
|
1356
|
+
$result['custom_chart'] = [
|
|
1357
|
+
'labels' => ['Jan', 'Feb', 'Mar'],
|
|
1358
|
+
'data' => [100, 200, 150],
|
|
1359
|
+
];
|
|
1360
|
+
return $result;
|
|
1361
|
+
}, 10, 2);
|
|
1362
|
+
```
|
|
1363
|
+
|
|
1364
|
+
### ` promo_gateways `
|
|
1365
|
+
|
|
1366
|
+
`fluent_cart/promo_gateways` — Filter promotional gateways
|
|
1367
|
+
|
|
1368
|
+
**When it runs:** This filter is applied when retrieving the list of promotional payment gateways shown in the admin.
|
|
1369
|
+
|
|
1370
|
+
**Parameters:**
|
|
1371
|
+
|
|
1372
|
+
- `$defaultGateways` (array): Array of default promotional gateways
|
|
1373
|
+
|
|
1374
|
+
**Returns:**
|
|
1375
|
+
|
|
1376
|
+
- `$defaultGateways` (array): The modified gateways array
|
|
1377
|
+
|
|
1378
|
+
**Source:** `PromoGatewaysHandler.php:36`
|
|
1379
|
+
|
|
1380
|
+
**Usage:**
|
|
1381
|
+
|
|
1382
|
+
```
|
|
1383
|
+
add_filter('fluent_cart/promo_gateways', function ($gateways) {
|
|
1384
|
+
// Remove a promo gateway
|
|
1385
|
+
unset($gateways['example_gateway']);
|
|
1386
|
+
return $gateways;
|
|
1387
|
+
});
|
|
1388
|
+
```
|
|
1389
|
+
|
|
1390
|
+
### ` addon_gateways `
|
|
1391
|
+
|
|
1392
|
+
`fluent_cart/addon_gateways` — Filter addon payment gateways
|
|
1393
|
+
|
|
1394
|
+
**When it runs:** This filter is applied when retrieving the list of addon payment gateways.
|
|
1395
|
+
|
|
1396
|
+
**Parameters:**
|
|
1397
|
+
|
|
1398
|
+
- `$defaultGateways` (array): Array of default addon gateways
|
|
1399
|
+
|
|
1400
|
+
**Returns:**
|
|
1401
|
+
|
|
1402
|
+
- `$defaultGateways` (array): The modified gateways array
|
|
1403
|
+
|
|
1404
|
+
**Source:** `AddonGatewaysHandler.php:36`
|
|
1405
|
+
|
|
1406
|
+
**Usage:**
|
|
1407
|
+
|
|
1408
|
+
```
|
|
1409
|
+
add_filter('fluent_cart/addon_gateways', function ($gateways) {
|
|
1410
|
+
$gateways['custom_pay'] = [
|
|
1411
|
+
'title' => 'Custom Pay',
|
|
1412
|
+
'description' => 'Custom payment gateway addon',
|
|
1413
|
+
'is_active' => true,
|
|
1414
|
+
];
|
|
1415
|
+
return $gateways;
|
|
1416
|
+
});
|
|
1417
|
+
```
|
|
1418
|
+
|
|
1419
|
+
---
|
|
1420
|
+
|
|
1421
|
+
## Advanced List Filters
|
|
1422
|
+
|
|
1423
|
+
### ` {$filter}_list_filter_query `
|
|
1424
|
+
|
|
1425
|
+
`fluent_cart/{$filter}_list_filter_query` — Filter list filter query (DYNAMIC)
|
|
1426
|
+
|
|
1427
|
+
**When it runs:** This dynamic filter is applied when building database queries for filtered list pages (orders, customers, subscriptions, etc.). The `{$filter}` is replaced with the filter context name.
|
|
1428
|
+
|
|
1429
|
+
**Parameters:**
|
|
1430
|
+
|
|
1431
|
+
- `$query` (Builder): The Eloquent query builder instance
|
|
1432
|
+
|
|
1433
|
+
**Returns:**
|
|
1434
|
+
|
|
1435
|
+
- `$query` (Builder): The modified query builder
|
|
1436
|
+
|
|
1437
|
+
**Source:** `BaseFilter.php:962,971`
|
|
1438
|
+
|
|
1439
|
+
**Usage:**
|
|
1440
|
+
|
|
1441
|
+
```
|
|
1442
|
+
add_filter('fluent_cart/orders_list_filter_query', function ($query) {
|
|
1443
|
+
// Only show orders from the last 30 days by default
|
|
1444
|
+
$query->where('created_at', '>=', gmdate('Y-m-d H:i:s', strtotime('-30 days')));
|
|
1445
|
+
return $query;
|
|
1446
|
+
});
|
|
1447
|
+
```
|
|
1448
|
+
|
|
1449
|
+
### ` {$filterName}_filter_options `
|
|
1450
|
+
|
|
1451
|
+
`fluent_cart/{$filterName}_filter_options` — Filter options for list page filters (DYNAMIC)
|
|
1452
|
+
|
|
1453
|
+
**When it runs:** This dynamic filter is applied when retrieving available filter options for admin list pages.
|
|
1454
|
+
|
|
1455
|
+
**Parameters:**
|
|
1456
|
+
|
|
1457
|
+
- `$options` (array): The filter options array
|
|
1458
|
+
|
|
1459
|
+
**Returns:**
|
|
1460
|
+
|
|
1461
|
+
- `$options` (array): The modified filter options
|
|
1462
|
+
|
|
1463
|
+
**Source:** `BaseFilter.php:995`
|
|
1464
|
+
|
|
1465
|
+
**Usage:**
|
|
1466
|
+
|
|
1467
|
+
```
|
|
1468
|
+
add_filter('fluent_cart/orders_filter_options', function ($options) {
|
|
1469
|
+
// Add a custom filter option
|
|
1470
|
+
$options['custom_status'] = [
|
|
1471
|
+
'label' => 'Custom Status',
|
|
1472
|
+
'type' => 'select',
|
|
1473
|
+
'options' => ['pending_review' => 'Pending Review'],
|
|
1474
|
+
];
|
|
1475
|
+
return $options;
|
|
1476
|
+
});
|
|
1477
|
+
```
|
|
1478
|
+
|
|
1479
|
+
### ` {$filterName}_table_columns `
|
|
1480
|
+
|
|
1481
|
+
`fluent_cart/{$filterName}_table_columns` — Filter table columns for list pages (DYNAMIC)
|
|
1482
|
+
|
|
1483
|
+
**When it runs:** This dynamic filter is applied when retrieving table column definitions for admin list pages.
|
|
1484
|
+
|
|
1485
|
+
**Parameters:**
|
|
1486
|
+
|
|
1487
|
+
- `$columns` (array): The table column definitions (default `[]`)
|
|
1488
|
+
|
|
1489
|
+
**Returns:**
|
|
1490
|
+
|
|
1491
|
+
- `$columns` (array): The modified columns array
|
|
1492
|
+
|
|
1493
|
+
**Source:** `BaseFilter.php:1038`
|
|
1494
|
+
|
|
1495
|
+
**Usage:**
|
|
1496
|
+
|
|
1497
|
+
```
|
|
1498
|
+
add_filter('fluent_cart/orders_table_columns', function ($columns) {
|
|
1499
|
+
$columns['custom_field'] = [
|
|
1500
|
+
'label' => 'Custom Field',
|
|
1501
|
+
'sortable' => true,
|
|
1502
|
+
'width' => '120px',
|
|
1503
|
+
];
|
|
1504
|
+
return $columns;
|
|
1505
|
+
});
|
|
1506
|
+
```
|
|
1507
|
+
|
|
1508
|
+
### ` advanced_filter_options_{$dataKey} `
|
|
1509
|
+
|
|
1510
|
+
`fluent_cart/advanced_filter_options_{$dataKey}` — Filter advanced filter options (DYNAMIC)
|
|
1511
|
+
|
|
1512
|
+
**When it runs:** This dynamic filter is applied when retrieving options for the advanced filter UI. The `{$dataKey}` is replaced with the specific data key.
|
|
1513
|
+
|
|
1514
|
+
**Parameters:**
|
|
1515
|
+
|
|
1516
|
+
- `$options` (array): The filter options
|
|
1517
|
+
|
|
1518
|
+
**Returns:**
|
|
1519
|
+
|
|
1520
|
+
- `$options` (array): The modified options
|
|
1521
|
+
|
|
1522
|
+
**Source:** `AdvanceFilterController.php:46`
|
|
1523
|
+
|
|
1524
|
+
**Usage:**
|
|
1525
|
+
|
|
1526
|
+
```
|
|
1527
|
+
add_filter('fluent_cart/advanced_filter_options_payment_methods', function ($options) {
|
|
1528
|
+
$options[] = [
|
|
1529
|
+
'value' => 'custom_gateway',
|
|
1530
|
+
'label' => 'Custom Gateway',
|
|
1531
|
+
];
|
|
1532
|
+
return $options;
|
|
1533
|
+
});
|
|
1534
|
+
```
|
|
1535
|
+
|
|
1536
|
+
### ` {filter}_allowed_scopes `
|
|
1537
|
+
|
|
1538
|
+
`fluent_cart/{$filterName}_allowed_scopes` — Filter the query scopes a list filter is allowed to apply (DYNAMIC)
|
|
1539
|
+
|
|
1540
|
+
**When it runs:** Applied inside `BaseFilter` when resolving the `scopes` requested on an admin list-filter query (orders, customers, subscriptions, etc.), before any of the requested scopes are applied to the underlying Eloquent query. The `{$filterName}` portion is replaced with the filter class's own registered name (e.g. `order_filter`), so a listener can add or remove scopes for one specific list without affecting the others.
|
|
1541
|
+
|
|
1542
|
+
**Parameters:**
|
|
1543
|
+
|
|
1544
|
+
- `$scopeMap` (array): The map of scope name => callable/definition allowed for this filter, as returned by the filter's own `allowedScopes()` method
|
|
1545
|
+
- `$context` (array): Context data
|
|
1546
|
+
|
|
1547
|
+
```
|
|
1548
|
+
$context = [
|
|
1549
|
+
'filter' => $this, // BaseFilter — the filter instance handling the request
|
|
1550
|
+
];
|
|
1551
|
+
```
|
|
1552
|
+
|
|
1553
|
+
**Returns:** `array` — the modified scope map
|
|
1554
|
+
|
|
1555
|
+
**Source:** `app/Services/Filter/BaseFilter.php:743`
|
|
1556
|
+
|
|
1557
|
+
**Usage:**
|
|
1558
|
+
|
|
1559
|
+
```
|
|
1560
|
+
add_filter('fluent_cart/order_filter_allowed_scopes', function ($scopeMap, $context) {
|
|
1561
|
+
// Expose a custom "high_value" scope on the orders list filter
|
|
1562
|
+
$scopeMap['high_value'] = function ($query) {
|
|
1563
|
+
return $query->where('total', '>=', 50000); // cents
|
|
1564
|
+
};
|
|
1565
|
+
return $scopeMap;
|
|
1566
|
+
}, 10, 2);
|
|
1567
|
+
```
|
|
1568
|
+
|
|
1569
|
+
### ` {filter}_allowed_withs `
|
|
1570
|
+
|
|
1571
|
+
`fluent_cart/{$filterName}_allowed_withs` — Filter the relationships a list filter is allowed to eager-load (DYNAMIC)
|
|
1572
|
+
|
|
1573
|
+
**When it runs:** Applied inside `BaseFilter` when resolving the `with` relationships requested on an admin list-filter query, before any requested relationship is passed to the query's `with()` call. Any requested key that isn't present in the returned map is silently dropped, so this is also the gate that decides what a filter request is allowed to eager-load. The `{$filterName}` portion is replaced with the filter class's own registered name.
|
|
1574
|
+
|
|
1575
|
+
**Parameters:**
|
|
1576
|
+
|
|
1577
|
+
- `$withMap` (array): The map of relationship key => Eloquent relationship path allowed for this filter, as returned by the filter's own `allowedWiths()` method
|
|
1578
|
+
- `$context` (array): Context data
|
|
1579
|
+
|
|
1580
|
+
```
|
|
1581
|
+
$context = [
|
|
1582
|
+
'filter' => $this, // BaseFilter — the filter instance handling the request
|
|
1583
|
+
];
|
|
1584
|
+
```
|
|
1585
|
+
|
|
1586
|
+
**Returns:** `array` — the modified relationship map
|
|
1587
|
+
|
|
1588
|
+
**Source:** `app/Services/Filter/BaseFilter.php:724`
|
|
1589
|
+
|
|
1590
|
+
**Usage:**
|
|
1591
|
+
|
|
1592
|
+
```
|
|
1593
|
+
add_filter('fluent_cart/order_filter_allowed_withs', function ($withMap, $context) {
|
|
1594
|
+
// Let the orders list filter eager-load a custom relation
|
|
1595
|
+
$withMap['loyalty_points'] = 'customer.loyaltyPoints';
|
|
1596
|
+
return $withMap;
|
|
1597
|
+
}, 10, 2);
|
|
1598
|
+
```
|
|
1599
|
+
|
|
1600
|
+
---
|
|
1601
|
+
|
|
1602
|
+
## Tracking & Attribution
|
|
1603
|
+
|
|
1604
|
+
### ` utm/internal_domains `
|
|
1605
|
+
|
|
1606
|
+
`fluent_cart/utm/internal_domains` — Filter the domains treated as "internal" for UTM/referrer attribution
|
|
1607
|
+
|
|
1608
|
+
**When it runs:** Applied in `UtmHelper::getInternalDomains()` whenever the internal-domain list is resolved for attribution tracking. Domains on this list are excluded when FluentCart decides whether a visit's referrer counts as an external traffic source, so multisite/multi-domain stores can avoid attributing sales to their own other domains.
|
|
1609
|
+
|
|
1610
|
+
**Parameters:**
|
|
1611
|
+
|
|
1612
|
+
- `$domains` (array): Extra internal domain names to add (default `[]`)
|
|
1613
|
+
|
|
1614
|
+
**Returns:** `array` — the domain list to treat as internal (non-string entries are dropped)
|
|
1615
|
+
|
|
1616
|
+
**Source:** `app/Helpers/UtmHelper.php:45`
|
|
1617
|
+
|
|
1618
|
+
**Usage:**
|
|
1619
|
+
|
|
1620
|
+
```
|
|
1621
|
+
add_filter('fluent_cart/utm/internal_domains', function ($domains) {
|
|
1622
|
+
// Don't attribute sales to traffic arriving from our own docs subdomain
|
|
1623
|
+
$domains[] = 'docs.example.com';
|
|
1624
|
+
return $domains;
|
|
1625
|
+
});
|
|
1626
|
+
```
|
|
1627
|
+
|
|
1628
|
+
---
|
|
1629
|
+
|
|
1630
|
+
## Plugin Installer
|
|
1631
|
+
|
|
1632
|
+
### ` outside_addon/handle_cdn_install `
|
|
1633
|
+
|
|
1634
|
+
`fluent_cart/outside_addon/handle_cdn_install` — Filter CDN addon installation
|
|
1635
|
+
|
|
1636
|
+
**When it runs:** This filter is applied when attempting to install an addon from a CDN source. Return a non-null value to handle the installation yourself.
|
|
1637
|
+
|
|
1638
|
+
**Parameters:**
|
|
1639
|
+
|
|
1640
|
+
- `$result` (mixed): Installation result (default `null`)
|
|
1641
|
+
|
|
1642
|
+
**Returns:**
|
|
1643
|
+
|
|
1644
|
+
- `$result` (mixed): The installation result, or `null` to use default handling
|
|
1645
|
+
|
|
1646
|
+
**Source:** `BackgroundInstaller.php:143`
|
|
1647
|
+
|
|
1648
|
+
**Usage:**
|
|
1649
|
+
|
|
1650
|
+
```
|
|
1651
|
+
add_filter('fluent_cart/outside_addon/handle_cdn_install', function ($result) {
|
|
1652
|
+
// Handle custom CDN addon installation
|
|
1653
|
+
if ($result === null) {
|
|
1654
|
+
// Perform custom installation logic
|
|
1655
|
+
return ['success' => true, 'message' => 'Installed from custom CDN'];
|
|
1656
|
+
}
|
|
1657
|
+
return $result;
|
|
1658
|
+
});
|
|
1659
|
+
```
|
|
1660
|
+
|
|
1661
|
+
### ` outside_addon/handle_install `
|
|
1662
|
+
|
|
1663
|
+
`fluent_cart/outside_addon/handle_install` — Filter external addon installation
|
|
1664
|
+
|
|
1665
|
+
**When it runs:** This filter is applied when installing an addon from an external source. Return a non-null value to handle the installation yourself.
|
|
1666
|
+
|
|
1667
|
+
**Parameters:**
|
|
1668
|
+
|
|
1669
|
+
- `$result` (mixed): Installation result (default `null`)
|
|
1670
|
+
|
|
1671
|
+
**Returns:**
|
|
1672
|
+
|
|
1673
|
+
- `$result` (mixed): The installation result, or `null` to use default handling
|
|
1674
|
+
|
|
1675
|
+
**Source:** `BackgroundInstaller.php:164`
|
|
1676
|
+
|
|
1677
|
+
**Usage:**
|
|
1678
|
+
|
|
1679
|
+
```
|
|
1680
|
+
add_filter('fluent_cart/outside_addon/handle_install', function ($result) {
|
|
1681
|
+
// Handle custom external addon installation
|
|
1682
|
+
return ['success' => true, 'message' => 'Addon installed successfully'];
|
|
1683
|
+
});
|
|
1684
|
+
```
|
|
1685
|
+
|
|
1686
|
+
---
|
|
1687
|
+
|
|
1688
|
+
## Pro: E-Invoicing Pro
|
|
1689
|
+
|
|
1690
|
+
Pro Feature
|
|
1691
|
+
|
|
1692
|
+
E-invoicing hooks require FluentCart Pro to be installed and activated.
|
|
1693
|
+
|
|
1694
|
+
### ` einvoice/buyer_vat_id `
|
|
1695
|
+
|
|
1696
|
+
`fluent_cart/einvoice/buyer_vat_id` Pro — Filter the buyer VAT identifier written to the e-invoice
|
|
1697
|
+
|
|
1698
|
+
**When it runs:** Applied in `En16931InvoiceMapper` while mapping an order to an EN 16931 e-invoice, just before the resolved buyer VAT identifier (BT-48) is written to the invoice XML. Lets integrations normalize or override the value (e.g. strip or add a country prefix).
|
|
1699
|
+
|
|
1700
|
+
**Parameters:**
|
|
1701
|
+
|
|
1702
|
+
- `$buyerVatId` (string): The resolved buyer VAT identifier
|
|
1703
|
+
- `$context` (array): Context data
|
|
1704
|
+
|
|
1705
|
+
```
|
|
1706
|
+
$context = [
|
|
1707
|
+
'order' => $order, // \FluentCart\App\Models\Order — the order being invoiced
|
|
1708
|
+
];
|
|
1709
|
+
```
|
|
1710
|
+
|
|
1711
|
+
**Returns:**
|
|
1712
|
+
|
|
1713
|
+
- `string` — The buyer VAT identifier to write to the e-invoice
|
|
1714
|
+
|
|
1715
|
+
**Source:** `fluent-cart-pro/app/Services/Invoice/Mapper/En16931InvoiceMapper.php (line 154)`
|
|
1716
|
+
|
|
1717
|
+
**Usage:**
|
|
1718
|
+
|
|
1719
|
+
```
|
|
1720
|
+
add_filter('fluent_cart/einvoice/buyer_vat_id', function ($buyerVatId, $context) {
|
|
1721
|
+
// Ensure the VAT ID carries the billing-country prefix
|
|
1722
|
+
$country = $context['order']->billing_address->country ?? '';
|
|
1723
|
+
if ($country && strpos($buyerVatId, $country) !== 0) {
|
|
1724
|
+
$buyerVatId = $country . $buyerVatId;
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
return $buyerVatId;
|
|
1728
|
+
}, 10, 2);
|
|
1729
|
+
```
|
|
1730
|
+
|
|
1731
|
+
### ` einvoice/tax_category `
|
|
1732
|
+
|
|
1733
|
+
`fluent_cart/einvoice/tax_category` Pro — Filter the derived EN 16931 VAT category for an e-invoice line
|
|
1734
|
+
|
|
1735
|
+
**When it runs:** Applied in `En16931InvoiceMapper` after the EN 16931 VAT category has been resolved for an invoice line (or shipping charge), before it is written to the XML. Reverse charge orders resolve to category `AE` (rate 0, VATEX-EU-AE); other lines resolve from the rate percent and exemption state. Lets regional add-ons map a line to a different category (e.g. force `E` with a VATEX reason). The filter must return the same array shape it received — a non-array return value is ignored and the resolved category is used.
|
|
1736
|
+
|
|
1737
|
+
**Parameters:**
|
|
1738
|
+
|
|
1739
|
+
- `$resolved` (array): The resolved VAT category data
|
|
1740
|
+
|
|
1741
|
+
```
|
|
1742
|
+
$resolved = [
|
|
1743
|
+
'categoryCode' => 'S', // string — EN 16931 category code (e.g. 'S', 'Z', 'E', 'AE')
|
|
1744
|
+
'ratePercent' => 19.0, // float — VAT rate percent
|
|
1745
|
+
'exemptionReasonCode' => '', // string — VATEX exemption reason code, if any
|
|
1746
|
+
'exemptionReasonText' => '', // string — exemption reason text, if any
|
|
1747
|
+
];
|
|
1748
|
+
```
|
|
1749
|
+
|
|
1750
|
+
- `$context` (array): Context data
|
|
1751
|
+
|
|
1752
|
+
```
|
|
1753
|
+
$context = [
|
|
1754
|
+
'order' => $order, // \FluentCart\App\Models\Order — the order being invoiced
|
|
1755
|
+
'line' => $line, // object|null — the order line item (null for e.g. shipping charges)
|
|
1756
|
+
];
|
|
1757
|
+
```
|
|
1758
|
+
|
|
1759
|
+
**Returns:**
|
|
1760
|
+
|
|
1761
|
+
- `array` — The VAT category data, same shape as `$resolved`
|
|
1762
|
+
|
|
1763
|
+
**Source:** `fluent-cart-pro/app/Services/Invoice/Mapper/En16931InvoiceMapper.php (line 357)`
|
|
1764
|
+
|
|
1765
|
+
**Usage:**
|
|
1766
|
+
|
|
1767
|
+
```
|
|
1768
|
+
add_filter('fluent_cart/einvoice/tax_category', function ($resolved, $context) {
|
|
1769
|
+
// Force category E (exempt) for a specific product line
|
|
1770
|
+
if ($context['line'] && ($context['line']->post_id ?? 0) === 123) {
|
|
1771
|
+
$resolved['categoryCode'] = 'E';
|
|
1772
|
+
$resolved['ratePercent'] = 0.0;
|
|
1773
|
+
$resolved['exemptionReasonCode'] = 'VATEX-EU-O';
|
|
1774
|
+
$resolved['exemptionReasonText'] = 'Exempt supply';
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
return $resolved;
|
|
1778
|
+
}, 10, 2);
|
|
1779
|
+
```
|
|
1780
|
+
|
|
1781
|
+
---
|
|
1782
|
+
|
|
1783
|
+
## Pro: Licensing API Pro
|
|
1784
|
+
|
|
1785
|
+
### ` license/checking_error `
|
|
1786
|
+
|
|
1787
|
+
`fluent_cart/license/checking_error` Pro — Filter license check error response
|
|
1788
|
+
|
|
1789
|
+
**When it runs:** This filter is applied when a license check encounters an error, allowing you to customize the error response.
|
|
1790
|
+
|
|
1791
|
+
**Parameters:**
|
|
1792
|
+
|
|
1793
|
+
- `$error` (array): The error response array
|
|
1794
|
+
|
|
1795
|
+
**Returns:**
|
|
1796
|
+
|
|
1797
|
+
- `$error` (array): The modified error response
|
|
1798
|
+
|
|
1799
|
+
**Source:** `LicenseApiHandler.php:45,56`
|
|
1800
|
+
|
|
1801
|
+
**Usage:**
|
|
1802
|
+
|
|
1803
|
+
```
|
|
1804
|
+
add_filter('fluent_cart/license/checking_error', function ($error) {
|
|
1805
|
+
// Customize error message
|
|
1806
|
+
$error['message'] = 'Please contact support for license verification.';
|
|
1807
|
+
return $error;
|
|
1808
|
+
});
|
|
1809
|
+
```
|
|
1810
|
+
|
|
1811
|
+
### ` license/check_item_id `
|
|
1812
|
+
|
|
1813
|
+
`fluent_cart/license/check_item_id` Pro — Filter item ID validation during license check
|
|
1814
|
+
|
|
1815
|
+
**When it runs:** This filter controls whether the item ID should be validated during a license check API request.
|
|
1816
|
+
|
|
1817
|
+
**Parameters:**
|
|
1818
|
+
|
|
1819
|
+
- `$checkItemId` (bool): Whether to check the item ID (default `true`)
|
|
1820
|
+
|
|
1821
|
+
**Returns:**
|
|
1822
|
+
|
|
1823
|
+
- `$checkItemId` (bool): The modified value
|
|
1824
|
+
|
|
1825
|
+
**Source:** `LicenseApiHandler.php:54`
|
|
1826
|
+
|
|
1827
|
+
**Usage:**
|
|
1828
|
+
|
|
1829
|
+
```
|
|
1830
|
+
add_filter('fluent_cart/license/check_item_id', function ($checkItemId) {
|
|
1831
|
+
// Skip item ID check for specific scenarios
|
|
1832
|
+
return false;
|
|
1833
|
+
});
|
|
1834
|
+
```
|
|
1835
|
+
|
|
1836
|
+
### ` license/check_license_response `
|
|
1837
|
+
|
|
1838
|
+
`fluent_cart/license/check_license_response` Pro — Filter license check API response
|
|
1839
|
+
|
|
1840
|
+
**When it runs:** This filter is applied to the license check API response before it is returned to the client.
|
|
1841
|
+
|
|
1842
|
+
**Parameters:**
|
|
1843
|
+
|
|
1844
|
+
- `$returnData` (array): The license check response data
|
|
1845
|
+
|
|
1846
|
+
**Returns:**
|
|
1847
|
+
|
|
1848
|
+
- `$returnData` (array): The modified response data
|
|
1849
|
+
|
|
1850
|
+
**Source:** `LicenseApiHandler.php:83`
|
|
1851
|
+
|
|
1852
|
+
**Usage:**
|
|
1853
|
+
|
|
1854
|
+
```
|
|
1855
|
+
add_filter('fluent_cart/license/check_license_response', function ($returnData) {
|
|
1856
|
+
// Add custom data to the response
|
|
1857
|
+
$returnData['support_url'] = 'https://example.com/support';
|
|
1858
|
+
return $returnData;
|
|
1859
|
+
});
|
|
1860
|
+
```
|
|
1861
|
+
|
|
1862
|
+
### ` license/activate_license_response `
|
|
1863
|
+
|
|
1864
|
+
`fluent_cart/license/activate_license_response` Pro — Filter license activation API response
|
|
1865
|
+
|
|
1866
|
+
**When it runs:** This filter is applied to the license activation API response before it is returned to the client.
|
|
1867
|
+
|
|
1868
|
+
**Parameters:**
|
|
1869
|
+
|
|
1870
|
+
- `$returnData` (array): The activation response data
|
|
1871
|
+
|
|
1872
|
+
**Returns:**
|
|
1873
|
+
|
|
1874
|
+
- `$returnData` (array): The modified response data
|
|
1875
|
+
|
|
1876
|
+
**Source:** `LicenseApiHandler.php:170,274`
|
|
1877
|
+
|
|
1878
|
+
**Usage:**
|
|
1879
|
+
|
|
1880
|
+
```
|
|
1881
|
+
add_filter('fluent_cart/license/activate_license_response', function ($returnData) {
|
|
1882
|
+
// Add activation timestamp
|
|
1883
|
+
$returnData['activated_at'] = gmdate('Y-m-d H:i:s');
|
|
1884
|
+
return $returnData;
|
|
1885
|
+
});
|
|
1886
|
+
```
|
|
1887
|
+
|
|
1888
|
+
### ` license/deactivate_license_response `
|
|
1889
|
+
|
|
1890
|
+
`fluent_cart/license/deactivate_license_response` Pro — Filter license deactivation API response
|
|
1891
|
+
|
|
1892
|
+
**When it runs:** This filter is applied to the license deactivation API response before it is returned to the client.
|
|
1893
|
+
|
|
1894
|
+
**Parameters:**
|
|
1895
|
+
|
|
1896
|
+
- `$returnData` (array): The deactivation response data
|
|
1897
|
+
|
|
1898
|
+
**Returns:**
|
|
1899
|
+
|
|
1900
|
+
- `$returnData` (array): The modified response data
|
|
1901
|
+
|
|
1902
|
+
**Source:** `LicenseApiHandler.php:356`
|
|
1903
|
+
|
|
1904
|
+
**Usage:**
|
|
1905
|
+
|
|
1906
|
+
```
|
|
1907
|
+
add_filter('fluent_cart/license/deactivate_license_response', function ($returnData) {
|
|
1908
|
+
// Add deactivation notice
|
|
1909
|
+
$returnData['notice'] = 'License deactivated. You can reactivate on another site.';
|
|
1910
|
+
return $returnData;
|
|
1911
|
+
});
|
|
1912
|
+
```
|
|
1913
|
+
|
|
1914
|
+
### ` license/get_version_response `
|
|
1915
|
+
|
|
1916
|
+
`fluent_cart/license/get_version_response` Pro — Filter version check API response
|
|
1917
|
+
|
|
1918
|
+
**When it runs:** This filter is applied to the version check API response, allowing you to modify changelog or update information.
|
|
1919
|
+
|
|
1920
|
+
**Parameters:**
|
|
1921
|
+
|
|
1922
|
+
- `$changeLogData` (array): The version/changelog response data
|
|
1923
|
+
|
|
1924
|
+
**Returns:**
|
|
1925
|
+
|
|
1926
|
+
- `$changeLogData` (array): The modified response data
|
|
1927
|
+
|
|
1928
|
+
**Source:** `LicenseApiHandler.php:463`
|
|
1929
|
+
|
|
1930
|
+
**Usage:**
|
|
1931
|
+
|
|
1932
|
+
```
|
|
1933
|
+
add_filter('fluent_cart/license/get_version_response', function ($changeLogData) {
|
|
1934
|
+
// Append custom changelog entry
|
|
1935
|
+
$changeLogData['sections']['changelog'] .= "\n* Custom patch applied";
|
|
1936
|
+
return $changeLogData;
|
|
1937
|
+
});
|
|
1938
|
+
```
|
|
1939
|
+
|
|
1940
|
+
---
|
|
1941
|
+
|
|
1942
|
+
## Pro: License Validation & Staging Pro
|
|
1943
|
+
|
|
1944
|
+
### ` fluent_cart_sl/is_local_site `
|
|
1945
|
+
|
|
1946
|
+
`fluent_cart_sl/is_local_site` Pro — Filter local/staging site detection
|
|
1947
|
+
|
|
1948
|
+
**When it runs:** This filter is applied when determining if the current site is a local or staging environment for licensing purposes.
|
|
1949
|
+
|
|
1950
|
+
**Parameters:**
|
|
1951
|
+
|
|
1952
|
+
- `$isLocal` (bool): Whether the site is detected as local
|
|
1953
|
+
- `$context` (array): Context data
|
|
1954
|
+
|
|
1955
|
+
```
|
|
1956
|
+
$context = [
|
|
1957
|
+
'url' => 'https://staging.example.com',
|
|
1958
|
+
'site' => 'staging.example.com'
|
|
1959
|
+
];
|
|
1960
|
+
```
|
|
1961
|
+
|
|
1962
|
+
**Returns:**
|
|
1963
|
+
|
|
1964
|
+
- `$isLocal` (bool): The modified detection result
|
|
1965
|
+
|
|
1966
|
+
**Source:** `fluent-cart-pro/app/Modules/Licensing/Models/LicenseSite.php:69`
|
|
1967
|
+
|
|
1968
|
+
**Usage:**
|
|
1969
|
+
|
|
1970
|
+
```
|
|
1971
|
+
add_filter('fluent_cart_sl/is_local_site', function ($isLocal, $context) {
|
|
1972
|
+
// Mark custom staging domains as local
|
|
1973
|
+
if (str_contains($context['url'], '.staging.')) {
|
|
1974
|
+
return true;
|
|
1975
|
+
}
|
|
1976
|
+
return $isLocal;
|
|
1977
|
+
}, 10, 2);
|
|
1978
|
+
```
|
|
1979
|
+
|
|
1980
|
+
### ` license/staging_subdomain_patterns `
|
|
1981
|
+
|
|
1982
|
+
`fluent_cart/license/staging_subdomain_patterns` Pro — Filter staging subdomain patterns
|
|
1983
|
+
|
|
1984
|
+
**When it runs:** This filter is applied when checking if a URL matches known staging subdomain patterns.
|
|
1985
|
+
|
|
1986
|
+
**Parameters:**
|
|
1987
|
+
|
|
1988
|
+
- `$patterns` (array): Array of subdomain patterns that indicate staging sites
|
|
1989
|
+
|
|
1990
|
+
**Returns:**
|
|
1991
|
+
|
|
1992
|
+
- `$patterns` (array): The modified patterns array
|
|
1993
|
+
|
|
1994
|
+
**Source:** `LicenseHelper.php:619`
|
|
1995
|
+
|
|
1996
|
+
**Usage:**
|
|
1997
|
+
|
|
1998
|
+
```
|
|
1999
|
+
add_filter('fluent_cart/license/staging_subdomain_patterns', function ($patterns) {
|
|
2000
|
+
$patterns[] = 'dev-';
|
|
2001
|
+
$patterns[] = 'test-';
|
|
2002
|
+
return $patterns;
|
|
2003
|
+
});
|
|
2004
|
+
```
|
|
2005
|
+
|
|
2006
|
+
### ` license/staging_subfolder_patterns `
|
|
2007
|
+
|
|
2008
|
+
`fluent_cart/license/staging_subfolder_patterns` Pro — Filter staging subfolder patterns
|
|
2009
|
+
|
|
2010
|
+
**When it runs:** This filter is applied when checking if a URL matches known staging subfolder patterns.
|
|
2011
|
+
|
|
2012
|
+
**Parameters:**
|
|
2013
|
+
|
|
2014
|
+
- `$patterns` (array): Array of subfolder patterns that indicate staging sites
|
|
2015
|
+
|
|
2016
|
+
**Returns:**
|
|
2017
|
+
|
|
2018
|
+
- `$patterns` (array): The modified patterns array
|
|
2019
|
+
|
|
2020
|
+
**Source:** `LicenseHelper.php:620`
|
|
2021
|
+
|
|
2022
|
+
**Usage:**
|
|
2023
|
+
|
|
2024
|
+
```
|
|
2025
|
+
add_filter('fluent_cart/license/staging_subfolder_patterns', function ($patterns) {
|
|
2026
|
+
$patterns[] = '/staging/';
|
|
2027
|
+
$patterns[] = '/test-site/';
|
|
2028
|
+
return $patterns;
|
|
2029
|
+
});
|
|
2030
|
+
```
|
|
2031
|
+
|
|
2032
|
+
### ` license/staging_domains `
|
|
2033
|
+
|
|
2034
|
+
`fluent_cart/license/staging_domains` Pro — Filter hosting provider staging domains
|
|
2035
|
+
|
|
2036
|
+
**When it runs:** This filter is applied when checking if a URL belongs to a known hosting provider's staging domain.
|
|
2037
|
+
|
|
2038
|
+
**Parameters:**
|
|
2039
|
+
|
|
2040
|
+
- `$domains` (array): Array of hosting provider staging domain patterns
|
|
2041
|
+
|
|
2042
|
+
**Returns:**
|
|
2043
|
+
|
|
2044
|
+
- `$domains` (array): The modified domains array
|
|
2045
|
+
|
|
2046
|
+
**Source:** `LicenseHelper.php:621`
|
|
2047
|
+
|
|
2048
|
+
**Usage:**
|
|
2049
|
+
|
|
2050
|
+
```
|
|
2051
|
+
add_filter('fluent_cart/license/staging_domains', function ($domains) {
|
|
2052
|
+
$domains[] = 'mystaginghost.com';
|
|
2053
|
+
$domains[] = 'preview.myhost.io';
|
|
2054
|
+
return $domains;
|
|
2055
|
+
});
|
|
2056
|
+
```
|
|
2057
|
+
|
|
2058
|
+
### ` license/is_staging_site_result `
|
|
2059
|
+
|
|
2060
|
+
`fluent_cart/license/is_staging_site_result` Pro — Filter final staging site detection result
|
|
2061
|
+
|
|
2062
|
+
**When it runs:** This filter is applied after all staging detection checks, providing the final determination of whether a site is a staging environment.
|
|
2063
|
+
|
|
2064
|
+
**Parameters:**
|
|
2065
|
+
|
|
2066
|
+
- `$isStaging` (bool): Whether the site is detected as staging (default `false`)
|
|
2067
|
+
- `$url` (string): The site URL being checked
|
|
2068
|
+
|
|
2069
|
+
**Returns:**
|
|
2070
|
+
|
|
2071
|
+
- `$isStaging` (bool): The modified staging detection result
|
|
2072
|
+
|
|
2073
|
+
**Source:** `LicenseHelper.php:657`
|
|
2074
|
+
|
|
2075
|
+
**Usage:**
|
|
2076
|
+
|
|
2077
|
+
```
|
|
2078
|
+
add_filter('fluent_cart/license/is_staging_site_result', function ($isStaging, $url) {
|
|
2079
|
+
// Override staging detection for specific domains
|
|
2080
|
+
if (str_contains($url, 'mycompany-staging.com')) {
|
|
2081
|
+
return true;
|
|
2082
|
+
}
|
|
2083
|
+
return $isStaging;
|
|
2084
|
+
}, 10, 2);
|
|
2085
|
+
```
|
|
2086
|
+
|
|
2087
|
+
---
|
|
2088
|
+
|
|
2089
|
+
## Pro: License Configuration Pro
|
|
2090
|
+
|
|
2091
|
+
### ` license/validity_by_variation `
|
|
2092
|
+
|
|
2093
|
+
`fluent_cart/license/validity_by_variation` Pro — Filter license validity per variation
|
|
2094
|
+
|
|
2095
|
+
**When it runs:** This filter is applied when determining license validity settings for a specific product variation.
|
|
2096
|
+
|
|
2097
|
+
**Parameters:**
|
|
2098
|
+
|
|
2099
|
+
- `$validity` (array): The validity settings
|
|
2100
|
+
- `$context` (array): Context data
|
|
2101
|
+
|
|
2102
|
+
```
|
|
2103
|
+
$context = [
|
|
2104
|
+
'variation' => $variationModel
|
|
2105
|
+
];
|
|
2106
|
+
```
|
|
2107
|
+
|
|
2108
|
+
**Returns:**
|
|
2109
|
+
|
|
2110
|
+
- `$validity` (array): The modified validity settings
|
|
2111
|
+
|
|
2112
|
+
**Source:** `ProductLicenseController.php:74`
|
|
2113
|
+
|
|
2114
|
+
**Usage:**
|
|
2115
|
+
|
|
2116
|
+
```
|
|
2117
|
+
add_filter('fluent_cart/license/validity_by_variation', function ($validity, $context) {
|
|
2118
|
+
// Set custom validity for premium variations
|
|
2119
|
+
$variation = $context['variation'];
|
|
2120
|
+
if ($variation->slug === 'premium') {
|
|
2121
|
+
$validity['duration'] = 365;
|
|
2122
|
+
$validity['unit'] = 'days';
|
|
2123
|
+
}
|
|
2124
|
+
return $validity;
|
|
2125
|
+
}, 10, 2);
|
|
2126
|
+
```
|
|
2127
|
+
|
|
2128
|
+
### ` licensing/delete_license_on_order_deleted `
|
|
2129
|
+
|
|
2130
|
+
`fluent_cart/licensing/delete_license_on_order_deleted` Pro — Filter whether to delete license when order is deleted
|
|
2131
|
+
|
|
2132
|
+
**When it runs:** This filter controls whether associated licenses should be deleted when an order is deleted.
|
|
2133
|
+
|
|
2134
|
+
**Parameters:**
|
|
2135
|
+
|
|
2136
|
+
- `$delete` (bool): Whether to delete the license (default `true`)
|
|
2137
|
+
|
|
2138
|
+
**Returns:**
|
|
2139
|
+
|
|
2140
|
+
- `$delete` (bool): The modified value
|
|
2141
|
+
|
|
2142
|
+
**Source:** `license-actions.php:117`
|
|
2143
|
+
|
|
2144
|
+
**Usage:**
|
|
2145
|
+
|
|
2146
|
+
```
|
|
2147
|
+
add_filter('fluent_cart/licensing/delete_license_on_order_deleted', function ($delete) {
|
|
2148
|
+
// Preserve licenses even when orders are deleted
|
|
2149
|
+
return false;
|
|
2150
|
+
});
|
|
2151
|
+
```
|
|
2152
|
+
|
|
2153
|
+
### ` licensing/revoke_license_on_payment_failed `
|
|
2154
|
+
|
|
2155
|
+
`fluent_cart/licensing/revoke_license_on_payment_failed` Pro — Filter whether to revoke license on payment failure
|
|
2156
|
+
|
|
2157
|
+
**When it runs:** This filter controls whether a license should be revoked when a payment fails.
|
|
2158
|
+
|
|
2159
|
+
**Parameters:**
|
|
2160
|
+
|
|
2161
|
+
- `$revoke` (bool): Whether to revoke the license (default `true`)
|
|
2162
|
+
|
|
2163
|
+
**Returns:**
|
|
2164
|
+
|
|
2165
|
+
- `$revoke` (bool): The modified value
|
|
2166
|
+
|
|
2167
|
+
**Source:** `LicenseGenerationHandler.php:123`
|
|
2168
|
+
|
|
2169
|
+
**Usage:**
|
|
2170
|
+
|
|
2171
|
+
```
|
|
2172
|
+
add_filter('fluent_cart/licensing/revoke_license_on_payment_failed', function ($revoke) {
|
|
2173
|
+
// Give a grace period instead of immediate revocation
|
|
2174
|
+
return false;
|
|
2175
|
+
});
|
|
2176
|
+
```
|
|
2177
|
+
|
|
2178
|
+
### ` licensing/license_create_data `
|
|
2179
|
+
|
|
2180
|
+
`fluent_cart/licensing/license_create_data` Pro — Filter license creation data
|
|
2181
|
+
|
|
2182
|
+
**When it runs:** This filter is applied when constructing the data for a new license before it is saved to the database.
|
|
2183
|
+
|
|
2184
|
+
**Parameters:**
|
|
2185
|
+
|
|
2186
|
+
- `$data` (array): The license creation data
|
|
2187
|
+
- `$context` (array): Context data
|
|
2188
|
+
|
|
2189
|
+
```
|
|
2190
|
+
$context = [
|
|
2191
|
+
'order' => $orderModel,
|
|
2192
|
+
'variation' => $variationModel,
|
|
2193
|
+
'subscription' => $subscriptionModel
|
|
2194
|
+
];
|
|
2195
|
+
```
|
|
2196
|
+
|
|
2197
|
+
**Returns:**
|
|
2198
|
+
|
|
2199
|
+
- `$data` (array): The modified license data
|
|
2200
|
+
|
|
2201
|
+
**Source:** `LicenseGenerationHandler.php:521`
|
|
2202
|
+
|
|
2203
|
+
**Usage:**
|
|
2204
|
+
|
|
2205
|
+
```
|
|
2206
|
+
add_filter('fluent_cart/licensing/license_create_data', function ($data, $context) {
|
|
2207
|
+
// Set custom activation limit based on variation
|
|
2208
|
+
$variation = $context['variation'];
|
|
2209
|
+
if ($variation->slug === 'enterprise') {
|
|
2210
|
+
$data['activation_limit'] = 100;
|
|
2211
|
+
}
|
|
2212
|
+
return $data;
|
|
2213
|
+
}, 10, 2);
|
|
2214
|
+
```
|
|
2215
|
+
|
|
2216
|
+
### ` license/expiration_date_by_variation `
|
|
2217
|
+
|
|
2218
|
+
`fluent_cart/license/expiration_date_by_variation` Pro — Filter license expiration date
|
|
2219
|
+
|
|
2220
|
+
**When it runs:** This filter is applied when calculating the license expiration date for a specific product variation.
|
|
2221
|
+
|
|
2222
|
+
**Parameters:**
|
|
2223
|
+
|
|
2224
|
+
- `$timestamp` (int|false): The expiration timestamp, or `false` for no expiration
|
|
2225
|
+
- `$context` (array): Context data
|
|
2226
|
+
|
|
2227
|
+
```
|
|
2228
|
+
$context = [
|
|
2229
|
+
'variation' => $variationModel,
|
|
2230
|
+
'trial_days' => 14
|
|
2231
|
+
];
|
|
2232
|
+
```
|
|
2233
|
+
|
|
2234
|
+
**Returns:**
|
|
2235
|
+
|
|
2236
|
+
- `$timestamp` (int|false): The modified expiration timestamp
|
|
2237
|
+
|
|
2238
|
+
**Source:** `LicenseHelper.php:81`
|
|
2239
|
+
|
|
2240
|
+
**Usage:**
|
|
2241
|
+
|
|
2242
|
+
```
|
|
2243
|
+
add_filter('fluent_cart/license/expiration_date_by_variation', function ($timestamp, $context) {
|
|
2244
|
+
// Add extra 30 days for trial users
|
|
2245
|
+
if ($context['trial_days'] > 0 && $timestamp) {
|
|
2246
|
+
return $timestamp + (30 * DAY_IN_SECONDS);
|
|
2247
|
+
}
|
|
2248
|
+
return $timestamp;
|
|
2249
|
+
}, 10, 2);
|
|
2250
|
+
```
|
|
2251
|
+
|
|
2252
|
+
### ` license/default_validity_by_variation `
|
|
2253
|
+
|
|
2254
|
+
`fluent_cart/license/default_validity_by_variation` Pro — Filter default license validity
|
|
2255
|
+
|
|
2256
|
+
**When it runs:** This filter is applied when retrieving the default license validity settings for a product variation.
|
|
2257
|
+
|
|
2258
|
+
**Parameters:**
|
|
2259
|
+
|
|
2260
|
+
- `$validity` (array): The default validity settings
|
|
2261
|
+
|
|
2262
|
+
```
|
|
2263
|
+
$validity = [
|
|
2264
|
+
'unit' => 'years',
|
|
2265
|
+
'value' => 1
|
|
2266
|
+
];
|
|
2267
|
+
```
|
|
2268
|
+
|
|
2269
|
+
- `$context` (array): Context data
|
|
2270
|
+
|
|
2271
|
+
```
|
|
2272
|
+
$context = [
|
|
2273
|
+
'variation' => $variationModel
|
|
2274
|
+
];
|
|
2275
|
+
```
|
|
2276
|
+
|
|
2277
|
+
**Returns:**
|
|
2278
|
+
|
|
2279
|
+
- `$validity` (array): The modified validity settings
|
|
2280
|
+
|
|
2281
|
+
**Source:** `LicenseHelper.php:418`
|
|
2282
|
+
|
|
2283
|
+
**Usage:**
|
|
2284
|
+
|
|
2285
|
+
```
|
|
2286
|
+
add_filter('fluent_cart/license/default_validity_by_variation', function ($validity, $context) {
|
|
2287
|
+
// Set lifetime validity for specific variations
|
|
2288
|
+
$variation = $context['variation'];
|
|
2289
|
+
if ($variation->slug === 'lifetime') {
|
|
2290
|
+
return ['unit' => 'years', 'value' => 100];
|
|
2291
|
+
}
|
|
2292
|
+
return $validity;
|
|
2293
|
+
}, 10, 2);
|
|
2294
|
+
```
|
|
2295
|
+
|
|
2296
|
+
### ` license/grace_period_in_days `
|
|
2297
|
+
|
|
2298
|
+
`fluent_cart/license/grace_period_in_days` Pro — Filter license grace period
|
|
2299
|
+
|
|
2300
|
+
**When it runs:** This filter controls the number of grace period days after a license expires before it is fully revoked.
|
|
2301
|
+
|
|
2302
|
+
**Parameters:**
|
|
2303
|
+
|
|
2304
|
+
- `$days` (int): The grace period in days (default `15`)
|
|
2305
|
+
|
|
2306
|
+
**Returns:**
|
|
2307
|
+
|
|
2308
|
+
- `$days` (int): The modified grace period
|
|
2309
|
+
|
|
2310
|
+
**Source:** `LicenseHelper.php:687`
|
|
2311
|
+
|
|
2312
|
+
**Usage:**
|
|
2313
|
+
|
|
2314
|
+
```
|
|
2315
|
+
add_filter('fluent_cart/license/grace_period_in_days', function ($days) {
|
|
2316
|
+
// Extend grace period to 30 days
|
|
2317
|
+
return 30;
|
|
2318
|
+
});
|
|
2319
|
+
```
|
|
2320
|
+
|
|
2321
|
+
### ` fluent_cart_sl/generate_license_key `
|
|
2322
|
+
|
|
2323
|
+
`fluent_cart_sl/generate_license_key` Pro — Filter license key generation
|
|
2324
|
+
|
|
2325
|
+
**When it runs:** This filter is applied when generating a new license key, allowing you to customize the key format.
|
|
2326
|
+
|
|
2327
|
+
**Parameters:**
|
|
2328
|
+
|
|
2329
|
+
- `$key` (string): The generated license key (MD5 hash by default)
|
|
2330
|
+
- `$context` (array): Context data
|
|
2331
|
+
|
|
2332
|
+
```
|
|
2333
|
+
$context = [
|
|
2334
|
+
'data' => $licenseData
|
|
2335
|
+
];
|
|
2336
|
+
```
|
|
2337
|
+
|
|
2338
|
+
**Returns:**
|
|
2339
|
+
|
|
2340
|
+
- `$key` (string): The modified license key
|
|
2341
|
+
|
|
2342
|
+
**Source:** `UUID.php:32`
|
|
2343
|
+
|
|
2344
|
+
**Usage:**
|
|
2345
|
+
|
|
2346
|
+
```
|
|
2347
|
+
add_filter('fluent_cart_sl/generate_license_key', function ($key, $context) {
|
|
2348
|
+
// Use a formatted license key
|
|
2349
|
+
$key = strtoupper($key);
|
|
2350
|
+
return implode('-', str_split($key, 8));
|
|
2351
|
+
}, 10, 2);
|
|
2352
|
+
```
|
|
2353
|
+
|
|
2354
|
+
### ` fluent_cart_sl/issue_license_data `
|
|
2355
|
+
|
|
2356
|
+
`fluent_cart_sl/issue_license_data` Pro — Filter license issue data
|
|
2357
|
+
|
|
2358
|
+
**When it runs:** This filter is applied to license data when issuing a new license through the license manager.
|
|
2359
|
+
|
|
2360
|
+
**Parameters:**
|
|
2361
|
+
|
|
2362
|
+
- `$data` (array): The license issue data
|
|
2363
|
+
|
|
2364
|
+
**Returns:**
|
|
2365
|
+
|
|
2366
|
+
- `$data` (array): The modified license data
|
|
2367
|
+
|
|
2368
|
+
**Source:** `LicenseManager.php:257`
|
|
2369
|
+
|
|
2370
|
+
**Usage:**
|
|
2371
|
+
|
|
2372
|
+
```
|
|
2373
|
+
add_filter('fluent_cart_sl/issue_license_data', function ($data) {
|
|
2374
|
+
// Set default activation limit
|
|
2375
|
+
if (empty($data['activation_limit'])) {
|
|
2376
|
+
$data['activation_limit'] = 5;
|
|
2377
|
+
}
|
|
2378
|
+
return $data;
|
|
2379
|
+
});
|
|
2380
|
+
```
|
|
2381
|
+
|
|
2382
|
+
---
|
|
2383
|
+
|
|
2384
|
+
## Pro: Plugin Updater Pro
|
|
2385
|
+
|
|
2386
|
+
### ` fluent_sl/api_request_query_params `
|
|
2387
|
+
|
|
2388
|
+
`fluent_sl/api_request_query_params` Pro — Filter API request query parameters
|
|
2389
|
+
|
|
2390
|
+
**When it runs:** This filter is applied when building query parameters for license API requests (update checks, activations, etc.).
|
|
2391
|
+
|
|
2392
|
+
**Parameters:**
|
|
2393
|
+
|
|
2394
|
+
- `$params` (array): The query parameters array
|
|
2395
|
+
|
|
2396
|
+
**Returns:**
|
|
2397
|
+
|
|
2398
|
+
- `$params` (array): The modified query parameters
|
|
2399
|
+
|
|
2400
|
+
**Source:** `PluginUpdater.php:234`
|
|
2401
|
+
|
|
2402
|
+
**Usage:**
|
|
2403
|
+
|
|
2404
|
+
```
|
|
2405
|
+
add_filter('fluent_sl/api_request_query_params', function ($params) {
|
|
2406
|
+
// Add custom tracking parameter
|
|
2407
|
+
$params['php_version'] = phpversion();
|
|
2408
|
+
$params['wp_version'] = get_bloginfo('version');
|
|
2409
|
+
return $params;
|
|
2410
|
+
});
|
|
2411
|
+
```
|
|
2412
|
+
|
|
2413
|
+
### ` fluent_sl/updater_payload_{$slug} `
|
|
2414
|
+
|
|
2415
|
+
`fluent_sl/updater_payload_{$slug}` Pro — Filter update check payload (DYNAMIC)
|
|
2416
|
+
|
|
2417
|
+
**When it runs:** This dynamic filter is applied to the update check payload for a specific plugin slug. The `{$slug}` is replaced with the plugin's slug.
|
|
2418
|
+
|
|
2419
|
+
**Parameters:**
|
|
2420
|
+
|
|
2421
|
+
- `$payload` (array): The update check payload
|
|
2422
|
+
|
|
2423
|
+
**Returns:**
|
|
2424
|
+
|
|
2425
|
+
- `$payload` (array): The modified payload
|
|
2426
|
+
|
|
2427
|
+
**Source:** `PluginUpdater.php:251`
|
|
2428
|
+
|
|
2429
|
+
**Usage:**
|
|
2430
|
+
|
|
2431
|
+
```
|
|
2432
|
+
add_filter('fluent_sl/updater_payload_fluent-cart-pro', function ($payload) {
|
|
2433
|
+
// Add environment info to update payload
|
|
2434
|
+
$payload['server_software'] = $_SERVER['SERVER_SOFTWARE'] ?? 'unknown';
|
|
2435
|
+
return $payload;
|
|
2436
|
+
});
|
|
2437
|
+
```
|
|
2438
|
+
|
|
2439
|
+
---
|