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/settings-and-configuration.md
ADDED
|
@@ -0,0 +1,2966 @@
|
|
|
1
|
+
# Settings & Configuration
|
|
2
|
+
|
|
3
|
+
All filters related to admin settings, store configuration, module management, currency formatting, admin UI, permissions, translations, email notifications, and block editor.
|
|
4
|
+
|
|
5
|
+
## Store Settings
|
|
6
|
+
|
|
7
|
+
### ` store_settings/values `
|
|
8
|
+
|
|
9
|
+
`fluent_cart/store_settings/values` — Filter default store settings values
|
|
10
|
+
|
|
11
|
+
**When it runs:** This filter is applied when retrieving the default store settings, before merging with saved values. Use it to add or modify defaults for all store configuration options.
|
|
12
|
+
|
|
13
|
+
**Parameters:**
|
|
14
|
+
|
|
15
|
+
- `$defaultSettings` (array): The default store settings
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
$defaultSettings = [
|
|
19
|
+
'store_name' => get_bloginfo('name'),
|
|
20
|
+
'note_for_user_account_creation' => 'An user account will be created',
|
|
21
|
+
'checkout_button_text' => 'Checkout',
|
|
22
|
+
'view_cart_button_text' => 'View Cart',
|
|
23
|
+
'cart_button_text' => 'Add To Cart',
|
|
24
|
+
'popup_button_text' => 'View Product',
|
|
25
|
+
'out_of_stock_button_text' => 'Not Available',
|
|
26
|
+
'currency_position' => 'before',
|
|
27
|
+
'decimal_separator' => 'dot',
|
|
28
|
+
'checkout_method_style' => 'logo',
|
|
29
|
+
'enable_modal_checkout' => 'no',
|
|
30
|
+
'require_logged_in' => 'no',
|
|
31
|
+
'show_cart_icon_in_nav' => 'no',
|
|
32
|
+
'show_cart_icon_in_body' => 'yes',
|
|
33
|
+
'additional_address_field' => 'yes',
|
|
34
|
+
'hide_coupon_field' => 'no',
|
|
35
|
+
'user_account_creation_mode' => 'all',
|
|
36
|
+
'checkout_page_id' => '',
|
|
37
|
+
'custom_payment_page_id' => '',
|
|
38
|
+
'registration_page_id' => '',
|
|
39
|
+
'login_page_id' => '',
|
|
40
|
+
'cart_page_id' => '',
|
|
41
|
+
'receipt_page_id' => '',
|
|
42
|
+
'shop_page_id' => '',
|
|
43
|
+
'customer_profile_page_id' => '',
|
|
44
|
+
'customer_profile_page_slug' => '',
|
|
45
|
+
'currency' => 'USD',
|
|
46
|
+
'store_address1' => '',
|
|
47
|
+
'store_address2' => '',
|
|
48
|
+
'store_city' => '',
|
|
49
|
+
'store_country' => '',
|
|
50
|
+
'store_postcode' => '',
|
|
51
|
+
'store_state' => '',
|
|
52
|
+
'show_relevant_product_in_single_page' => 'yes',
|
|
53
|
+
'show_relevant_product_in_modal' => '',
|
|
54
|
+
'order_mode' => 'test',
|
|
55
|
+
'variation_view' => 'both',
|
|
56
|
+
'variation_columns' => 'masonry',
|
|
57
|
+
'enable_early_payment_for_installment' => 'yes',
|
|
58
|
+
'modules_settings' => [],
|
|
59
|
+
'min_receipt_number' => '1',
|
|
60
|
+
'inv_prefix' => 'INV-',
|
|
61
|
+
];
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
- `$data` (array): Additional context data (empty array)
|
|
65
|
+
|
|
66
|
+
**Returns:** `array` — The modified default settings array
|
|
67
|
+
|
|
68
|
+
**Source:** `api/StoreSettings.php:115`
|
|
69
|
+
|
|
70
|
+
**Usage:**
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
add_filter('fluent_cart/store_settings/values', function ($defaultSettings, $data) {
|
|
74
|
+
// Change default currency and order mode
|
|
75
|
+
$defaultSettings['currency'] = 'EUR';
|
|
76
|
+
$defaultSettings['order_mode'] = 'live';
|
|
77
|
+
return $defaultSettings;
|
|
78
|
+
}, 10, 2);
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### ` store_settings/fields `
|
|
82
|
+
|
|
83
|
+
`fluent_cart/store_settings/fields` — Filter store settings form field definitions
|
|
84
|
+
|
|
85
|
+
**When it runs:** This filter is applied when rendering the store settings form in the admin interface. Use it to add, remove, or modify settings tabs and fields.
|
|
86
|
+
|
|
87
|
+
**Parameters:**
|
|
88
|
+
|
|
89
|
+
- `$fields` (array): Nested array of settings tabs and field definitions
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
$fields = [
|
|
93
|
+
'setting_tabs' => [
|
|
94
|
+
'schema' => [
|
|
95
|
+
'general_tab' => [
|
|
96
|
+
'title' => 'General Settings',
|
|
97
|
+
'fields' => [...]
|
|
98
|
+
],
|
|
99
|
+
'checkout_tab' => [
|
|
100
|
+
'title' => 'Checkout Settings',
|
|
101
|
+
'fields' => [...]
|
|
102
|
+
],
|
|
103
|
+
'modules_tab' => [
|
|
104
|
+
'title' => 'Modules',
|
|
105
|
+
'fields' => [...]
|
|
106
|
+
],
|
|
107
|
+
]
|
|
108
|
+
]
|
|
109
|
+
];
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
- `$data` (array): Additional context data (empty array)
|
|
113
|
+
|
|
114
|
+
**Returns:** `array` — The modified fields array
|
|
115
|
+
|
|
116
|
+
**Source:** `api/StoreSettings.php:1380`
|
|
117
|
+
|
|
118
|
+
**Usage:**
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
add_filter('fluent_cart/store_settings/fields', function ($fields, $data) {
|
|
122
|
+
// Add a custom settings section
|
|
123
|
+
$fields['setting_tabs']['schema']['custom_tab'] = [
|
|
124
|
+
'title' => 'Custom Settings',
|
|
125
|
+
'fields' => [
|
|
126
|
+
[
|
|
127
|
+
'key' => 'custom_field',
|
|
128
|
+
'label' => 'Custom Field',
|
|
129
|
+
'type' => 'text',
|
|
130
|
+
]
|
|
131
|
+
]
|
|
132
|
+
];
|
|
133
|
+
return $fields;
|
|
134
|
+
}, 10, 2);
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### ` store_setting_fields `
|
|
138
|
+
|
|
139
|
+
`fluent_cart/store_setting_fields` — Filter the store settings fields payload (legacy hook name)
|
|
140
|
+
|
|
141
|
+
**When it runs:** This filter is applied inside `StoreSettings::fields()`, the endpoint the admin settings UI calls to build its field schema. It is distinct from [`store_settings/fields`](#store-settings-fields) above — that one filters the tab/field definitions returned by a different code path, while this older, singular-named hook filters the array built by `fields()` itself (which also resolves preview links such as `shop_page_id` and `customer_profile_page_id`).
|
|
142
|
+
|
|
143
|
+
**Parameters:**
|
|
144
|
+
|
|
145
|
+
- `$fields` (array): The store settings fields array assembled by `fields()`
|
|
146
|
+
|
|
147
|
+
**Returns:** `array` — The modified fields array
|
|
148
|
+
|
|
149
|
+
**Source:** `api/StoreSettings.php:122`
|
|
150
|
+
|
|
151
|
+
**Usage:**
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
add_filter('fluent_cart/store_setting_fields', function ($fields) {
|
|
155
|
+
// Inspect or adjust the fields payload built by StoreSettings::fields()
|
|
156
|
+
return $fields;
|
|
157
|
+
});
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### ` store_settings/rules `
|
|
161
|
+
|
|
162
|
+
`fluent_cart/store_settings/rules` — Filter validation rules for store settings
|
|
163
|
+
|
|
164
|
+
**When it runs:** This filter is applied when validating store settings form submissions. Use it to add or modify validation rules for settings fields.
|
|
165
|
+
|
|
166
|
+
**Parameters:**
|
|
167
|
+
|
|
168
|
+
- `$rules` (array): Validation rules keyed by field name
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
$rules = [
|
|
172
|
+
'store_name' => 'required|sanitizeText|maxLength:200',
|
|
173
|
+
'store_country' => 'required|sanitizeText|maxLength:200',
|
|
174
|
+
];
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
**Returns:** `array` — The modified validation rules array
|
|
178
|
+
|
|
179
|
+
**Source:** `app/Http/Requests/FluentMetaRequest.php:37`
|
|
180
|
+
|
|
181
|
+
**Usage:**
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
add_filter('fluent_cart/store_settings/rules', function ($rules) {
|
|
185
|
+
// Add validation for a custom field
|
|
186
|
+
$rules['custom_field'] = 'required|sanitizeText|maxLength:100';
|
|
187
|
+
return $rules;
|
|
188
|
+
});
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### ` store_settings/sanitizer `
|
|
192
|
+
|
|
193
|
+
`fluent_cart/store_settings/sanitizer` — Filter sanitization rules for store settings
|
|
194
|
+
|
|
195
|
+
**When it runs:** This filter is applied when sanitizing store settings input before saving. Each key maps to a sanitize callback function or a callable.
|
|
196
|
+
|
|
197
|
+
**Parameters:**
|
|
198
|
+
|
|
199
|
+
- `$sanitizer` (array): Sanitization callbacks keyed by field name
|
|
200
|
+
|
|
201
|
+
```
|
|
202
|
+
$sanitizer = [
|
|
203
|
+
'store_name' => 'sanitize_text_field',
|
|
204
|
+
'currency' => 'sanitize_text_field',
|
|
205
|
+
'checkout_page_id' => 'intval',
|
|
206
|
+
'shop_page_id' => 'intval',
|
|
207
|
+
'store_address1' => 'sanitize_text_field',
|
|
208
|
+
'store_country' => 'sanitize_text_field',
|
|
209
|
+
'order_mode' => 'sanitize_text_field',
|
|
210
|
+
// ... more fields
|
|
211
|
+
];
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
**Returns:** `array` — The modified sanitizer array
|
|
215
|
+
|
|
216
|
+
**Source:** `app/Http/Requests/FluentMetaRequest.php:174`
|
|
217
|
+
|
|
218
|
+
**Usage:**
|
|
219
|
+
|
|
220
|
+
```
|
|
221
|
+
add_filter('fluent_cart/store_settings/sanitizer', function ($sanitizer) {
|
|
222
|
+
// Add sanitizer for a custom field
|
|
223
|
+
$sanitizer['custom_field'] = 'sanitize_text_field';
|
|
224
|
+
return $sanitizer;
|
|
225
|
+
});
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### ` confirmation_setting_fields `
|
|
229
|
+
|
|
230
|
+
`fluent_cart/confirmation_setting_fields` — Filter confirmation page settings fields
|
|
231
|
+
|
|
232
|
+
**When it runs:** This filter is applied when rendering the confirmation (receipt) page settings in the admin. Use it to add additional settings fields for the order confirmation page.
|
|
233
|
+
|
|
234
|
+
**Parameters:**
|
|
235
|
+
|
|
236
|
+
- `$fields` (array): Field definitions for the confirmation page settings
|
|
237
|
+
|
|
238
|
+
```
|
|
239
|
+
$fields = [
|
|
240
|
+
'confirmation_page_id' => [
|
|
241
|
+
'label' => 'Select custom page',
|
|
242
|
+
'type' => 'select',
|
|
243
|
+
'options' => $pages, // array of WordPress pages
|
|
244
|
+
'value' => '',
|
|
245
|
+
'note' => '[fluent_cart_receipt] shortcode instruction',
|
|
246
|
+
],
|
|
247
|
+
];
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
- `$data` (array): Additional context data (empty array)
|
|
251
|
+
|
|
252
|
+
**Returns:** `array` — The modified fields array
|
|
253
|
+
|
|
254
|
+
**Source:** `api/Confirmation.php:76`
|
|
255
|
+
|
|
256
|
+
**Usage:**
|
|
257
|
+
|
|
258
|
+
```
|
|
259
|
+
add_filter('fluent_cart/confirmation_setting_fields', function ($fields, $data) {
|
|
260
|
+
// Add a custom confirmation setting
|
|
261
|
+
$fields['show_social_share'] = [
|
|
262
|
+
'label' => 'Show social share buttons',
|
|
263
|
+
'type' => 'checkbox',
|
|
264
|
+
'value' => 'no',
|
|
265
|
+
];
|
|
266
|
+
return $fields;
|
|
267
|
+
}, 10, 2);
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## Module Settings
|
|
273
|
+
|
|
274
|
+
### ` module_setting/fields `
|
|
275
|
+
|
|
276
|
+
`fluent_cart/module_setting/fields` — Filter module settings form fields
|
|
277
|
+
|
|
278
|
+
**When it runs:** This filter is applied when retrieving module settings field definitions. Modules register their settings fields through this filter.
|
|
279
|
+
|
|
280
|
+
**Parameters:**
|
|
281
|
+
|
|
282
|
+
- `$fields` (array): Array of module settings field definitions (empty by default)
|
|
283
|
+
|
|
284
|
+
```
|
|
285
|
+
$fields = [];
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
- `$data` (array): Additional context data (empty array)
|
|
289
|
+
|
|
290
|
+
**Returns:** `array` — The modified fields array
|
|
291
|
+
|
|
292
|
+
**Source:** `api/ModuleSettings.php:21`
|
|
293
|
+
|
|
294
|
+
**Usage:**
|
|
295
|
+
|
|
296
|
+
```
|
|
297
|
+
add_filter('fluent_cart/module_setting/fields', function ($fields, $data) {
|
|
298
|
+
// Register a custom module's settings fields
|
|
299
|
+
$fields['custom_module'] = [
|
|
300
|
+
'title' => 'Custom Module',
|
|
301
|
+
'fields' => [
|
|
302
|
+
[
|
|
303
|
+
'key' => 'api_key',
|
|
304
|
+
'label' => 'API Key',
|
|
305
|
+
'type' => 'text',
|
|
306
|
+
]
|
|
307
|
+
]
|
|
308
|
+
];
|
|
309
|
+
return $fields;
|
|
310
|
+
}, 10, 2);
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### ` module_setting/default_values `
|
|
314
|
+
|
|
315
|
+
`fluent_cart/module_setting/default_values` — Filter module settings default values
|
|
316
|
+
|
|
317
|
+
**When it runs:** This filter is applied when retrieving all module settings. It provides default values that are merged with saved settings, ensuring newly registered modules have their defaults applied.
|
|
318
|
+
|
|
319
|
+
**Parameters:**
|
|
320
|
+
|
|
321
|
+
- `$defaults` (array): Default values for module settings (empty by default)
|
|
322
|
+
|
|
323
|
+
```
|
|
324
|
+
$defaults = [];
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
- `$data` (array): Additional context data (empty array)
|
|
328
|
+
|
|
329
|
+
**Returns:** `array` — The modified defaults array keyed by module name
|
|
330
|
+
|
|
331
|
+
**Source:** `api/ModuleSettings.php:42`
|
|
332
|
+
|
|
333
|
+
**Usage:**
|
|
334
|
+
|
|
335
|
+
```
|
|
336
|
+
add_filter('fluent_cart/module_setting/default_values', function ($defaults, $data) {
|
|
337
|
+
// Set defaults for a custom module
|
|
338
|
+
$defaults['custom_module'] = [
|
|
339
|
+
'active' => 'no',
|
|
340
|
+
'api_key' => '',
|
|
341
|
+
'mode' => 'sandbox',
|
|
342
|
+
];
|
|
343
|
+
return $defaults;
|
|
344
|
+
}, 10, 2);
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
### ` module_settings/plugin_addons `
|
|
348
|
+
|
|
349
|
+
`fluent_cart/module_settings/plugin_addons` — Filter plugin add-on modules list
|
|
350
|
+
|
|
351
|
+
**When it runs:** This filter is applied when listing available plugin add-ons in the module settings page. Use it to register third-party add-on modules that can be installed from the admin.
|
|
352
|
+
|
|
353
|
+
**Parameters:**
|
|
354
|
+
|
|
355
|
+
- `$addons` (array): Array of add-on module definitions
|
|
356
|
+
|
|
357
|
+
```
|
|
358
|
+
$addons = [
|
|
359
|
+
[
|
|
360
|
+
'title' => 'Elementor Blocks',
|
|
361
|
+
'description' => 'Enable to get Elementor Blocks for FluentCart.',
|
|
362
|
+
'logo' => 'path/to/logo.svg',
|
|
363
|
+
'dark_logo' => 'path/to/dark-logo.svg',
|
|
364
|
+
'plugin_slug' => 'fluent-cart-elementor-blocks',
|
|
365
|
+
'plugin_file' => 'fluent-cart-elementor-blocks/fluent-cart-elementor-blocks.php',
|
|
366
|
+
'source_type' => 'cdn',
|
|
367
|
+
'source_link' => 'https://example.com/plugin.zip',
|
|
368
|
+
'upcoming' => false,
|
|
369
|
+
'repo_link' => 'https://fluentcart.com/fluentcart-addons',
|
|
370
|
+
]
|
|
371
|
+
];
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
**Returns:** `array` — The modified add-ons array
|
|
375
|
+
|
|
376
|
+
**Source:** `app/Http/Controllers/ModuleSettingsController.php:328`
|
|
377
|
+
|
|
378
|
+
**Usage:**
|
|
379
|
+
|
|
380
|
+
```
|
|
381
|
+
add_filter('fluent_cart/module_settings/plugin_addons', function ($addons) {
|
|
382
|
+
// Register a custom add-on module
|
|
383
|
+
$addons[] = [
|
|
384
|
+
'title' => 'My Custom Add-on',
|
|
385
|
+
'description' => 'Extends FluentCart with custom features.',
|
|
386
|
+
'logo' => plugin_dir_url(__FILE__) . 'logo.svg',
|
|
387
|
+
'plugin_slug' => 'my-custom-addon',
|
|
388
|
+
'plugin_file' => 'my-custom-addon/my-custom-addon.php',
|
|
389
|
+
'source_type' => 'cdn',
|
|
390
|
+
'source_link' => 'https://example.com/my-addon.zip',
|
|
391
|
+
'upcoming' => false,
|
|
392
|
+
];
|
|
393
|
+
return $addons;
|
|
394
|
+
});
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
---
|
|
398
|
+
|
|
399
|
+
## Subscription System Billing Store-managed
|
|
400
|
+
|
|
401
|
+
Kill-switches for the `system` (auto-charge) side of the store-managed subscription engine — `system_billing_enabled` (master switch) and `system_collection_enabled` (per-checkout gate) — are documented with the rest of the subscription filters under [Customers & Subscriptions → Collection Method & Auto-Charge](/hooks/filters/customers-and-subscriptions.md#collection-method-auto-charge).
|
|
402
|
+
|
|
403
|
+
---
|
|
404
|
+
|
|
405
|
+
## Currency & Formatting
|
|
406
|
+
|
|
407
|
+
### ` global_currency_setting `
|
|
408
|
+
|
|
409
|
+
`fluent_cart/global_currency_setting` — Filter global currency settings
|
|
410
|
+
|
|
411
|
+
**When it runs:** This filter is applied when retrieving the global currency configuration. It runs after all currency settings have been resolved from stored values and defaults.
|
|
412
|
+
|
|
413
|
+
**Parameters:**
|
|
414
|
+
|
|
415
|
+
- `$settings` (array): The resolved currency settings
|
|
416
|
+
|
|
417
|
+
```
|
|
418
|
+
$settings = [
|
|
419
|
+
'currency' => 'USD',
|
|
420
|
+
'locale' => 'auto',
|
|
421
|
+
'currency_position' => 'left',
|
|
422
|
+
'currency_separator' => 'dot',
|
|
423
|
+
'decimal_separator' => '.',
|
|
424
|
+
'decimal_points' => 0,
|
|
425
|
+
'settings_type' => 'global',
|
|
426
|
+
'order_mode' => 'test',
|
|
427
|
+
'is_zero_decimal' => false,
|
|
428
|
+
'currency_sign' => '$',
|
|
429
|
+
];
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
- `$data` (array): Additional context data (empty array)
|
|
433
|
+
|
|
434
|
+
**Returns:** `array` — The modified currency settings
|
|
435
|
+
|
|
436
|
+
**Source:** `api/CurrencySettings.php:52`
|
|
437
|
+
|
|
438
|
+
**Usage:**
|
|
439
|
+
|
|
440
|
+
```
|
|
441
|
+
add_filter('fluent_cart/global_currency_setting', function ($settings, $data) {
|
|
442
|
+
// Override currency settings
|
|
443
|
+
$settings['currency'] = 'EUR';
|
|
444
|
+
$settings['currency_sign'] = '€';
|
|
445
|
+
$settings['currency_position'] = 'right';
|
|
446
|
+
return $settings;
|
|
447
|
+
}, 10, 2);
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
### ` available_currencies `
|
|
451
|
+
|
|
452
|
+
`fluent_cart/available_currencies` — Filter available currencies for the store
|
|
453
|
+
|
|
454
|
+
**When it runs:** Applied when retrieving the list of available currencies for the currency selector in store settings.
|
|
455
|
+
|
|
456
|
+
**Parameters:**
|
|
457
|
+
|
|
458
|
+
- `$currencies` (array): Array of currency definitions keyed by currency code, each with `label`, `value`, and `symbol`
|
|
459
|
+
- `$data` (array): Additional context data (empty array)
|
|
460
|
+
|
|
461
|
+
**Returns:** `array` — The modified currencies array
|
|
462
|
+
|
|
463
|
+
**Source:** `app/Helpers/Helper.php:661`
|
|
464
|
+
|
|
465
|
+
**Usage:**
|
|
466
|
+
|
|
467
|
+
```
|
|
468
|
+
add_filter('fluent_cart/available_currencies', function ($currencies, $data) {
|
|
469
|
+
// Add a custom currency option
|
|
470
|
+
$currencies['BTC'] = [
|
|
471
|
+
'label' => 'Bitcoin',
|
|
472
|
+
'value' => 'BTC',
|
|
473
|
+
'symbol' => '₿',
|
|
474
|
+
];
|
|
475
|
+
return $currencies;
|
|
476
|
+
}, 10, 2);
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
### ` accepted_currencies `
|
|
480
|
+
|
|
481
|
+
`fluent_cart/accepted_currencies` — Filter the full list of accepted currencies
|
|
482
|
+
|
|
483
|
+
**When it runs:** This filter is applied when retrieving the complete list of currencies supported by payment gateways (based on Stripe's currency list). Used for currency validation and display throughout the plugin.
|
|
484
|
+
|
|
485
|
+
**Parameters:**
|
|
486
|
+
|
|
487
|
+
- `$currencies` (array): Associative array of currency code to localized name
|
|
488
|
+
|
|
489
|
+
```
|
|
490
|
+
$currencies = [
|
|
491
|
+
'AED' => 'United Arab Emirates Dirham',
|
|
492
|
+
'AFN' => 'Afghan Afghani',
|
|
493
|
+
'ALL' => 'Albanian Lek',
|
|
494
|
+
'AMD' => 'Armenian Dram',
|
|
495
|
+
'ANG' => 'Netherlands Antillean Gulden',
|
|
496
|
+
'AUD' => 'Australian Dollar',
|
|
497
|
+
'USD' => 'United States Dollar',
|
|
498
|
+
// ... 130+ currencies
|
|
499
|
+
];
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
**Returns:** `array` — The modified currencies array
|
|
503
|
+
|
|
504
|
+
**Source:** `app/Helpers/CurrenciesHelper.php:20`
|
|
505
|
+
|
|
506
|
+
**Usage:**
|
|
507
|
+
|
|
508
|
+
```
|
|
509
|
+
add_filter('fluent_cart/accepted_currencies', function ($currencies) {
|
|
510
|
+
// Remove a currency from the accepted list
|
|
511
|
+
unset($currencies['XRP']);
|
|
512
|
+
// Add a custom currency
|
|
513
|
+
$currencies['CUSTOM'] = 'My Custom Currency';
|
|
514
|
+
return $currencies;
|
|
515
|
+
});
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
### ` global_currency_symbols `
|
|
519
|
+
|
|
520
|
+
`fluent_cart/global_currency_symbols` — Filter currency symbols map
|
|
521
|
+
|
|
522
|
+
**When it runs:** This filter is applied when retrieving the mapping of currency codes to their display symbols. Used for formatting prices throughout the plugin.
|
|
523
|
+
|
|
524
|
+
**Parameters:**
|
|
525
|
+
|
|
526
|
+
- `$symbols` (array): Associative array of currency code to HTML symbol entity
|
|
527
|
+
|
|
528
|
+
```
|
|
529
|
+
$symbols = [
|
|
530
|
+
'AED' => 'د.إ',
|
|
531
|
+
'AUD' => '$',
|
|
532
|
+
'BDT' => '৳ ',
|
|
533
|
+
'EUR' => '€',
|
|
534
|
+
'GBP' => '£',
|
|
535
|
+
'USD' => '$',
|
|
536
|
+
// ... many more
|
|
537
|
+
];
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
**Returns:** `array` — The modified currency symbols array
|
|
541
|
+
|
|
542
|
+
**Source:** `app/Helpers/CurrenciesHelper.php:195`
|
|
543
|
+
|
|
544
|
+
**Usage:**
|
|
545
|
+
|
|
546
|
+
```
|
|
547
|
+
add_filter('fluent_cart/global_currency_symbols', function ($symbols) {
|
|
548
|
+
// Override a symbol
|
|
549
|
+
$symbols['BDT'] = 'Tk';
|
|
550
|
+
return $symbols;
|
|
551
|
+
});
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
### ` zero_decimal_currencies `
|
|
555
|
+
|
|
556
|
+
`fluent_cart/zero_decimal_currencies` — Filter zero-decimal currencies list
|
|
557
|
+
|
|
558
|
+
**When it runs:** This filter is applied when retrieving currencies that do not use decimal subunits (e.g., Japanese Yen). These currencies store amounts without dividing by 100.
|
|
559
|
+
|
|
560
|
+
**Parameters:**
|
|
561
|
+
|
|
562
|
+
- `$currencies` (array): Associative array of zero-decimal currency code to localized name
|
|
563
|
+
|
|
564
|
+
```
|
|
565
|
+
$currencies = [
|
|
566
|
+
'BIF' => 'Burundian Franc',
|
|
567
|
+
'CLP' => 'Chilean Peso',
|
|
568
|
+
'DJF' => 'Djiboutian Franc',
|
|
569
|
+
'GNF' => 'Guinean Franc',
|
|
570
|
+
'JPY' => 'Japanese Yen',
|
|
571
|
+
'KMF' => 'Comorian Franc',
|
|
572
|
+
'KRW' => 'South Korean Won',
|
|
573
|
+
'MGA' => 'Malagasy Ariary',
|
|
574
|
+
'PYG' => 'Paraguayan Guaraní',
|
|
575
|
+
'RWF' => 'Rwandan Franc',
|
|
576
|
+
'VND' => 'Vietnamese Dong',
|
|
577
|
+
'VUV' => 'Vanuatu Vatu',
|
|
578
|
+
'XAF' => 'Central African Cfa Franc',
|
|
579
|
+
'XOF' => 'West African Cfa Franc',
|
|
580
|
+
'XPF' => 'Cfp Franc',
|
|
581
|
+
'UGX' => 'Ugandan Shilling',
|
|
582
|
+
];
|
|
583
|
+
```
|
|
584
|
+
|
|
585
|
+
**Returns:** `array` — The modified zero-decimal currencies array
|
|
586
|
+
|
|
587
|
+
**Source:** `app/Helpers/CurrenciesHelper.php:383`
|
|
588
|
+
|
|
589
|
+
**Usage:**
|
|
590
|
+
|
|
591
|
+
```
|
|
592
|
+
add_filter('fluent_cart/zero_decimal_currencies', function ($currencies) {
|
|
593
|
+
// Add a custom zero-decimal currency
|
|
594
|
+
$currencies['ISK'] = 'Icelandic Krona';
|
|
595
|
+
return $currencies;
|
|
596
|
+
});
|
|
597
|
+
```
|
|
598
|
+
|
|
599
|
+
### ` hide_unnecessary_decimals `
|
|
600
|
+
|
|
601
|
+
`fluent_cart/hide_unnecessary_decimals` — Filter whether to hide .00 decimals in formatted prices
|
|
602
|
+
|
|
603
|
+
**When it runs:** This filter is applied during price formatting. When true, prices like `$10.00` will display as `$10` instead.
|
|
604
|
+
|
|
605
|
+
**Parameters:**
|
|
606
|
+
|
|
607
|
+
- `$hide` (bool): Whether to hide unnecessary decimals (default: `false`)
|
|
608
|
+
- `$context` (array): The amount and decimal context
|
|
609
|
+
|
|
610
|
+
```
|
|
611
|
+
$context = [
|
|
612
|
+
'amount' => 10.00, // The amount being formatted
|
|
613
|
+
'decimal' => 2, // Number of decimal places
|
|
614
|
+
];
|
|
615
|
+
```
|
|
616
|
+
|
|
617
|
+
**Returns:** `bool` — Whether to hide unnecessary trailing zeros
|
|
618
|
+
|
|
619
|
+
**Source:** `app/Helpers/Helper.php:486`
|
|
620
|
+
|
|
621
|
+
**Usage:**
|
|
622
|
+
|
|
623
|
+
```
|
|
624
|
+
add_filter('fluent_cart/hide_unnecessary_decimals', function ($hide, $context) {
|
|
625
|
+
// Always hide .00 from displayed prices
|
|
626
|
+
return true;
|
|
627
|
+
}, 10, 2);
|
|
628
|
+
```
|
|
629
|
+
|
|
630
|
+
---
|
|
631
|
+
|
|
632
|
+
## Admin UI & Menu
|
|
633
|
+
|
|
634
|
+
### ` admin_menu_title `
|
|
635
|
+
|
|
636
|
+
`fluent_cart/admin_menu_title` — Filter admin menu title
|
|
637
|
+
|
|
638
|
+
**When it runs:** This filter is applied when registering the WordPress admin menu, allowing you to change the menu label shown in the sidebar.
|
|
639
|
+
|
|
640
|
+
**Parameters:**
|
|
641
|
+
|
|
642
|
+
- `$menuTitle` (string): The default menu title (`'FluentCart'`)
|
|
643
|
+
- `$data` (array): Additional context data (empty array)
|
|
644
|
+
|
|
645
|
+
**Returns:** `string` — The modified menu title
|
|
646
|
+
|
|
647
|
+
**Source:** `app/Hooks/Handlers/MenuHandler.php:226`
|
|
648
|
+
|
|
649
|
+
**Usage:**
|
|
650
|
+
|
|
651
|
+
```
|
|
652
|
+
add_filter('fluent_cart/admin_menu_title', function ($menuTitle, $data) {
|
|
653
|
+
return 'My Store';
|
|
654
|
+
}, 10, 2);
|
|
655
|
+
```
|
|
656
|
+
|
|
657
|
+
### ` admin_menu_position `
|
|
658
|
+
|
|
659
|
+
`fluent_cart/admin_menu_position` — Filter admin menu position
|
|
660
|
+
|
|
661
|
+
**When it runs:** This filter is applied when registering the admin menu, controlling its position in the WordPress sidebar.
|
|
662
|
+
|
|
663
|
+
**Parameters:**
|
|
664
|
+
|
|
665
|
+
- `$position` (int): The menu position (default: `3`)
|
|
666
|
+
|
|
667
|
+
**Returns:** `int` — The modified menu position
|
|
668
|
+
|
|
669
|
+
**Source:** `app/Hooks/Handlers/MenuHandler.php:235`
|
|
670
|
+
|
|
671
|
+
**Usage:**
|
|
672
|
+
|
|
673
|
+
```
|
|
674
|
+
add_filter('fluent_cart/admin_menu_position', function ($position) {
|
|
675
|
+
// Move menu lower in the sidebar
|
|
676
|
+
return 25;
|
|
677
|
+
});
|
|
678
|
+
```
|
|
679
|
+
|
|
680
|
+
### ` admin_filter_options `
|
|
681
|
+
|
|
682
|
+
`fluent_cart/admin_filter_options` — Filter admin filter options for list pages
|
|
683
|
+
|
|
684
|
+
**When it runs:** This filter is applied when loading admin filter options for orders, customers, products, licenses, and tax list pages.
|
|
685
|
+
|
|
686
|
+
**Parameters:**
|
|
687
|
+
|
|
688
|
+
- `$filterOptions` (array): Filter configurations for each list page
|
|
689
|
+
|
|
690
|
+
```
|
|
691
|
+
$filterOptions = [
|
|
692
|
+
'order_filter_options' => [...], // Order list filters
|
|
693
|
+
'customer_filter_options' => [...], // Customer list filters
|
|
694
|
+
'product_filter_options' => [...], // Product list filters
|
|
695
|
+
'license_filter_options' => [...], // License list filters
|
|
696
|
+
'tax_filter_options' => [...], // Tax list filters
|
|
697
|
+
];
|
|
698
|
+
```
|
|
699
|
+
|
|
700
|
+
- `$data` (array): Additional context data (empty array)
|
|
701
|
+
|
|
702
|
+
**Returns:** `array` — The modified filter options array
|
|
703
|
+
|
|
704
|
+
**Source:** `app/Hooks/Handlers/MenuHandler.php:476`
|
|
705
|
+
|
|
706
|
+
**Usage:**
|
|
707
|
+
|
|
708
|
+
```
|
|
709
|
+
add_filter('fluent_cart/admin_filter_options', function ($filterOptions, $data) {
|
|
710
|
+
// Add a custom filter for the orders list
|
|
711
|
+
$filterOptions['order_filter_options']['custom_status'] = [
|
|
712
|
+
'label' => 'Custom Status',
|
|
713
|
+
'type' => 'select',
|
|
714
|
+
'options' => ['pending', 'approved'],
|
|
715
|
+
];
|
|
716
|
+
return $filterOptions;
|
|
717
|
+
}, 10, 2);
|
|
718
|
+
```
|
|
719
|
+
|
|
720
|
+
### ` admin_app_data `
|
|
721
|
+
|
|
722
|
+
`fluent_cart/admin_app_data` — Filter admin Vue app localized data
|
|
723
|
+
|
|
724
|
+
**When it runs:** This filter is applied when loading the admin SPA, providing the full configuration object passed to the Vue application via `wp_localize_script`.
|
|
725
|
+
|
|
726
|
+
**Parameters:**
|
|
727
|
+
|
|
728
|
+
- `$adminLocalizeData` (array): The complete admin app data
|
|
729
|
+
|
|
730
|
+
```
|
|
731
|
+
$adminLocalizeData = [
|
|
732
|
+
'app_config' => [...], // App version, permissions, logos
|
|
733
|
+
'slug' => 'fluent-cart',
|
|
734
|
+
'admin_url' => 'https://site.com/wp-admin/admin.php?page=fluent-cart#/',
|
|
735
|
+
'frontend_url' => '...',
|
|
736
|
+
'nonce' => '...',
|
|
737
|
+
'rest' => [...], // REST API config
|
|
738
|
+
'me' => [...], // Current user info
|
|
739
|
+
'shop' => [...], // Shop configuration
|
|
740
|
+
'product_statuses' => [...],
|
|
741
|
+
'payment_routes' => [...], // Payment gateway admin routes
|
|
742
|
+
'order_statues' => [...],
|
|
743
|
+
'trans' => [...], // Translation strings
|
|
744
|
+
'filter_options' => [...],
|
|
745
|
+
'modules_settings' => [...],
|
|
746
|
+
'admin_notices' => [...],
|
|
747
|
+
// ... many more properties
|
|
748
|
+
];
|
|
749
|
+
```
|
|
750
|
+
|
|
751
|
+
**Returns:** `array` — The modified admin app data
|
|
752
|
+
|
|
753
|
+
**Source:** `app/Hooks/Handlers/MenuHandler.php:514`
|
|
754
|
+
|
|
755
|
+
**Usage:**
|
|
756
|
+
|
|
757
|
+
```
|
|
758
|
+
add_filter('fluent_cart/admin_app_data', function ($adminLocalizeData) {
|
|
759
|
+
// Add custom data accessible from the Vue admin app
|
|
760
|
+
$adminLocalizeData['custom_setting'] = 'custom_value';
|
|
761
|
+
$adminLocalizeData['my_plugin_config'] = [
|
|
762
|
+
'enabled' => true,
|
|
763
|
+
'api_url' => 'https://api.example.com',
|
|
764
|
+
];
|
|
765
|
+
return $adminLocalizeData;
|
|
766
|
+
});
|
|
767
|
+
```
|
|
768
|
+
|
|
769
|
+
### ` admin_notices `
|
|
770
|
+
|
|
771
|
+
`fluent_cart/admin_notices` — Filter admin notices
|
|
772
|
+
|
|
773
|
+
**When it runs:** This filter is applied when loading the admin interface, allowing plugins to inject notices that display in the FluentCart admin panel.
|
|
774
|
+
|
|
775
|
+
**Parameters:**
|
|
776
|
+
|
|
777
|
+
- `$notices` (array): Array of notice objects (default: `[]`)
|
|
778
|
+
|
|
779
|
+
**Returns:** `array` — The modified notices array
|
|
780
|
+
|
|
781
|
+
**Source:** `app/Hooks/Handlers/MenuHandler.php:571`
|
|
782
|
+
|
|
783
|
+
**Usage:**
|
|
784
|
+
|
|
785
|
+
```
|
|
786
|
+
add_filter('fluent_cart/admin_notices', function ($notices) {
|
|
787
|
+
$notices[] = [
|
|
788
|
+
'type' => 'warning',
|
|
789
|
+
'message' => 'Please configure your payment gateway before going live.',
|
|
790
|
+
];
|
|
791
|
+
return $notices;
|
|
792
|
+
});
|
|
793
|
+
```
|
|
794
|
+
|
|
795
|
+
### ` admin_base_url `
|
|
796
|
+
|
|
797
|
+
`fluent_cart/admin_base_url` — Filter admin base URL
|
|
798
|
+
|
|
799
|
+
**When it runs:** This filter is applied when constructing admin navigation URLs throughout the plugin, including product menus and global navigation items.
|
|
800
|
+
|
|
801
|
+
**Parameters:**
|
|
802
|
+
|
|
803
|
+
- `$baseUrl` (string): The default admin base URL (`admin_url('admin.php?page=fluent-cart#/')`)
|
|
804
|
+
- `$data` (array): Additional context data (empty array)
|
|
805
|
+
|
|
806
|
+
**Returns:** `string` — The modified base URL
|
|
807
|
+
|
|
808
|
+
**Source:** `app/Helpers/AdminHelper.php:22`
|
|
809
|
+
|
|
810
|
+
**Usage:**
|
|
811
|
+
|
|
812
|
+
```
|
|
813
|
+
add_filter('fluent_cart/admin_base_url', function ($baseUrl, $data) {
|
|
814
|
+
// Use a custom admin page
|
|
815
|
+
return admin_url('admin.php?page=my-custom-cart#/');
|
|
816
|
+
}, 10, 2);
|
|
817
|
+
```
|
|
818
|
+
|
|
819
|
+
### ` product_admin_items `
|
|
820
|
+
|
|
821
|
+
`fluent_cart/product_admin_items` — Filter admin product action menu items
|
|
822
|
+
|
|
823
|
+
**When it runs:** This filter is applied when rendering the product action menu in the admin product detail view. Use it to add custom navigation tabs to individual product pages.
|
|
824
|
+
|
|
825
|
+
**Parameters:**
|
|
826
|
+
|
|
827
|
+
- `$menuItems` (array): Array of menu item definitions
|
|
828
|
+
|
|
829
|
+
```
|
|
830
|
+
$menuItems = [
|
|
831
|
+
'product_edit' => [
|
|
832
|
+
'label' => 'Edit Product',
|
|
833
|
+
'link' => 'admin.php?page=fluent-cart#/products/123',
|
|
834
|
+
],
|
|
835
|
+
'product_upgrade_paths' => [
|
|
836
|
+
'label' => 'Upgrade Paths',
|
|
837
|
+
'link' => 'admin.php?page=fluent-cart#/products/123/upgrade-paths',
|
|
838
|
+
],
|
|
839
|
+
'product_integrations' => [
|
|
840
|
+
'label' => 'Integrations',
|
|
841
|
+
'link' => 'admin.php?page=fluent-cart#/products/123/integrations',
|
|
842
|
+
],
|
|
843
|
+
];
|
|
844
|
+
```
|
|
845
|
+
|
|
846
|
+
Each item has a `label`, a `link` and an optional `icon`. The `icon` is an inline SVG string. The tab prints it as given, before the label, at 14px. Use `fill="currentColor"` or `stroke="currentColor"` so the icon follows the tab color.
|
|
847
|
+
- `$context` (array): Context data with product info
|
|
848
|
+
|
|
849
|
+
```
|
|
850
|
+
$context = [
|
|
851
|
+
'product_id' => 123,
|
|
852
|
+
'base_url' => 'admin.php?page=fluent-cart#/',
|
|
853
|
+
];
|
|
854
|
+
```
|
|
855
|
+
|
|
856
|
+
**Returns:** `array` — The modified menu items array
|
|
857
|
+
|
|
858
|
+
**Source:** `app/Helpers/AdminHelper.php:39`
|
|
859
|
+
|
|
860
|
+
**Usage:**
|
|
861
|
+
|
|
862
|
+
```
|
|
863
|
+
add_filter('fluent_cart/product_admin_items', function ($menuItems, $context) {
|
|
864
|
+
$productId = $context['product_id'];
|
|
865
|
+
$baseUrl = $context['base_url'];
|
|
866
|
+
// Add a custom product tab
|
|
867
|
+
$menuItems['product_analytics'] = [
|
|
868
|
+
'label' => 'Analytics',
|
|
869
|
+
'link' => $baseUrl . 'products/' . $productId . '/analytics',
|
|
870
|
+
'icon' => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"><path d="M3 17h14v-2H3v2zm2-4h2V7H5v6zm4 0h2V3H9v10zm4 0h2V9h-2v4z"/></svg>',
|
|
871
|
+
];
|
|
872
|
+
return $menuItems;
|
|
873
|
+
}, 10, 2);
|
|
874
|
+
```
|
|
875
|
+
|
|
876
|
+
### ` global_admin_menu_items `
|
|
877
|
+
|
|
878
|
+
`fluent_cart/global_admin_menu_items` — Filter global admin navigation menu
|
|
879
|
+
|
|
880
|
+
**When it runs:** This filter is applied when rendering the global admin navigation bar at the top of the FluentCart admin pages. Use it to add or modify top-level navigation items.
|
|
881
|
+
|
|
882
|
+
**Parameters:**
|
|
883
|
+
|
|
884
|
+
- `$menuItems` (array): Array of navigation items
|
|
885
|
+
|
|
886
|
+
```
|
|
887
|
+
$menuItems = [
|
|
888
|
+
'dashboard' => [
|
|
889
|
+
'label' => 'Dashboard',
|
|
890
|
+
'link' => 'admin.php?page=fluent-cart#/',
|
|
891
|
+
],
|
|
892
|
+
'orders' => [
|
|
893
|
+
'label' => 'Orders',
|
|
894
|
+
'link' => 'admin.php?page=fluent-cart#/orders',
|
|
895
|
+
'permission' => ['orders/view'],
|
|
896
|
+
],
|
|
897
|
+
'customers' => [
|
|
898
|
+
'label' => 'Customers',
|
|
899
|
+
'link' => 'admin.php?page=fluent-cart#/customers',
|
|
900
|
+
'permission' => ['customers/view', 'customers/manage'],
|
|
901
|
+
],
|
|
902
|
+
'products' => [
|
|
903
|
+
'label' => 'Products',
|
|
904
|
+
'link' => 'admin.php?page=fluent-cart#/products',
|
|
905
|
+
'permission' => ['products/view'],
|
|
906
|
+
],
|
|
907
|
+
];
|
|
908
|
+
```
|
|
909
|
+
|
|
910
|
+
**Returns:** `array` — The modified menu items array
|
|
911
|
+
|
|
912
|
+
**Source:** `app/Helpers/AdminHelper.php:127`
|
|
913
|
+
|
|
914
|
+
**Usage:**
|
|
915
|
+
|
|
916
|
+
```
|
|
917
|
+
add_filter('fluent_cart/global_admin_menu_items', function ($menuItems) {
|
|
918
|
+
// Add a custom top-level navigation item
|
|
919
|
+
$menuItems['custom_reports'] = [
|
|
920
|
+
'label' => 'Custom Reports',
|
|
921
|
+
'link' => admin_url('admin.php?page=fluent-cart#/custom-reports'),
|
|
922
|
+
'permission' => ['reports/view'],
|
|
923
|
+
];
|
|
924
|
+
return $menuItems;
|
|
925
|
+
});
|
|
926
|
+
```
|
|
927
|
+
|
|
928
|
+
### ` global_admin_menu_more_items `
|
|
929
|
+
|
|
930
|
+
`fluent_cart/global_admin_menu_more_items` — Filter the "More" overflow items in the global admin navigation
|
|
931
|
+
|
|
932
|
+
**When it runs:** This filter is applied alongside [`global_admin_menu_items`](#global-admin-menu-items) when building the top admin navigation bar, but for the secondary "More" dropdown rather than the primary nav row. Free ships an `integrations` entry here; Pro conditionally adds entries like `order_bump` when their module is active.
|
|
933
|
+
|
|
934
|
+
**Parameters:**
|
|
935
|
+
|
|
936
|
+
- `$moreItems` (array): Array of overflow navigation items, each with `label`, `link`, and `permission`
|
|
937
|
+
|
|
938
|
+
```
|
|
939
|
+
$moreItems = [
|
|
940
|
+
'integrations' => [
|
|
941
|
+
'label' => 'Integrations',
|
|
942
|
+
'link' => $baseUrl . 'integrations',
|
|
943
|
+
'permission' => ['is_super_admin'],
|
|
944
|
+
],
|
|
945
|
+
// Pro may add 'order_bump' and other module-gated entries here
|
|
946
|
+
];
|
|
947
|
+
```
|
|
948
|
+
|
|
949
|
+
- `$data` (array): Context data
|
|
950
|
+
|
|
951
|
+
```
|
|
952
|
+
$data = [
|
|
953
|
+
'base_url' => 'admin.php?page=fluent-cart#/',
|
|
954
|
+
];
|
|
955
|
+
```
|
|
956
|
+
|
|
957
|
+
**Returns:** `array` — The modified overflow items array
|
|
958
|
+
|
|
959
|
+
**Source:** `app/Helpers/AdminHelper.php:155`
|
|
960
|
+
|
|
961
|
+
**Usage:**
|
|
962
|
+
|
|
963
|
+
```
|
|
964
|
+
add_filter('fluent_cart/global_admin_menu_more_items', function ($moreItems, $data) {
|
|
965
|
+
$moreItems['custom_tool'] = [
|
|
966
|
+
'label' => 'Custom Tool',
|
|
967
|
+
'link' => $data['base_url'] . 'custom-tool',
|
|
968
|
+
'permission' => ['is_super_admin'],
|
|
969
|
+
];
|
|
970
|
+
return $moreItems;
|
|
971
|
+
}, 10, 2);
|
|
972
|
+
```
|
|
973
|
+
|
|
974
|
+
### ` dummy_product_info `
|
|
975
|
+
|
|
976
|
+
`fluent_cart/dummy_product_info` — Filter dummy product for onboarding
|
|
977
|
+
|
|
978
|
+
**When it runs:** This filter is applied when loading the admin app data. It provides dummy product information used during the onboarding flow when the store has no products yet.
|
|
979
|
+
|
|
980
|
+
**Parameters:**
|
|
981
|
+
|
|
982
|
+
- `$dummyProduct` (array): Dummy product info (default: `[]`)
|
|
983
|
+
|
|
984
|
+
**Returns:** `array` — The modified dummy product info
|
|
985
|
+
|
|
986
|
+
**Source:** `app/Hooks/Handlers/MenuHandler.php:556`
|
|
987
|
+
|
|
988
|
+
**Usage:**
|
|
989
|
+
|
|
990
|
+
```
|
|
991
|
+
add_filter('fluent_cart/dummy_product_info', function ($dummyProduct) {
|
|
992
|
+
return [
|
|
993
|
+
'title' => 'Sample Digital Product',
|
|
994
|
+
'price' => 2999, // in cents
|
|
995
|
+
'type' => 'digital',
|
|
996
|
+
];
|
|
997
|
+
});
|
|
998
|
+
```
|
|
999
|
+
|
|
1000
|
+
### ` generatable_pages `
|
|
1001
|
+
|
|
1002
|
+
`fluent_cart/generatable_pages` — Filter the pages FluentCart can auto-generate
|
|
1003
|
+
|
|
1004
|
+
**When it runs:** This filter is applied when building the list of `key => [title, content]` pages (Shop, Checkout, Customer Profile, etc.) that the Pages Setup screen's "+" create button and the onboarding wizard can create for the store. Add-ons that need their own dedicated page (e.g. a custom portal page) register it here.
|
|
1005
|
+
|
|
1006
|
+
**Parameters:**
|
|
1007
|
+
|
|
1008
|
+
- `$pages` (array): Array of generatable pages keyed by page slug, each with a title and default content
|
|
1009
|
+
|
|
1010
|
+
**Returns:** `array` — The modified generatable pages array
|
|
1011
|
+
|
|
1012
|
+
**Source:** `app/CPT/Pages.php:42`
|
|
1013
|
+
|
|
1014
|
+
**Usage:**
|
|
1015
|
+
|
|
1016
|
+
```
|
|
1017
|
+
add_filter('fluent_cart/generatable_pages', function ($pages) {
|
|
1018
|
+
$pages['loyalty_dashboard'] = [
|
|
1019
|
+
'title' => 'Loyalty Dashboard',
|
|
1020
|
+
'content' => '[fluent_cart_loyalty_dashboard]',
|
|
1021
|
+
];
|
|
1022
|
+
return $pages;
|
|
1023
|
+
});
|
|
1024
|
+
```
|
|
1025
|
+
|
|
1026
|
+
### ` pro_upgrade_base_url `
|
|
1027
|
+
|
|
1028
|
+
`fluent_cart/pro_upgrade_base_url` — Filter the base URL used for "Upgrade to Pro" links
|
|
1029
|
+
|
|
1030
|
+
**When it runs:** This filter is applied inside `Helper::getUpgradeUrl()`, which builds every "Upgrade to Pro" link shown across the Free plugin's admin (upsell banners, locked settings, feature gates). It runs before UTM query args are appended.
|
|
1031
|
+
|
|
1032
|
+
**Parameters:**
|
|
1033
|
+
|
|
1034
|
+
- `$baseUrl` (string): The default upgrade URL (`'https://fluentcart.com/discount-deal/'`)
|
|
1035
|
+
|
|
1036
|
+
**Returns:** `string` — The modified base URL
|
|
1037
|
+
|
|
1038
|
+
**Source:** `app/Helpers/Helper.php:89`
|
|
1039
|
+
|
|
1040
|
+
**Usage:**
|
|
1041
|
+
|
|
1042
|
+
```
|
|
1043
|
+
add_filter('fluent_cart/pro_upgrade_base_url', function ($baseUrl) {
|
|
1044
|
+
// Route upgrade links through an affiliate link instead
|
|
1045
|
+
return 'https://fluentcart.com/discount-deal/?ref=my-agency';
|
|
1046
|
+
});
|
|
1047
|
+
```
|
|
1048
|
+
|
|
1049
|
+
### ` show_admin_top_bar `
|
|
1050
|
+
|
|
1051
|
+
`fluent_cart/show_admin_top_bar` — Filter whether the FluentCart admin top bar is rendered
|
|
1052
|
+
|
|
1053
|
+
**When it runs:** This filter gates rendering of the FluentCart admin top bar in two places that must agree: the menu handler that decides whether to call `AdminHelper::getAdminMenu()` at all, and the `admin_app.php` view template that adds a `fct-no-top-bar` class to the app wrapper when the bar is hidden. Both call sites pass the same default (`true`), so a single listener should return the same value for both.
|
|
1054
|
+
|
|
1055
|
+
**Parameters:**
|
|
1056
|
+
|
|
1057
|
+
- `$show` (bool): Whether to show the top bar (default: `true`)
|
|
1058
|
+
|
|
1059
|
+
**Returns:** `bool` — Whether the admin top bar should render
|
|
1060
|
+
|
|
1061
|
+
**Source:**
|
|
1062
|
+
|
|
1063
|
+
- `app/Hooks/Handlers/MenuHandler.php:418`
|
|
1064
|
+
- `app/Views/admin/admin_app.php:2`
|
|
1065
|
+
|
|
1066
|
+
**Usage:**
|
|
1067
|
+
|
|
1068
|
+
```
|
|
1069
|
+
add_filter('fluent_cart/show_admin_top_bar', function ($show) {
|
|
1070
|
+
// Hide FluentCart's top bar when embedding the admin app in a custom shell
|
|
1071
|
+
return !defined('MY_CUSTOM_ADMIN_SHELL');
|
|
1072
|
+
});
|
|
1073
|
+
```
|
|
1074
|
+
|
|
1075
|
+
### ` storage_driver_settings_routes `
|
|
1076
|
+
|
|
1077
|
+
`fluent_cart/storage/storage_driver_settings_routes` — Filter storage driver admin routes
|
|
1078
|
+
|
|
1079
|
+
**When it runs:** This filter is applied when loading the admin app, allowing storage driver plugins to register their settings routes in the admin SPA navigation.
|
|
1080
|
+
|
|
1081
|
+
**Parameters:**
|
|
1082
|
+
|
|
1083
|
+
- `$routes` (array): Array of storage driver route definitions (default: `[]`)
|
|
1084
|
+
- `$data` (array): Additional context data (empty array)
|
|
1085
|
+
|
|
1086
|
+
**Returns:** `array` — The modified routes array
|
|
1087
|
+
|
|
1088
|
+
**Source:** `app/Hooks/Handlers/MenuHandler.php:461`
|
|
1089
|
+
|
|
1090
|
+
**Usage:**
|
|
1091
|
+
|
|
1092
|
+
```
|
|
1093
|
+
add_filter('fluent_cart/storage/storage_driver_settings_routes', function ($routes, $data) {
|
|
1094
|
+
$routes[] = [
|
|
1095
|
+
'key' => 's3_storage',
|
|
1096
|
+
'title' => 'S3 Storage',
|
|
1097
|
+
'route' => 'settings/storage/s3',
|
|
1098
|
+
];
|
|
1099
|
+
return $routes;
|
|
1100
|
+
}, 10, 2);
|
|
1101
|
+
```
|
|
1102
|
+
|
|
1103
|
+
### ` admin_table_saved_views `
|
|
1104
|
+
|
|
1105
|
+
`fluent_cart/admin_table_saved_views` — Filter the saved-views config injected into admin list tables
|
|
1106
|
+
|
|
1107
|
+
**When it runs:** This filter is applied when building the admin app's localized config, letting Pro (or any add-on) attach a per-table "saved views" definition — e.g. `source_report` gets its `filters` seeded from `order_filter_options`. A second call site in `BaseFilter.php` exists purely for backward compatibility with older Pro releases that only injected the config blob this way; new code should rely on the primary call.
|
|
1108
|
+
|
|
1109
|
+
**Parameters:**
|
|
1110
|
+
|
|
1111
|
+
- `$tableConfig` (array): Saved-view configuration keyed by table name
|
|
1112
|
+
|
|
1113
|
+
```
|
|
1114
|
+
$tableConfig = [
|
|
1115
|
+
'source_report' => ['filters' => $orderFilterOptions],
|
|
1116
|
+
];
|
|
1117
|
+
```
|
|
1118
|
+
|
|
1119
|
+
- `$data` (array): Context data
|
|
1120
|
+
|
|
1121
|
+
```
|
|
1122
|
+
$data = [
|
|
1123
|
+
'filterOptions' => $filterOptions,
|
|
1124
|
+
];
|
|
1125
|
+
```
|
|
1126
|
+
|
|
1127
|
+
**Returns:** `array` — The modified table config array
|
|
1128
|
+
|
|
1129
|
+
**Source:** `app/Hooks/Handlers/MenuHandler.php:493`
|
|
1130
|
+
|
|
1131
|
+
**Usage:**
|
|
1132
|
+
|
|
1133
|
+
```
|
|
1134
|
+
add_filter('fluent_cart/admin_table_saved_views', function ($tableConfig, $data) {
|
|
1135
|
+
$tableConfig['orders'] = [
|
|
1136
|
+
'saved_views' => [
|
|
1137
|
+
['slug' => 'high_value', 'label' => 'High Value Orders'],
|
|
1138
|
+
],
|
|
1139
|
+
];
|
|
1140
|
+
return $tableConfig;
|
|
1141
|
+
}, 10, 2);
|
|
1142
|
+
```
|
|
1143
|
+
|
|
1144
|
+
### ` filter/supported_operators `
|
|
1145
|
+
|
|
1146
|
+
`fluent_cart/filter/supported_operators` — Filter the comparison operators an admin-table filter supports
|
|
1147
|
+
|
|
1148
|
+
**When it runs:** This filter is applied inside `BaseFilter::getSupportedOperators()`, the shared class every admin list-table filter (orders, customers, products, etc.) extends. A listener must declare `add_filter(..., 10, 2)` to receive the `filter_name` context, since the same hook name fires for every filter class.
|
|
1149
|
+
|
|
1150
|
+
**Parameters:**
|
|
1151
|
+
|
|
1152
|
+
- `$operators` (array): The supported operator definitions
|
|
1153
|
+
- `$context` (array): Context data
|
|
1154
|
+
|
|
1155
|
+
```
|
|
1156
|
+
$context = [
|
|
1157
|
+
'filter_name' => 'order_filter', // static::getFilterName() of the calling filter class
|
|
1158
|
+
];
|
|
1159
|
+
```
|
|
1160
|
+
|
|
1161
|
+
**Returns:** `array` — The modified operators array
|
|
1162
|
+
|
|
1163
|
+
**Source:** `app/Services/Filter/BaseFilter.php:1134`
|
|
1164
|
+
|
|
1165
|
+
**Usage:**
|
|
1166
|
+
|
|
1167
|
+
```
|
|
1168
|
+
add_filter('fluent_cart/filter/supported_operators', function ($operators, $context) {
|
|
1169
|
+
if ($context['filter_name'] === 'order_filter') {
|
|
1170
|
+
$operators['between'] = 'Between';
|
|
1171
|
+
}
|
|
1172
|
+
return $operators;
|
|
1173
|
+
}, 10, 2);
|
|
1174
|
+
```
|
|
1175
|
+
|
|
1176
|
+
### ` filter_resolve_saved_view `
|
|
1177
|
+
|
|
1178
|
+
`fluent_cart/filter_resolve_saved_view` — Filter used to resolve a saved-view slug for an admin-table filter
|
|
1179
|
+
|
|
1180
|
+
**When it runs:** This filter is applied when an admin list-table filter is loaded with an active saved-view slug. Free has no saved-views storage of its own, so this is effectively a request to Pro (or any add-on) to resolve the slug into a view definition; if the returned value is an array or object it becomes the active saved view.
|
|
1181
|
+
|
|
1182
|
+
**Parameters:**
|
|
1183
|
+
|
|
1184
|
+
- `$resolvedView` (null): The resolved view (`null` by default — nothing resolves it in Free)
|
|
1185
|
+
- `$context` (array): Context data
|
|
1186
|
+
|
|
1187
|
+
```
|
|
1188
|
+
$context = [
|
|
1189
|
+
'slug' => 'high_value', // The requested saved-view slug
|
|
1190
|
+
'filter_name' => 'order_filter', // static::getFilterName() of the calling filter class
|
|
1191
|
+
'user_id' => 42, // Current WP user ID
|
|
1192
|
+
];
|
|
1193
|
+
```
|
|
1194
|
+
|
|
1195
|
+
**Returns:** `array|object|null` — The resolved saved-view definition, or `null` if none matched
|
|
1196
|
+
|
|
1197
|
+
**Source:** `app/Services/Filter/BaseFilter.php:348`
|
|
1198
|
+
|
|
1199
|
+
**Usage:**
|
|
1200
|
+
|
|
1201
|
+
```
|
|
1202
|
+
add_filter('fluent_cart/filter_resolve_saved_view', function ($resolvedView, $context) {
|
|
1203
|
+
if ($context['slug'] === 'high_value' && $context['filter_name'] === 'order_filter') {
|
|
1204
|
+
return ['slug' => 'high_value', 'operator' => '>=', 'value' => 50000];
|
|
1205
|
+
}
|
|
1206
|
+
return $resolvedView;
|
|
1207
|
+
}, 10, 2);
|
|
1208
|
+
```
|
|
1209
|
+
|
|
1210
|
+
### ` generatable_pages `
|
|
1211
|
+
|
|
1212
|
+
`fluent_cart/generatable_pages` — Filter the list of pages the Pages Setup screen can generate
|
|
1213
|
+
|
|
1214
|
+
**When it runs:** This filter is applied when building the list of pages FluentCart can auto-generate (Checkout, Cart, Receipt, Shop, Account, and any add-on pages). It backs the Pages Setup screen's "+" create button, the dashboard onboarding "Page Setup" step, and the page-creation flow. Add-ons use it to register their own generatable pages alongside the core set.
|
|
1215
|
+
|
|
1216
|
+
**Parameters:**
|
|
1217
|
+
|
|
1218
|
+
- `$pages` (array): Core generatable pages, keyed by page key (default: the 5 core pages — `checkout`, `cart`, `receipt`, `shop`, `customer_profile`)
|
|
1219
|
+
|
|
1220
|
+
```
|
|
1221
|
+
$pages = [
|
|
1222
|
+
'checkout' => [
|
|
1223
|
+
'title' => 'Checkout',
|
|
1224
|
+
'content' => '[fluent_cart_checkout]',
|
|
1225
|
+
],
|
|
1226
|
+
// ...
|
|
1227
|
+
];
|
|
1228
|
+
```
|
|
1229
|
+
|
|
1230
|
+
**Returns:** `array` — The modified pages array. Each entry needs a `title` and a `content` (the block/shortcode content FluentCart uses when it creates the WP page).
|
|
1231
|
+
|
|
1232
|
+
**Source:** `app/CPT/Pages.php:19`
|
|
1233
|
+
|
|
1234
|
+
**Usage:**
|
|
1235
|
+
|
|
1236
|
+
```
|
|
1237
|
+
add_filter('fluent_cart/generatable_pages', function ($pages) {
|
|
1238
|
+
$pages['withdrawal_rights'] = [
|
|
1239
|
+
'title' => 'Right of Withdrawal',
|
|
1240
|
+
'content' => '<!-- wp:my-addon/withdrawal-notice /-->',
|
|
1241
|
+
];
|
|
1242
|
+
return $pages;
|
|
1243
|
+
});
|
|
1244
|
+
```
|
|
1245
|
+
|
|
1246
|
+
Core page keys are always checked before filtered/add-on keys when FluentCart determines which page is missing, regardless of the order this filter leaves the array in. See `fluent_cart/dashboard/page_setup_redirect_url` below.
|
|
1247
|
+
|
|
1248
|
+
### ` dashboard/page_setup_redirect_url `
|
|
1249
|
+
|
|
1250
|
+
`fluent_cart/dashboard/page_setup_redirect_url` — Filter the dashboard link for an incomplete page setup step
|
|
1251
|
+
|
|
1252
|
+
**When it runs:** This filter is applied when the admin Dashboard onboarding checklist finds a missing generatable page (see `fluent_cart/generatable_pages` above). By default the "Page Setup" step links to the core Pages Setup screen, which doesn't distinguish which page is actually missing. Whichever plugin registered the missing page can hook this filter to redirect the warning straight to that page's own settings screen instead. Core stays agnostic of third-party settings screens — it only fires the filter with context about the missing page.
|
|
1253
|
+
|
|
1254
|
+
**Parameters:**
|
|
1255
|
+
|
|
1256
|
+
- `$url` (string): The default redirect URL (core Pages Setup screen, e.g. `.../settings/store-settings/pages_setup`)
|
|
1257
|
+
- `$context` (array): Context about the missing page
|
|
1258
|
+
|
|
1259
|
+
```
|
|
1260
|
+
$context = [
|
|
1261
|
+
'missing_page' => [
|
|
1262
|
+
'title' => 'Right of Withdrawal',
|
|
1263
|
+
'content' => '<!-- wp:my-addon/withdrawal-notice /-->',
|
|
1264
|
+
'key' => 'withdrawal_rights', // the page key from fluent_cart/generatable_pages
|
|
1265
|
+
'setting_key' => 'withdrawal_rights_page_id', // the settings key storing the page ID
|
|
1266
|
+
],
|
|
1267
|
+
'base_url' => 'https://example.com/wp-admin/admin.php?page=fluent-cart#/',
|
|
1268
|
+
];
|
|
1269
|
+
```
|
|
1270
|
+
|
|
1271
|
+
**Returns:** `string` — The URL the dashboard's "Page Setup" onboarding warning should link to.
|
|
1272
|
+
|
|
1273
|
+
**Source:** `app/Http/Controllers/DashboardController.php:77`
|
|
1274
|
+
|
|
1275
|
+
**Usage:**
|
|
1276
|
+
|
|
1277
|
+
```
|
|
1278
|
+
add_filter('fluent_cart/dashboard/page_setup_redirect_url', function ($url, $context) {
|
|
1279
|
+
$missingKey = $context['missing_page']['key'] ?? null;
|
|
1280
|
+
if ($missingKey === 'withdrawal_rights') {
|
|
1281
|
+
return admin_url('admin.php?page=fluent-cart#/settings/my-addon');
|
|
1282
|
+
}
|
|
1283
|
+
return $url;
|
|
1284
|
+
}, 10, 2);
|
|
1285
|
+
```
|
|
1286
|
+
|
|
1287
|
+
---
|
|
1288
|
+
|
|
1289
|
+
## Admin Tables
|
|
1290
|
+
|
|
1291
|
+
### ` {$filterName}_table_sorts `
|
|
1292
|
+
|
|
1293
|
+
`fluent_cart/{$filterName}_table_sorts` — Filter the sort options for a list page's table (DYNAMIC)
|
|
1294
|
+
|
|
1295
|
+
**When it runs:** This dynamic filter is applied when a filter class builds the sort options for its admin table (part of `getTableFilterOptions()`, alongside its `advance`/`guide`/`columns` counterparts). It is also the allow-list `parseSortBy()` validates an incoming `sort_by` request value against — a key that isn't in this map falls back to the filter's default sort instead of reaching `ORDER BY`.
|
|
1296
|
+
|
|
1297
|
+
Each entry maps a sort key to a `label` and a `column`. `column` is either the literal DB column to `ORDER BY`, or a callable `($query, $direction)` that applies its own ordering — the seam for sorting by something that isn't a plain column (an aggregate, a joined relation). Only the `label` is sent to the admin UI; the column/callable stays server side.
|
|
1298
|
+
|
|
1299
|
+
**Parameters:**
|
|
1300
|
+
|
|
1301
|
+
- `$sortColumns` (array): The filter class's declared sort options (default: whatever that filter's `sortableColumns()` override returns, `[]` if not overridden)
|
|
1302
|
+
|
|
1303
|
+
```
|
|
1304
|
+
$sortColumns = [
|
|
1305
|
+
'id' => ['label' => 'Order ID', 'column' => 'id'],
|
|
1306
|
+
'total_amount' => ['label' => 'Total', 'column' => 'total_amount'],
|
|
1307
|
+
];
|
|
1308
|
+
```
|
|
1309
|
+
|
|
1310
|
+
**Returns:** `array` — The modified sort options map.
|
|
1311
|
+
|
|
1312
|
+
**Source:** `app/Services/Filter/BaseFilter.php:1523`
|
|
1313
|
+
|
|
1314
|
+
**`{$filterName}` values:** `orders`, `customers`, `products`, `coupons`, `logs`, `attr_groups`, `attr_terms`, `taxes`, `licenses`, `license_sites`, `order_bump`, `shipping_zones`, `shipping_classes`, `subscriptions`.
|
|
1315
|
+
|
|
1316
|
+
**Usage:**
|
|
1317
|
+
|
|
1318
|
+
```
|
|
1319
|
+
add_filter('fluent_cart/orders_table_sorts', function ($sortColumns) {
|
|
1320
|
+
// Sort by a joined/aggregated value that isn't a plain column
|
|
1321
|
+
$sortColumns['best_seller'] = [
|
|
1322
|
+
'label' => 'Best Selling',
|
|
1323
|
+
'column' => function ($query, $direction) {
|
|
1324
|
+
return $query->orderBy('total_paid', $direction);
|
|
1325
|
+
},
|
|
1326
|
+
];
|
|
1327
|
+
return $sortColumns;
|
|
1328
|
+
});
|
|
1329
|
+
```
|
|
1330
|
+
|
|
1331
|
+
---
|
|
1332
|
+
|
|
1333
|
+
## Permissions & Auth
|
|
1334
|
+
|
|
1335
|
+
### ` permission/all_roles `
|
|
1336
|
+
|
|
1337
|
+
`fluent_cart/permission/all_roles` — Filter permission roles
|
|
1338
|
+
|
|
1339
|
+
**When it runs:** This filter is applied when retrieving all available permission roles. FluentCart ships with four roles (super_admin, manager, worker, accountant), each with predefined permission sets.
|
|
1340
|
+
|
|
1341
|
+
**Parameters:**
|
|
1342
|
+
|
|
1343
|
+
- `$allRoles` (array): Array of role definitions
|
|
1344
|
+
|
|
1345
|
+
```
|
|
1346
|
+
$allRoles = [
|
|
1347
|
+
'super_admin' => [
|
|
1348
|
+
'title' => 'Super Admin',
|
|
1349
|
+
'descriptions' => 'All permissions...',
|
|
1350
|
+
'permissions' => ['*'],
|
|
1351
|
+
],
|
|
1352
|
+
'manager' => [
|
|
1353
|
+
'title' => 'Manager',
|
|
1354
|
+
'descriptions' => 'Everything except settings...',
|
|
1355
|
+
'permissions' => [
|
|
1356
|
+
'orders/view', 'orders/manage', 'orders/manage_statuses',
|
|
1357
|
+
'orders/export', 'orders/delete', 'products/view',
|
|
1358
|
+
'products/manage', 'products/delete', 'customers/view',
|
|
1359
|
+
'customers/manage', 'subscriptions/view',
|
|
1360
|
+
'subscriptions/manage', 'licenses/view', 'licenses/manage',
|
|
1361
|
+
'coupons/view', 'coupons/manage', 'coupons/delete',
|
|
1362
|
+
'reports/view', 'reports/export', 'integrations/view',
|
|
1363
|
+
'integrations/manage', 'integrations/delete',
|
|
1364
|
+
],
|
|
1365
|
+
],
|
|
1366
|
+
'worker' => [
|
|
1367
|
+
'title' => 'Worker',
|
|
1368
|
+
'descriptions' => 'View access for products, customers...',
|
|
1369
|
+
'permissions' => [
|
|
1370
|
+
'products/view', 'customers/view', 'orders/view',
|
|
1371
|
+
'orders/manage_statuses', 'subscriptions/view',
|
|
1372
|
+
'licenses/view', 'coupons/view', 'coupons/manage',
|
|
1373
|
+
'integrations/view',
|
|
1374
|
+
],
|
|
1375
|
+
],
|
|
1376
|
+
'accountant' => [
|
|
1377
|
+
'title' => 'Accountant',
|
|
1378
|
+
'descriptions' => 'View access for products, customers, orders...',
|
|
1379
|
+
'permissions' => [
|
|
1380
|
+
'orders/view', 'orders/export', 'reports/view',
|
|
1381
|
+
'reports/export', 'products/view', 'customers/view',
|
|
1382
|
+
'subscriptions/view', 'licenses/view', 'coupons/view',
|
|
1383
|
+
'integrations/view',
|
|
1384
|
+
],
|
|
1385
|
+
],
|
|
1386
|
+
];
|
|
1387
|
+
```
|
|
1388
|
+
|
|
1389
|
+
- `$data` (array): Additional context data (empty array)
|
|
1390
|
+
|
|
1391
|
+
**Returns:** `array` — The modified roles array
|
|
1392
|
+
|
|
1393
|
+
**Source:** `app/Services/Permission/PermissionManager.php:98`
|
|
1394
|
+
|
|
1395
|
+
**Usage:**
|
|
1396
|
+
|
|
1397
|
+
```
|
|
1398
|
+
add_filter('fluent_cart/permission/all_roles', function ($allRoles, $data) {
|
|
1399
|
+
// Add a custom role
|
|
1400
|
+
$allRoles['support_agent'] = [
|
|
1401
|
+
'title' => 'Support Agent',
|
|
1402
|
+
'descriptions' => 'View orders and customers, manage order statuses',
|
|
1403
|
+
'permissions' => [
|
|
1404
|
+
'orders/view',
|
|
1405
|
+
'orders/manage_statuses',
|
|
1406
|
+
'customers/view',
|
|
1407
|
+
],
|
|
1408
|
+
];
|
|
1409
|
+
return $allRoles;
|
|
1410
|
+
}, 10, 2);
|
|
1411
|
+
```
|
|
1412
|
+
|
|
1413
|
+
### ` advanced_filter_options_permission_{data_key} `
|
|
1414
|
+
|
|
1415
|
+
`fluent_cart/advanced_filter_options_permission_{$dataKey}` — Filter whether the current user can access a specific advanced-filter option
|
|
1416
|
+
|
|
1417
|
+
**When it runs:** This filter is applied by the advanced filter options endpoint after its own permission check, once per requested `$dataKey` (e.g. a column or field slug being resolved for the admin table filter UI). The `{$dataKey}` portion of the hook name is replaced with the actual key being checked, so you can gate individual filter options per key.
|
|
1418
|
+
|
|
1419
|
+
**Parameters:**
|
|
1420
|
+
|
|
1421
|
+
- `$hasPermission` (bool): Whether the current user already has permission, per the built-in check
|
|
1422
|
+
- `$dataKey` (string): The filter option's data key (matches the dynamic hook suffix)
|
|
1423
|
+
|
|
1424
|
+
**Returns:** `bool` — Whether the current user may access this filter option
|
|
1425
|
+
|
|
1426
|
+
**Source:** `app/Http/Controllers/AdvanceFilter/AdvanceFilterController.php:116`
|
|
1427
|
+
|
|
1428
|
+
**Usage:**
|
|
1429
|
+
|
|
1430
|
+
```
|
|
1431
|
+
add_filter('fluent_cart/advanced_filter_options_permission_customer_ltv', function ($hasPermission, $dataKey) {
|
|
1432
|
+
// Restrict the "customer_ltv" filter option to super admins only
|
|
1433
|
+
return current_user_can('manage_options');
|
|
1434
|
+
}, 10, 2);
|
|
1435
|
+
```
|
|
1436
|
+
|
|
1437
|
+
---
|
|
1438
|
+
|
|
1439
|
+
## Translations
|
|
1440
|
+
|
|
1441
|
+
### ` admin_translations `
|
|
1442
|
+
|
|
1443
|
+
`fluent_cart/admin_translations` — Filter admin panel translations
|
|
1444
|
+
|
|
1445
|
+
**When it runs:** This filter is applied when loading translation strings for the admin Vue SPA. The translations are passed to the frontend as a localized JavaScript object.
|
|
1446
|
+
|
|
1447
|
+
**Parameters:**
|
|
1448
|
+
|
|
1449
|
+
- `$translations` (array): Key-value pairs of translation strings loaded from `admin-translation.php`
|
|
1450
|
+
- `$data` (array): Additional context data (empty array)
|
|
1451
|
+
|
|
1452
|
+
**Returns:** `array` — The modified translations array
|
|
1453
|
+
|
|
1454
|
+
**Source:** `app/Services/Translations/TransStrings.php:9`
|
|
1455
|
+
|
|
1456
|
+
**Usage:**
|
|
1457
|
+
|
|
1458
|
+
```
|
|
1459
|
+
add_filter('fluent_cart/admin_translations', function ($translations, $data) {
|
|
1460
|
+
// Override or add admin translations
|
|
1461
|
+
$translations['custom_label'] = __('My Custom Label', 'my-plugin');
|
|
1462
|
+
return $translations;
|
|
1463
|
+
}, 10, 2);
|
|
1464
|
+
```
|
|
1465
|
+
|
|
1466
|
+
### ` blocks_translations `
|
|
1467
|
+
|
|
1468
|
+
`fluent_cart/blocks_translations` — Filter block editor translations
|
|
1469
|
+
|
|
1470
|
+
**When it runs:** This filter is applied when loading translation strings for the FluentCart block editor interface.
|
|
1471
|
+
|
|
1472
|
+
**Parameters:**
|
|
1473
|
+
|
|
1474
|
+
- `$translations` (array): Key-value pairs of translation strings loaded from `block-editor-translation.php`
|
|
1475
|
+
- `$data` (array): Additional context data (empty array)
|
|
1476
|
+
|
|
1477
|
+
**Returns:** `array` — The modified translations array
|
|
1478
|
+
|
|
1479
|
+
**Source:** `app/Services/Translations/TransStrings.php:15`
|
|
1480
|
+
|
|
1481
|
+
**Usage:**
|
|
1482
|
+
|
|
1483
|
+
```
|
|
1484
|
+
add_filter('fluent_cart/blocks_translations', function ($translations, $data) {
|
|
1485
|
+
// Override block editor translations
|
|
1486
|
+
$translations['Save'] = __('Save Changes', 'my-plugin');
|
|
1487
|
+
return $translations;
|
|
1488
|
+
}, 10, 2);
|
|
1489
|
+
```
|
|
1490
|
+
|
|
1491
|
+
### ` customer_profile_translations `
|
|
1492
|
+
|
|
1493
|
+
`fluent_cart/customer_profile_translations` — Filter customer profile translations
|
|
1494
|
+
|
|
1495
|
+
**When it runs:** This filter is applied when loading translation strings for the customer profile (My Account) frontend page.
|
|
1496
|
+
|
|
1497
|
+
**Parameters:**
|
|
1498
|
+
|
|
1499
|
+
- `$translations` (array): Key-value pairs of translation strings loaded from `customer-profile-translation.php`
|
|
1500
|
+
- `$data` (array): Additional context data (empty array)
|
|
1501
|
+
|
|
1502
|
+
**Returns:** `array` — The modified translations array
|
|
1503
|
+
|
|
1504
|
+
**Source:** `app/Services/Translations/TransStrings.php:87`
|
|
1505
|
+
|
|
1506
|
+
**Usage:**
|
|
1507
|
+
|
|
1508
|
+
```
|
|
1509
|
+
add_filter('fluent_cart/customer_profile_translations', function ($translations, $data) {
|
|
1510
|
+
// Customize customer-facing labels
|
|
1511
|
+
$translations['My Orders'] = __('Purchase History', 'my-plugin');
|
|
1512
|
+
return $translations;
|
|
1513
|
+
}, 10, 2);
|
|
1514
|
+
```
|
|
1515
|
+
|
|
1516
|
+
### ` checkout_translations `
|
|
1517
|
+
|
|
1518
|
+
`fluent_cart/checkout_translations` — Filter checkout page translations
|
|
1519
|
+
|
|
1520
|
+
**When it runs:** This filter is applied when loading translation strings for the checkout page frontend.
|
|
1521
|
+
|
|
1522
|
+
**Parameters:**
|
|
1523
|
+
|
|
1524
|
+
- `$translations` (array): Key-value pairs of translation strings loaded from `checkout-translation.php`
|
|
1525
|
+
- `$data` (array): Additional context data (empty array)
|
|
1526
|
+
|
|
1527
|
+
**Returns:** `array` — The modified translations array
|
|
1528
|
+
|
|
1529
|
+
**Source:** `app/Services/Translations/TransStrings.php:105`
|
|
1530
|
+
|
|
1531
|
+
**Usage:**
|
|
1532
|
+
|
|
1533
|
+
```
|
|
1534
|
+
add_filter('fluent_cart/checkout_translations', function ($translations, $data) {
|
|
1535
|
+
// Customize checkout button text
|
|
1536
|
+
$translations['Place Order'] = __('Complete Purchase', 'my-plugin');
|
|
1537
|
+
return $translations;
|
|
1538
|
+
}, 10, 2);
|
|
1539
|
+
```
|
|
1540
|
+
|
|
1541
|
+
### ` payments_translations `
|
|
1542
|
+
|
|
1543
|
+
`fluent_cart/payments_translations` — Filter payment translations
|
|
1544
|
+
|
|
1545
|
+
**When it runs:** This filter is applied when loading translation strings for payment-related UI elements on the frontend.
|
|
1546
|
+
|
|
1547
|
+
**Parameters:**
|
|
1548
|
+
|
|
1549
|
+
- `$translations` (array): Key-value pairs of translation strings loaded from `payments-translation.php`
|
|
1550
|
+
- `$data` (array): Additional context data (empty array)
|
|
1551
|
+
|
|
1552
|
+
**Returns:** `array` — The modified translations array
|
|
1553
|
+
|
|
1554
|
+
**Source:** `app/Services/Translations/TransStrings.php:111`
|
|
1555
|
+
|
|
1556
|
+
**Usage:**
|
|
1557
|
+
|
|
1558
|
+
```
|
|
1559
|
+
add_filter('fluent_cart/payments_translations', function ($translations, $data) {
|
|
1560
|
+
// Customize payment labels
|
|
1561
|
+
$translations['Credit Card'] = __('Debit/Credit Card', 'my-plugin');
|
|
1562
|
+
return $translations;
|
|
1563
|
+
}, 10, 2);
|
|
1564
|
+
```
|
|
1565
|
+
|
|
1566
|
+
### ` pro/admin_translations ` Pro
|
|
1567
|
+
|
|
1568
|
+
`fluent_cart_pro/admin_translations` Pro — Filter Pro admin translations
|
|
1569
|
+
|
|
1570
|
+
**When it runs:** This filter is applied when loading translation strings specific to FluentCart Pro features in the admin panel.
|
|
1571
|
+
|
|
1572
|
+
**Parameters:**
|
|
1573
|
+
|
|
1574
|
+
- `$translations` (array): Key-value pairs of Pro-specific translation strings
|
|
1575
|
+
- `$data` (array): Additional context data (empty array)
|
|
1576
|
+
|
|
1577
|
+
**Returns:** `array` — The modified translations array
|
|
1578
|
+
|
|
1579
|
+
**Source:** `fluent-cart-pro/app/Services/Translations/Translations.php:24`
|
|
1580
|
+
|
|
1581
|
+
**Usage:**
|
|
1582
|
+
|
|
1583
|
+
```
|
|
1584
|
+
add_filter('fluent_cart_pro/admin_translations', function ($translations, $data) {
|
|
1585
|
+
// Override Pro admin translations
|
|
1586
|
+
$translations['License Management'] = __('License Keys', 'my-plugin');
|
|
1587
|
+
return $translations;
|
|
1588
|
+
}, 10, 2);
|
|
1589
|
+
```
|
|
1590
|
+
|
|
1591
|
+
---
|
|
1592
|
+
|
|
1593
|
+
## Email & Notifications
|
|
1594
|
+
|
|
1595
|
+
### ` email_notifications `
|
|
1596
|
+
|
|
1597
|
+
`fluent_cart/email_notifications` — Filter email notification settings
|
|
1598
|
+
|
|
1599
|
+
**When it runs:** This filter is applied when retrieving the list of available email notifications. Each notification includes its configuration such as recipients, subject template, and default body. Runs before merging with saved notification configs.
|
|
1600
|
+
|
|
1601
|
+
**Parameters:**
|
|
1602
|
+
|
|
1603
|
+
- `$settings` (array): Associative array of notification definitions keyed by notification name
|
|
1604
|
+
|
|
1605
|
+
```
|
|
1606
|
+
$settings = [
|
|
1607
|
+
'order_completed' => [
|
|
1608
|
+
'title' => 'Order Completed',
|
|
1609
|
+
'group_label' => 'Order Actions',
|
|
1610
|
+
'settings' => [
|
|
1611
|
+
'subject' => 'Order #{order.id} Completed',
|
|
1612
|
+
'email_body' => '',
|
|
1613
|
+
'is_default_body' => 'yes',
|
|
1614
|
+
'to' => '{{order.customer.email}}',
|
|
1615
|
+
'status' => 'active',
|
|
1616
|
+
],
|
|
1617
|
+
],
|
|
1618
|
+
// ... more notification types
|
|
1619
|
+
];
|
|
1620
|
+
```
|
|
1621
|
+
|
|
1622
|
+
**Returns:** `array` — The modified notification settings array
|
|
1623
|
+
|
|
1624
|
+
**Source:** `app/Services/Email/EmailNotifications.php:24`
|
|
1625
|
+
|
|
1626
|
+
**Usage:**
|
|
1627
|
+
|
|
1628
|
+
```
|
|
1629
|
+
add_filter('fluent_cart/email_notifications', function ($settings) {
|
|
1630
|
+
// Add a custom email notification
|
|
1631
|
+
$settings['custom_notification'] = [
|
|
1632
|
+
'title' => 'Custom Alert',
|
|
1633
|
+
'group_label' => 'Custom Actions',
|
|
1634
|
+
'settings' => [
|
|
1635
|
+
'subject' => 'Custom Alert for Order #{order.id}',
|
|
1636
|
+
'email_body' => '',
|
|
1637
|
+
'is_default_body' => 'yes',
|
|
1638
|
+
'to' => '{{settings.admin_email}}',
|
|
1639
|
+
'status' => 'active',
|
|
1640
|
+
],
|
|
1641
|
+
];
|
|
1642
|
+
return $settings;
|
|
1643
|
+
});
|
|
1644
|
+
```
|
|
1645
|
+
|
|
1646
|
+
### ` admin_email/notification_recipient `
|
|
1647
|
+
|
|
1648
|
+
`fluent_cart/admin_email/notification_recipient` — Filter the resolved admin recipient address for a notification email
|
|
1649
|
+
|
|
1650
|
+
**When it runs:** This filter is applied only when a notification's `recipient` setting is `'admin'`, after the recipient address has already gone through shortcode resolution — so listeners see the final address the notification resolved to, not a raw shortcode. Deliberately not filterable for customer-recipient notifications.
|
|
1651
|
+
|
|
1652
|
+
**Parameters:**
|
|
1653
|
+
|
|
1654
|
+
- `$to` (string): The resolved admin recipient email address
|
|
1655
|
+
- `$context` (array): Context data
|
|
1656
|
+
|
|
1657
|
+
```
|
|
1658
|
+
$context = [
|
|
1659
|
+
'event' => 'order_completed', // The notification event key
|
|
1660
|
+
'mail_name' => 'Order Completed', // The notification's configured name
|
|
1661
|
+
'notification' => $notification, // Full notification config array
|
|
1662
|
+
'data' => $data, // Template data used to render the email
|
|
1663
|
+
];
|
|
1664
|
+
```
|
|
1665
|
+
|
|
1666
|
+
**Returns:** `string` — The modified admin recipient email address
|
|
1667
|
+
|
|
1668
|
+
**Source:** `app/Services/Email/EmailNotificationMailer.php:362`
|
|
1669
|
+
|
|
1670
|
+
**Usage:**
|
|
1671
|
+
|
|
1672
|
+
```
|
|
1673
|
+
add_filter('fluent_cart/admin_email/notification_recipient', function ($to, $context) {
|
|
1674
|
+
// Route high-value order notifications to a dedicated inbox
|
|
1675
|
+
if ($context['event'] === 'order_completed') {
|
|
1676
|
+
return '[email protected]';
|
|
1677
|
+
}
|
|
1678
|
+
return $to;
|
|
1679
|
+
}, 10, 2);
|
|
1680
|
+
```
|
|
1681
|
+
|
|
1682
|
+
### ` email_notification_data `
|
|
1683
|
+
|
|
1684
|
+
`fluent_cart/email_notification_data` — Filter the notification payload shown in the email settings editor
|
|
1685
|
+
|
|
1686
|
+
**When it runs:** This filter is applied when the admin loads a single notification's editor payload. It lets add-ons inject their own custom field data (stored outside `settings.extra`, in their own storage) into the payload, since core does not persist arbitrary custom fields for a notification.
|
|
1687
|
+
|
|
1688
|
+
**Parameters:**
|
|
1689
|
+
|
|
1690
|
+
- `$notification` (array): The notification's settings array
|
|
1691
|
+
- `$name` (string): The notification's key (e.g. `'order_completed'`)
|
|
1692
|
+
|
|
1693
|
+
**Returns:** `array` — The modified notification array
|
|
1694
|
+
|
|
1695
|
+
**Source:** `app/Http/Controllers/EmailNotificationController.php:61`
|
|
1696
|
+
|
|
1697
|
+
**Usage:**
|
|
1698
|
+
|
|
1699
|
+
```
|
|
1700
|
+
add_filter('fluent_cart/email_notification_data', function ($notification, $name) {
|
|
1701
|
+
if ($name === 'order_completed') {
|
|
1702
|
+
$notification['my_addon_field'] = get_option('my_addon_' . $name, '');
|
|
1703
|
+
}
|
|
1704
|
+
return $notification;
|
|
1705
|
+
}, 10, 2);
|
|
1706
|
+
```
|
|
1707
|
+
|
|
1708
|
+
### ` prepare_email_template_data `
|
|
1709
|
+
|
|
1710
|
+
`fluent_cart/prepare_email_template_data` — Filter a notification's settings before saving, with the template body stripped
|
|
1711
|
+
|
|
1712
|
+
**When it runs:** This filter is applied when an admin saves changes to a notification's email settings, just before the update is persisted. It receives the settings with `email_body` removed (and `is_default_body` forced to `'yes'`) as the value to modify, alongside the full original settings as context — the returned value is what gets saved.
|
|
1713
|
+
|
|
1714
|
+
**Parameters:**
|
|
1715
|
+
|
|
1716
|
+
- `$settingsWithoutTemplate` (array): The settings array with `email_body` removed and `is_default_body` set to `'yes'`
|
|
1717
|
+
- `$settings` (array): The full original settings array (including `email_body`), for context
|
|
1718
|
+
|
|
1719
|
+
**Returns:** `array` — The settings array that will be persisted
|
|
1720
|
+
|
|
1721
|
+
**Source:** `app/Http/Controllers/EmailNotificationController.php:89`
|
|
1722
|
+
|
|
1723
|
+
**Usage:**
|
|
1724
|
+
|
|
1725
|
+
```
|
|
1726
|
+
add_filter('fluent_cart/prepare_email_template_data', function ($settingsWithoutTemplate, $settings) {
|
|
1727
|
+
// Stamp who last edited this notification
|
|
1728
|
+
$settingsWithoutTemplate['last_edited_by'] = get_current_user_id();
|
|
1729
|
+
return $settingsWithoutTemplate;
|
|
1730
|
+
}, 10, 2);
|
|
1731
|
+
```
|
|
1732
|
+
|
|
1733
|
+
### ` email/template_view_path `
|
|
1734
|
+
|
|
1735
|
+
`fluent_cart/email/template_view_path` — Filter the view path used to render an email template
|
|
1736
|
+
|
|
1737
|
+
**When it runs:** This filter is applied when resolving which view file renders a given email template name. Add-ons that ship templates outside the core `emails.*` namespace (where the `emails.` prefix can't reach) match on the `template_path` they registered and return a path `View::make()` can resolve — an absolute file path is safest. Core template paths pass through unmodified.
|
|
1738
|
+
|
|
1739
|
+
**Parameters:**
|
|
1740
|
+
|
|
1741
|
+
- `$viewPath` (string): The default view path (`'emails.' . $name`)
|
|
1742
|
+
- `$context` (array): Context data
|
|
1743
|
+
|
|
1744
|
+
```
|
|
1745
|
+
$context = [
|
|
1746
|
+
'template_path' => $name, // The requested template name
|
|
1747
|
+
'view_data' => $viewData, // Data that will be passed to the view
|
|
1748
|
+
];
|
|
1749
|
+
```
|
|
1750
|
+
|
|
1751
|
+
**Returns:** `string` — The resolved view path
|
|
1752
|
+
|
|
1753
|
+
**Source:** `app/Services/TemplateService.php:25`
|
|
1754
|
+
|
|
1755
|
+
**Usage:**
|
|
1756
|
+
|
|
1757
|
+
```
|
|
1758
|
+
add_filter('fluent_cart/email/template_view_path', function ($viewPath, $context) {
|
|
1759
|
+
if ($context['template_path'] === 'my-addon-receipt') {
|
|
1760
|
+
return '/path/to/my-addon/views/emails/receipt.php';
|
|
1761
|
+
}
|
|
1762
|
+
return $viewPath;
|
|
1763
|
+
}, 10, 2);
|
|
1764
|
+
```
|
|
1765
|
+
|
|
1766
|
+
### ` parse_email_block_content `
|
|
1767
|
+
|
|
1768
|
+
`fluent_cart/parse_email_block_content` — Filter used to parse block-editor markup into rendered email HTML
|
|
1769
|
+
|
|
1770
|
+
**When it runs:** This filter exists purely as a Pro integration point: Free always passes an empty string as the starting value and has no listener of its own, so the filter returns `''` unless FluentCart Pro's block parser is active. It fires from two places — a WP-CLI debug command and the notification mailer — both of which fall back to legacy (non-block) email rendering when the result is empty.
|
|
1771
|
+
|
|
1772
|
+
**Parameters:**
|
|
1773
|
+
|
|
1774
|
+
- `$rendered` (string): The starting value (always `''` in Free)
|
|
1775
|
+
- `$blockMarkup` (string): The raw block-editor markup / email body to parse
|
|
1776
|
+
- `$data` (array): Template data available to the parser (order, customer, etc.)
|
|
1777
|
+
|
|
1778
|
+
**Returns:** `string` — The rendered HTML, or `''` if nothing parsed it (Pro not active)
|
|
1779
|
+
|
|
1780
|
+
**Source:**
|
|
1781
|
+
|
|
1782
|
+
- `app/Hooks/CLI/Commands.php:1343`
|
|
1783
|
+
- `app/Services/Email/EmailNotificationMailer.php:310`
|
|
1784
|
+
|
|
1785
|
+
**Usage:**
|
|
1786
|
+
|
|
1787
|
+
```
|
|
1788
|
+
add_filter('fluent_cart/parse_email_block_content', function ($rendered, $blockMarkup, $data) {
|
|
1789
|
+
// Only handle markup your own block parser recognizes
|
|
1790
|
+
if (strpos($blockMarkup, '<!-- wp:my-addon/block') === false) {
|
|
1791
|
+
return $rendered;
|
|
1792
|
+
}
|
|
1793
|
+
return my_addon_parse_blocks($blockMarkup, $data);
|
|
1794
|
+
}, 10, 3);
|
|
1795
|
+
```
|
|
1796
|
+
|
|
1797
|
+
### ` keep_email_body_draft `
|
|
1798
|
+
|
|
1799
|
+
`fluent_cart/keep_email_body_draft` — Filter whether to prevent email body reset
|
|
1800
|
+
|
|
1801
|
+
**When it runs:** This filter is applied when a notification is switched back to its default body. By default, the custom email body is cleared. Return `true` to preserve the custom body as a draft.
|
|
1802
|
+
|
|
1803
|
+
**Parameters:**
|
|
1804
|
+
|
|
1805
|
+
- `$keepDraft` (bool): Whether to keep the custom body as draft (default: `false`)
|
|
1806
|
+
- `$context` (array): The notification context
|
|
1807
|
+
|
|
1808
|
+
```
|
|
1809
|
+
$context = [
|
|
1810
|
+
'notification_name' => 'order_completed',
|
|
1811
|
+
];
|
|
1812
|
+
```
|
|
1813
|
+
|
|
1814
|
+
**Returns:** `bool` — Whether to preserve the custom email body
|
|
1815
|
+
|
|
1816
|
+
**Source:** `app/Services/Email/EmailNotifications.php:741`
|
|
1817
|
+
|
|
1818
|
+
**Usage:**
|
|
1819
|
+
|
|
1820
|
+
```
|
|
1821
|
+
add_filter('fluent_cart/keep_email_body_draft', function ($keepDraft, $context) {
|
|
1822
|
+
// Always preserve custom email bodies as drafts
|
|
1823
|
+
return true;
|
|
1824
|
+
}, 10, 2);
|
|
1825
|
+
```
|
|
1826
|
+
|
|
1827
|
+
### ` theme_pref `
|
|
1828
|
+
|
|
1829
|
+
`fluent_cart/theme_pref` — Filter email template theme preferences
|
|
1830
|
+
|
|
1831
|
+
**When it runs:** This filter is applied when the block parser resolves the email theme preferences, including the color palette and font sizes used in email templates.
|
|
1832
|
+
|
|
1833
|
+
**Parameters:**
|
|
1834
|
+
|
|
1835
|
+
- `$pref` (array): Theme preference settings
|
|
1836
|
+
|
|
1837
|
+
```
|
|
1838
|
+
$pref = [
|
|
1839
|
+
'colors' => [...], // Color palette array
|
|
1840
|
+
'font_sizes' => [...], // Font size definitions
|
|
1841
|
+
];
|
|
1842
|
+
```
|
|
1843
|
+
|
|
1844
|
+
**Returns:** `array` — The modified theme preferences
|
|
1845
|
+
|
|
1846
|
+
**Source:** `app/Services/Email/FluentBlockParser.php:1997`
|
|
1847
|
+
|
|
1848
|
+
**Usage:**
|
|
1849
|
+
|
|
1850
|
+
```
|
|
1851
|
+
add_filter('fluent_cart/theme_pref', function ($pref) {
|
|
1852
|
+
// Add brand colors to the email palette
|
|
1853
|
+
$pref['colors'][] = [
|
|
1854
|
+
'name' => 'Brand Primary',
|
|
1855
|
+
'slug' => 'brand-primary',
|
|
1856
|
+
'color' => '#FF6600',
|
|
1857
|
+
];
|
|
1858
|
+
return $pref;
|
|
1859
|
+
});
|
|
1860
|
+
```
|
|
1861
|
+
|
|
1862
|
+
### ` condition_presets `
|
|
1863
|
+
|
|
1864
|
+
`fluent_cart/condition_presets` — Filter email condition presets
|
|
1865
|
+
|
|
1866
|
+
**When it runs:** This filter is applied when retrieving available condition presets for email template conditional blocks. Presets define reusable conditions like "has note" or "has downloads" that control block visibility.
|
|
1867
|
+
|
|
1868
|
+
**Parameters:**
|
|
1869
|
+
|
|
1870
|
+
- `$presets` (array): Array of condition preset definitions
|
|
1871
|
+
|
|
1872
|
+
```
|
|
1873
|
+
$presets = [
|
|
1874
|
+
[
|
|
1875
|
+
'id' => 'has_order_note',
|
|
1876
|
+
'label' => 'Has Order Note',
|
|
1877
|
+
'hint' => 'Show when the order has a note.',
|
|
1878
|
+
'shortcode' => '{{order.note}}',
|
|
1879
|
+
'condition' => 'not_empty',
|
|
1880
|
+
'compareValue' => '',
|
|
1881
|
+
],
|
|
1882
|
+
[
|
|
1883
|
+
'id' => 'has_downloads',
|
|
1884
|
+
'label' => 'Has Downloads',
|
|
1885
|
+
'hint' => 'Show when downloadable files are attached.',
|
|
1886
|
+
'shortcode' => '{{order.downloads}}',
|
|
1887
|
+
'condition' => 'not_empty',
|
|
1888
|
+
'compareValue' => '',
|
|
1889
|
+
],
|
|
1890
|
+
];
|
|
1891
|
+
```
|
|
1892
|
+
|
|
1893
|
+
**Returns:** `array` — The modified presets array
|
|
1894
|
+
|
|
1895
|
+
**Source:** `app/Services/Email/ConditionPresets.php:124`
|
|
1896
|
+
|
|
1897
|
+
**Usage:**
|
|
1898
|
+
|
|
1899
|
+
```
|
|
1900
|
+
add_filter('fluent_cart/condition_presets', function ($presets) {
|
|
1901
|
+
// Add a custom condition preset
|
|
1902
|
+
$presets[] = [
|
|
1903
|
+
'id' => 'is_high_value',
|
|
1904
|
+
'label' => 'High Value Order',
|
|
1905
|
+
'hint' => 'Show when order total exceeds $100.',
|
|
1906
|
+
'shortcode' => '{{order.total_amount}}',
|
|
1907
|
+
'condition' => 'greater_than',
|
|
1908
|
+
'compareValue' => '10000', // in cents
|
|
1909
|
+
];
|
|
1910
|
+
return $presets;
|
|
1911
|
+
});
|
|
1912
|
+
```
|
|
1913
|
+
|
|
1914
|
+
### ` evaluate_condition_preset `
|
|
1915
|
+
|
|
1916
|
+
`fluent_cart/evaluate_condition_preset` Pro — Filter evaluate condition preset
|
|
1917
|
+
|
|
1918
|
+
**When it runs:** This filter is applied when evaluating a condition preset that has no shortcode and no callback defined. It serves as a fallback for custom condition evaluation logic.
|
|
1919
|
+
|
|
1920
|
+
**Parameters:**
|
|
1921
|
+
|
|
1922
|
+
- `$result` (bool): The evaluation result (default: `false`)
|
|
1923
|
+
- `$context` (array): Full context for the condition evaluation
|
|
1924
|
+
|
|
1925
|
+
```
|
|
1926
|
+
$context = [
|
|
1927
|
+
'preset' => [...], // The resolved preset definition
|
|
1928
|
+
'resolved' => [...], // Resolved condition data
|
|
1929
|
+
'data' => [...], // Template data (order, customer, etc.)
|
|
1930
|
+
'block_attrs' => [...], // Block attributes
|
|
1931
|
+
];
|
|
1932
|
+
```
|
|
1933
|
+
|
|
1934
|
+
**Returns:** `bool` — Whether the condition is met
|
|
1935
|
+
|
|
1936
|
+
**Source:** `app/Services/Email/Blocks/BaseBlock.php:196`
|
|
1937
|
+
|
|
1938
|
+
**Usage:**
|
|
1939
|
+
|
|
1940
|
+
```
|
|
1941
|
+
add_filter('fluent_cart/evaluate_condition_preset', function ($result, $context) {
|
|
1942
|
+
$preset = $context['preset'];
|
|
1943
|
+
if ($preset && $preset['id'] === 'my_custom_condition') {
|
|
1944
|
+
$order = $context['data']['order'] ?? null;
|
|
1945
|
+
return $order && $order->total_amount > 10000;
|
|
1946
|
+
}
|
|
1947
|
+
return $result;
|
|
1948
|
+
}, 10, 2);
|
|
1949
|
+
```
|
|
1950
|
+
|
|
1951
|
+
### ` confirmation_shortcodes `
|
|
1952
|
+
|
|
1953
|
+
`fluent_cart/confirmation_shortcodes` — Filter confirmation page shortcodes
|
|
1954
|
+
|
|
1955
|
+
**When it runs:** This filter is applied when retrieving available shortcodes for the order confirmation (receipt) page template editor.
|
|
1956
|
+
|
|
1957
|
+
**Parameters:**
|
|
1958
|
+
|
|
1959
|
+
- `$groups` (array): Array of shortcode groups (customer, order, general, settings)
|
|
1960
|
+
|
|
1961
|
+
```
|
|
1962
|
+
$groups = [
|
|
1963
|
+
[
|
|
1964
|
+
'title' => 'Customer',
|
|
1965
|
+
'key' => 'customer',
|
|
1966
|
+
'shortcodes' => [
|
|
1967
|
+
'{{customer.first_name}}' => 'First Name',
|
|
1968
|
+
'{{customer.email}}' => 'Email',
|
|
1969
|
+
],
|
|
1970
|
+
],
|
|
1971
|
+
[
|
|
1972
|
+
'title' => 'Order',
|
|
1973
|
+
'key' => 'order',
|
|
1974
|
+
'shortcodes' => [
|
|
1975
|
+
'{{order.id}}' => 'Order ID',
|
|
1976
|
+
'{{order.total_amount_formatted}}' => 'Order Total',
|
|
1977
|
+
// ... many more
|
|
1978
|
+
],
|
|
1979
|
+
],
|
|
1980
|
+
// ... general, settings groups
|
|
1981
|
+
];
|
|
1982
|
+
```
|
|
1983
|
+
|
|
1984
|
+
- `$data` (array): Additional context data (empty array)
|
|
1985
|
+
|
|
1986
|
+
**Returns:** `array` — The modified shortcode groups array
|
|
1987
|
+
|
|
1988
|
+
**Source:** `app/Helpers/EditorShortCodeHelper.php:205`
|
|
1989
|
+
|
|
1990
|
+
**Usage:**
|
|
1991
|
+
|
|
1992
|
+
```
|
|
1993
|
+
add_filter('fluent_cart/confirmation_shortcodes', function ($groups, $data) {
|
|
1994
|
+
// Add a custom shortcode group
|
|
1995
|
+
$groups[] = [
|
|
1996
|
+
'title' => 'Custom Data',
|
|
1997
|
+
'key' => 'custom',
|
|
1998
|
+
'shortcodes' => [
|
|
1999
|
+
'{{custom.tracking_url}}' => 'Tracking URL',
|
|
2000
|
+
],
|
|
2001
|
+
];
|
|
2002
|
+
return $groups;
|
|
2003
|
+
}, 10, 2);
|
|
2004
|
+
```
|
|
2005
|
+
|
|
2006
|
+
### ` editor_shortcodes `
|
|
2007
|
+
|
|
2008
|
+
`fluent_cart/editor_shortcodes` — Filter email editor shortcodes
|
|
2009
|
+
|
|
2010
|
+
**When it runs:** This filter is applied when retrieving available shortcodes for the email notification template editor. Includes order, general, customer, transaction, settings, and license shortcode groups.
|
|
2011
|
+
|
|
2012
|
+
**Parameters:**
|
|
2013
|
+
|
|
2014
|
+
- `$shortCodes` (array): Associative array of shortcode groups
|
|
2015
|
+
|
|
2016
|
+
```
|
|
2017
|
+
$shortCodes = [
|
|
2018
|
+
'order' => [...], // Order shortcodes
|
|
2019
|
+
'general' => [...], // General shortcodes
|
|
2020
|
+
'customer' => [...], // Customer shortcodes
|
|
2021
|
+
'transaction' => [...], // Transaction shortcodes
|
|
2022
|
+
'settings' => [...], // Settings shortcodes
|
|
2023
|
+
'license' => [...], // License shortcodes
|
|
2024
|
+
];
|
|
2025
|
+
```
|
|
2026
|
+
|
|
2027
|
+
**Returns:** `array` — The modified shortcodes array
|
|
2028
|
+
|
|
2029
|
+
**Source:** `app/Helpers/EditorShortCodeHelper.php:297`
|
|
2030
|
+
|
|
2031
|
+
**Usage:**
|
|
2032
|
+
|
|
2033
|
+
```
|
|
2034
|
+
add_filter('fluent_cart/editor_shortcodes', function ($shortCodes) {
|
|
2035
|
+
// Add a custom shortcode group for email templates
|
|
2036
|
+
$shortCodes['custom'] = [
|
|
2037
|
+
'title' => 'Custom Fields',
|
|
2038
|
+
'key' => 'custom',
|
|
2039
|
+
'shortcodes' => [
|
|
2040
|
+
'{{custom.loyalty_points}}' => 'Loyalty Points',
|
|
2041
|
+
'{{custom.referral_code}}' => 'Referral Code',
|
|
2042
|
+
],
|
|
2043
|
+
];
|
|
2044
|
+
return $shortCodes;
|
|
2045
|
+
});
|
|
2046
|
+
```
|
|
2047
|
+
|
|
2048
|
+
### ` disable_email_celebration_messages `
|
|
2049
|
+
|
|
2050
|
+
`fluent_cart/disable_email_celebration_messages` — Filter whether to disable celebration messages in admin emails
|
|
2051
|
+
|
|
2052
|
+
**When it runs:** This filter is applied when generating admin notification emails. By default, FluentCart adds a random celebration message (e.g., "Woo-Hoo! Another Sale!") to admin order emails.
|
|
2053
|
+
|
|
2054
|
+
**Parameters:**
|
|
2055
|
+
|
|
2056
|
+
- `$disable` (bool): Whether to disable celebration messages (default: `false`)
|
|
2057
|
+
- `$context` (array): The notification type context
|
|
2058
|
+
|
|
2059
|
+
```
|
|
2060
|
+
$context = [
|
|
2061
|
+
'type' => 'order', // or 'subscription', etc.
|
|
2062
|
+
];
|
|
2063
|
+
```
|
|
2064
|
+
|
|
2065
|
+
**Returns:** `bool` — Whether to disable the celebration messages
|
|
2066
|
+
|
|
2067
|
+
**Source:** `app/Services/TemplateService.php:124`
|
|
2068
|
+
|
|
2069
|
+
**Usage:**
|
|
2070
|
+
|
|
2071
|
+
```
|
|
2072
|
+
add_filter('fluent_cart/disable_email_celebration_messages', function ($disable, $context) {
|
|
2073
|
+
// Disable celebrations for all admin emails
|
|
2074
|
+
return true;
|
|
2075
|
+
}, 10, 2);
|
|
2076
|
+
```
|
|
2077
|
+
|
|
2078
|
+
---
|
|
2079
|
+
|
|
2080
|
+
## Store Digest
|
|
2081
|
+
|
|
2082
|
+
Hooks for the scheduled "store digest" summary email (sales/refund metrics over a period), sent by `StoreDigestService`. Fire `do_action('fluent_cart/store_digest/send', 'daily')` (or `'weekly'`) to trigger one on demand — see [Admin & Templates](/hooks/actions/admin-and-templates.md#store-digest-send).
|
|
2083
|
+
|
|
2084
|
+
### ` store_digest/data `
|
|
2085
|
+
|
|
2086
|
+
`fluent_cart/store_digest/data` — Filter the fully-assembled store digest email payload
|
|
2087
|
+
|
|
2088
|
+
**When it runs:** This filter is applied after the digest payload (metrics, promo copy, URLs) is fully assembled but before the email is rendered — the last chance for integrations to override the chosen copy or add data before rendering.
|
|
2089
|
+
|
|
2090
|
+
**Parameters:**
|
|
2091
|
+
|
|
2092
|
+
- `$payload` (array): The digest email payload
|
|
2093
|
+
|
|
2094
|
+
```
|
|
2095
|
+
$payload = [
|
|
2096
|
+
'reports_url' => 'https://example.com/wp-admin/admin.php?page=fluent-cart#/reports',
|
|
2097
|
+
'settings_url' => 'https://example.com/wp-admin/admin.php?page=fluent-cart#/settings/email_digest_settings',
|
|
2098
|
+
'is_pro' => false,
|
|
2099
|
+
'pro_url' => 'https://fluentcart.com/discount-deal/',
|
|
2100
|
+
'is_empty' => false,
|
|
2101
|
+
'subject' => '',
|
|
2102
|
+
'metrics' => [
|
|
2103
|
+
'gross_sale' => '$4,820.00', // formatted; underlying values are cents
|
|
2104
|
+
'net_revenue' => '$4,512.00',
|
|
2105
|
+
'refund_amount' => '$120.00',
|
|
2106
|
+
'refund_count' => 2,
|
|
2107
|
+
'order_count' => 38,
|
|
2108
|
+
],
|
|
2109
|
+
'pro_promo' => [], // populated only when `is_pro` is false
|
|
2110
|
+
];
|
|
2111
|
+
```
|
|
2112
|
+
|
|
2113
|
+
- `$context` (array): Context data
|
|
2114
|
+
|
|
2115
|
+
```
|
|
2116
|
+
$context = [
|
|
2117
|
+
'frequency' => 'daily', // or 'weekly'
|
|
2118
|
+
'startDate' => '2026-08-11 00:00:00', // UTC
|
|
2119
|
+
'endDate' => '2026-08-18 00:00:00', // UTC
|
|
2120
|
+
];
|
|
2121
|
+
```
|
|
2122
|
+
|
|
2123
|
+
**Returns:** `array` — The modified digest payload
|
|
2124
|
+
|
|
2125
|
+
**Source:** `app/Services/Email/StoreDigestService.php:347`
|
|
2126
|
+
|
|
2127
|
+
**Usage:**
|
|
2128
|
+
|
|
2129
|
+
```
|
|
2130
|
+
add_filter('fluent_cart/store_digest/data', function ($payload, $context) {
|
|
2131
|
+
// Append a custom metric line for weekly digests
|
|
2132
|
+
if ($context['frequency'] === 'weekly') {
|
|
2133
|
+
$payload['metrics']['new_customers'] = get_transient('weekly_new_customers') ?: 0;
|
|
2134
|
+
}
|
|
2135
|
+
return $payload;
|
|
2136
|
+
}, 10, 2);
|
|
2137
|
+
```
|
|
2138
|
+
|
|
2139
|
+
### ` store_digest/recipients `
|
|
2140
|
+
|
|
2141
|
+
`fluent_cart/store_digest/recipients` — Filter who receives the store digest email
|
|
2142
|
+
|
|
2143
|
+
**When it runs:** This filter is applied after the default recipient list (deduplicated admin/store emails) has been resolved, letting you add, remove, or replace recipients before the digest is sent.
|
|
2144
|
+
|
|
2145
|
+
**Parameters:**
|
|
2146
|
+
|
|
2147
|
+
- `$emails` (array): Deduplicated list of recipient email addresses
|
|
2148
|
+
- `$context` (array): Context data
|
|
2149
|
+
|
|
2150
|
+
```
|
|
2151
|
+
$context = [
|
|
2152
|
+
'frequency' => 'daily', // or 'weekly'
|
|
2153
|
+
'settings' => $config, // The digest's configured settings
|
|
2154
|
+
];
|
|
2155
|
+
```
|
|
2156
|
+
|
|
2157
|
+
**Returns:** `array` — The modified recipient email addresses
|
|
2158
|
+
|
|
2159
|
+
**Source:** `app/Services/Email/StoreDigestService.php:492`
|
|
2160
|
+
|
|
2161
|
+
**Usage:**
|
|
2162
|
+
|
|
2163
|
+
```
|
|
2164
|
+
add_filter('fluent_cart/store_digest/recipients', function ($emails, $context) {
|
|
2165
|
+
$emails[] = '[email protected]';
|
|
2166
|
+
return array_unique($emails);
|
|
2167
|
+
}, 10, 2);
|
|
2168
|
+
```
|
|
2169
|
+
|
|
2170
|
+
### ` store_digest/pro_url `
|
|
2171
|
+
|
|
2172
|
+
`fluent_cart/store_digest/pro_url` — Filter the "Upgrade to Pro" link shown in the free-plugin digest email
|
|
2173
|
+
|
|
2174
|
+
**When it runs:** This filter is applied while building the digest payload, resolving the URL used by the Pro promo block that Free-plugin digests include.
|
|
2175
|
+
|
|
2176
|
+
**Parameters:**
|
|
2177
|
+
|
|
2178
|
+
- `$proUrl` (string): The default upgrade URL (`'https://fluentcart.com/discount-deal/'`)
|
|
2179
|
+
|
|
2180
|
+
**Returns:** `string` — The modified upgrade URL
|
|
2181
|
+
|
|
2182
|
+
**Source:** `app/Services/Email/StoreDigestService.php:311`
|
|
2183
|
+
|
|
2184
|
+
**Usage:**
|
|
2185
|
+
|
|
2186
|
+
```
|
|
2187
|
+
add_filter('fluent_cart/store_digest/pro_url', function ($proUrl) {
|
|
2188
|
+
return 'https://fluentcart.com/discount-deal/?ref=digest-email';
|
|
2189
|
+
});
|
|
2190
|
+
```
|
|
2191
|
+
|
|
2192
|
+
---
|
|
2193
|
+
|
|
2194
|
+
## Reports
|
|
2195
|
+
|
|
2196
|
+
These filters run inside the core report controllers and services. Most of them are switches: core asks the filter whether to include a section, and skips that query when the answer is `false`. FluentCart Pro answers them (in `fluent-cart-pro/app/Modules/Reports/Reports.php`). Without Pro, the filters return their default and the matching response fields are left out. Several MCP report tools ask the same filters, so they return the same data as the REST API.
|
|
2197
|
+
|
|
2198
|
+
### ` report/sanitize_params_rules `
|
|
2199
|
+
|
|
2200
|
+
`fluent_cart/report/sanitize_params_rules` — Filter the sanitization rules applied to report request parameters
|
|
2201
|
+
|
|
2202
|
+
**When it runs:** This filter is applied inside `ReportHelper::sanitizeParams()`, before every report request's `params` are sanitized. Add a rule for a custom parameter your integration sends. A key with no rule is left untouched (for example `advanced_filters`, whose consumer sanitizes it).
|
|
2203
|
+
|
|
2204
|
+
**Parameters:**
|
|
2205
|
+
|
|
2206
|
+
- `$rules` (array): Sanitization rules, keyed like `$params` (for example `'startDate' => 'sanitize_text_field'`, `'variation_ids.*' => 'intval'`)
|
|
2207
|
+
- `$params` (array): The raw, unsanitized report request parameters
|
|
2208
|
+
|
|
2209
|
+
**Returns:** `array` — The modified sanitization rules. A non-array return means no rules.
|
|
2210
|
+
|
|
2211
|
+
**Source:** `app/Services/Report/ReportHelper.php:658`
|
|
2212
|
+
|
|
2213
|
+
**Usage:**
|
|
2214
|
+
|
|
2215
|
+
```
|
|
2216
|
+
add_filter('fluent_cart/report/sanitize_params_rules', function ($rules, $params) {
|
|
2217
|
+
$rules['channel'] = 'sanitize_text_field';
|
|
2218
|
+
return $rules;
|
|
2219
|
+
}, 10, 2);
|
|
2220
|
+
```
|
|
2221
|
+
|
|
2222
|
+
### ` report/sources_query `
|
|
2223
|
+
|
|
2224
|
+
`fluent_cart/report/sources_query` — Filter the query builder behind the Order Sources report
|
|
2225
|
+
|
|
2226
|
+
**When it runs:** This filter is applied after the base query for the Order Sources report is built. The query reads orders as `o`, with `fct_order_operations` joined as `oo`. It is not grouped yet. Every row, the totals and the "(none)" row come from it. Core does not parse `advanced_filters`; FluentCart Pro uses this filter to apply them. If the returned value is not a query builder, core uses the unmodified query.
|
|
2227
|
+
|
|
2228
|
+
**Parameters:**
|
|
2229
|
+
|
|
2230
|
+
- `$query` (`\FluentCart\Framework\Database\Query\Builder`): The report's query builder
|
|
2231
|
+
- `$params` (array): Processed report parameters (date range, currency, `filter_type`, raw `advanced_filters`)
|
|
2232
|
+
|
|
2233
|
+
**Returns:** `\FluentCart\Framework\Database\Query\Builder` — The modified query builder (any other return is ignored)
|
|
2234
|
+
|
|
2235
|
+
**Source:** `app/Services/Report/SourceReportService.php:119`
|
|
2236
|
+
|
|
2237
|
+
**Usage:**
|
|
2238
|
+
|
|
2239
|
+
```
|
|
2240
|
+
add_filter('fluent_cart/report/sources_query', function ($query, $params) {
|
|
2241
|
+
// Exclude a known internal UTM source from the report
|
|
2242
|
+
return $query->where('oo.utm_source', '!=', 'internal-qa');
|
|
2243
|
+
}, 10, 2);
|
|
2244
|
+
```
|
|
2245
|
+
|
|
2246
|
+
### ` report/channel_rules `
|
|
2247
|
+
|
|
2248
|
+
`fluent_cart/report/channel_rules` — Filter the custom channel rules used by the Sources channels report
|
|
2249
|
+
|
|
2250
|
+
**When it runs:** This filter is applied when `GET /reports/source-channels` assigns each new customer's first order to a channel. Custom rules are checked in order, before the built-in channels (email, paid, social, ai, search, referral, campaign, direct). Core passes the result through `ChannelRules::sanitize()`. FluentCart Pro returns the rules saved with `POST /reports/channel-rules`.
|
|
2251
|
+
|
|
2252
|
+
**Parameters:**
|
|
2253
|
+
|
|
2254
|
+
- `$rules` (array): Default `['rules' => [], 'own_domains' => []]`
|
|
2255
|
+
|
|
2256
|
+
```
|
|
2257
|
+
$rules = [
|
|
2258
|
+
'rules' => [
|
|
2259
|
+
[
|
|
2260
|
+
'id' => 'abc123', // a-z0-9, at most 12 characters
|
|
2261
|
+
'name' => 'Partners', // at most 60 characters
|
|
2262
|
+
'groups' => [ // a rule matches when any group matches
|
|
2263
|
+
[ // a group matches when all its conditions match
|
|
2264
|
+
['field' => 'source', 'operator' => 'is', 'value' => 'partner'],
|
|
2265
|
+
],
|
|
2266
|
+
],
|
|
2267
|
+
],
|
|
2268
|
+
],
|
|
2269
|
+
'own_domains' => ['example.com'], // referrers from these domains count as direct
|
|
2270
|
+
];
|
|
2271
|
+
```
|
|
2272
|
+
|
|
2273
|
+
Fields: `source`, `medium`, `campaign`, `domain`. Operators: `is`, `contains`, `starts_with`. Limits: 20 rules, 5 groups per rule, 5 conditions per group, 20 domains.
|
|
2274
|
+
|
|
2275
|
+
**Returns:** `array` — The rules and own domains to apply
|
|
2276
|
+
|
|
2277
|
+
**Source:** `app/Services/Report/SourceReportService.php:425`
|
|
2278
|
+
|
|
2279
|
+
**Usage:**
|
|
2280
|
+
|
|
2281
|
+
```
|
|
2282
|
+
add_filter('fluent_cart/report/channel_rules', function ($rules) {
|
|
2283
|
+
$rules['own_domains'][] = 'shop.example.com';
|
|
2284
|
+
return $rules;
|
|
2285
|
+
});
|
|
2286
|
+
```
|
|
2287
|
+
|
|
2288
|
+
### ` report/locations `
|
|
2289
|
+
|
|
2290
|
+
`fluent_cart/report/locations` — Replace the Locations report with a full report
|
|
2291
|
+
|
|
2292
|
+
**When it runs:** This filter is applied in `GET /reports/locations` before core builds its own report. Return an array to replace the report. Return anything else (the default `null`) and core builds the country-only report. FluentCart Pro returns the full report: states and cities, lifetime value and repeat rate per place, and the biggest movers. The response carries `full: true` in that case.
|
|
2293
|
+
|
|
2294
|
+
**Parameters:**
|
|
2295
|
+
|
|
2296
|
+
- `$report` (null): Default `null`
|
|
2297
|
+
- `$params` (array): Processed report parameters, plus `level`, `country`, `state`, `address_type` and `with_summary` from the request
|
|
2298
|
+
|
|
2299
|
+
**Returns:** `array|null` — The report to send, or `null` to let core build it. Core adds `compare_ranges` to an array return.
|
|
2300
|
+
|
|
2301
|
+
**Source:** `app/Http/Controllers/Reports/RevenueReportController.php:81`
|
|
2302
|
+
|
|
2303
|
+
**Usage:**
|
|
2304
|
+
|
|
2305
|
+
```
|
|
2306
|
+
add_filter('fluent_cart/report/locations', function ($report, $params) {
|
|
2307
|
+
// Leave the report to core (or to FluentCart Pro) unless you build the whole response
|
|
2308
|
+
return $report;
|
|
2309
|
+
}, 10, 2);
|
|
2310
|
+
```
|
|
2311
|
+
|
|
2312
|
+
### ` report/cohort_options `
|
|
2313
|
+
|
|
2314
|
+
`fluent_cart/report/cohort_options` — Allow the advanced options of the subscription cohorts report
|
|
2315
|
+
|
|
2316
|
+
**When it runs:** This filter is applied in `GET /reports/subscription-cohorts`. When it returns `true`, the report reads the `metric`, `billingInterval` and `rebuyAdjusted` params (MRR cohorts, billing-interval filter, rebuys counted as retained). When it returns `false`, the metric is always `subscribers` and the other two options are ignored. The response carries `full` with the answer. FluentCart Pro returns `true`.
|
|
2317
|
+
|
|
2318
|
+
**Parameters:**
|
|
2319
|
+
|
|
2320
|
+
- `$enabled` (bool): Default `false`
|
|
2321
|
+
|
|
2322
|
+
**Returns:** `bool`
|
|
2323
|
+
|
|
2324
|
+
**Source:** `app/Http/Controllers/Reports/SubscriptionReportController.php:154`
|
|
2325
|
+
|
|
2326
|
+
**Usage:**
|
|
2327
|
+
|
|
2328
|
+
```
|
|
2329
|
+
add_filter('fluent_cart/report/cohort_options', '__return_true');
|
|
2330
|
+
```
|
|
2331
|
+
|
|
2332
|
+
### ` report/future_renewals_by_variation `
|
|
2333
|
+
|
|
2334
|
+
`fluent_cart/report/future_renewals_by_variation` — Include renewals by variation in the future renewals report
|
|
2335
|
+
|
|
2336
|
+
**When it runs:** This filter is applied in `GET /reports/future-renewals`. When it returns `false`, core skips the per-variation query and removes `by_variation` from the response. FluentCart Pro returns `true`.
|
|
2337
|
+
|
|
2338
|
+
**Parameters:**
|
|
2339
|
+
|
|
2340
|
+
- `$enabled` (bool): Default `false`
|
|
2341
|
+
|
|
2342
|
+
**Returns:** `bool`
|
|
2343
|
+
|
|
2344
|
+
**Source:** `app/Http/Controllers/Reports/SubscriptionReportController.php:27`
|
|
2345
|
+
|
|
2346
|
+
**Usage:**
|
|
2347
|
+
|
|
2348
|
+
```
|
|
2349
|
+
add_filter('fluent_cart/report/future_renewals_by_variation', '__return_true');
|
|
2350
|
+
```
|
|
2351
|
+
|
|
2352
|
+
### ` report/installment_forecast `
|
|
2353
|
+
|
|
2354
|
+
`fluent_cart/report/installment_forecast` — Include the installment schedule, starts and collection rate
|
|
2355
|
+
|
|
2356
|
+
**When it runs:** This filter is applied in `GET /reports/installments`. When it returns `false`, core removes `schedule`, `starts` and `summary.collection_rate` from the response. FluentCart Pro returns `true`.
|
|
2357
|
+
|
|
2358
|
+
**Parameters:**
|
|
2359
|
+
|
|
2360
|
+
- `$enabled` (bool): Default `false`
|
|
2361
|
+
|
|
2362
|
+
**Returns:** `bool`
|
|
2363
|
+
|
|
2364
|
+
**Source:** `app/Http/Controllers/Reports/SubscriptionReportController.php:50`
|
|
2365
|
+
|
|
2366
|
+
**Usage:**
|
|
2367
|
+
|
|
2368
|
+
```
|
|
2369
|
+
add_filter('fluent_cart/report/installment_forecast', '__return_true');
|
|
2370
|
+
```
|
|
2371
|
+
|
|
2372
|
+
### ` report/mrr_breakdown `
|
|
2373
|
+
|
|
2374
|
+
`fluent_cart/report/mrr_breakdown` — Include MRR by plan and interval and trial conversion in the subscriptions overview
|
|
2375
|
+
|
|
2376
|
+
**When it runs:** This filter is applied in `GET /reports/subscriptions-overview`. When it returns `true`, the service also builds MRR by plan and by billing interval and the trial conversion figures. A request with `params[summary_only]` never gets the breakdown. FluentCart Pro returns `true`.
|
|
2377
|
+
|
|
2378
|
+
**Parameters:**
|
|
2379
|
+
|
|
2380
|
+
- `$enabled` (bool): Default `false`
|
|
2381
|
+
|
|
2382
|
+
**Returns:** `bool`
|
|
2383
|
+
|
|
2384
|
+
**Source:** `app/Http/Controllers/Reports/SubscriptionReportController.php:96`
|
|
2385
|
+
|
|
2386
|
+
**Usage:**
|
|
2387
|
+
|
|
2388
|
+
```
|
|
2389
|
+
add_filter('fluent_cart/report/mrr_breakdown', '__return_true');
|
|
2390
|
+
```
|
|
2391
|
+
|
|
2392
|
+
### ` report/source_groupings `
|
|
2393
|
+
|
|
2394
|
+
`fluent_cart/report/source_groupings` — Allow the non-UTM groupings of the Order Sources report
|
|
2395
|
+
|
|
2396
|
+
**When it runs:** This filter is applied in `GET /reports/sources` when `params[group_by]` is `product`, `variation`, `day`, `week`, `month` or `referrer`. When it returns `false`, core falls back to the default grouping (`campaign_source_medium`). The UTM groupings are always allowed. FluentCart Pro returns `true`.
|
|
2397
|
+
|
|
2398
|
+
**Parameters:**
|
|
2399
|
+
|
|
2400
|
+
- `$enabled` (bool): Default `false`
|
|
2401
|
+
|
|
2402
|
+
**Returns:** `bool`
|
|
2403
|
+
|
|
2404
|
+
**Source:** `app/Http/Controllers/Reports/SourceReportController.php:38`
|
|
2405
|
+
|
|
2406
|
+
**Usage:**
|
|
2407
|
+
|
|
2408
|
+
```
|
|
2409
|
+
add_filter('fluent_cart/report/source_groupings', '__return_true');
|
|
2410
|
+
```
|
|
2411
|
+
|
|
2412
|
+
### ` report/coupon_quality `
|
|
2413
|
+
|
|
2414
|
+
`fluent_cart/report/coupon_quality` — Include coupon quality figures in the coupon reports
|
|
2415
|
+
|
|
2416
|
+
**When it runs:** This filter is applied in `GET /reports/coupons` and `GET /reports/coupon-overview`. When it returns `false`, core removes `won_ltv`, `first_order_net`, `later_net`, `lifetime_net` and `refund_rate` from each coupon row and from the totals, and removes `comparison` (coupon orders against full-price orders) from the overview. FluentCart Pro returns `true`.
|
|
2417
|
+
|
|
2418
|
+
**Parameters:**
|
|
2419
|
+
|
|
2420
|
+
- `$enabled` (bool): Default `false`
|
|
2421
|
+
|
|
2422
|
+
**Returns:** `bool`
|
|
2423
|
+
|
|
2424
|
+
**Source:** `app/Http/Controllers/Reports/CouponReportController.php:48`
|
|
2425
|
+
|
|
2426
|
+
**Usage:**
|
|
2427
|
+
|
|
2428
|
+
```
|
|
2429
|
+
add_filter('fluent_cart/report/coupon_quality', '__return_true');
|
|
2430
|
+
```
|
|
2431
|
+
|
|
2432
|
+
### ` report/refund_products `
|
|
2433
|
+
|
|
2434
|
+
`fluent_cart/report/refund_products` — Include the most refunded products in the refunds overview
|
|
2435
|
+
|
|
2436
|
+
**When it runs:** This filter is applied in `GET /reports/refunds-overview`. When it returns `false`, core skips the per-product query and removes `by_product` from the response. FluentCart Pro returns `true`.
|
|
2437
|
+
|
|
2438
|
+
**Parameters:**
|
|
2439
|
+
|
|
2440
|
+
- `$enabled` (bool): Default `false`
|
|
2441
|
+
|
|
2442
|
+
**Returns:** `bool`
|
|
2443
|
+
|
|
2444
|
+
**Source:** `app/Http/Controllers/Reports/RefundReportController.php:23`
|
|
2445
|
+
|
|
2446
|
+
**Usage:**
|
|
2447
|
+
|
|
2448
|
+
```
|
|
2449
|
+
add_filter('fluent_cart/report/refund_products', '__return_true');
|
|
2450
|
+
```
|
|
2451
|
+
|
|
2452
|
+
---
|
|
2453
|
+
|
|
2454
|
+
## Block Editor
|
|
2455
|
+
|
|
2456
|
+
### ` block_editor_require_nonce `
|
|
2457
|
+
|
|
2458
|
+
`fluent_cart/block_editor_require_nonce` Pro — Filter whether the block editor requires nonce verification
|
|
2459
|
+
|
|
2460
|
+
**When it runs:** This filter is applied when loading the FluentCart block editor (email template editor). It controls whether nonce verification is enforced for editor access.
|
|
2461
|
+
|
|
2462
|
+
**Parameters:**
|
|
2463
|
+
|
|
2464
|
+
- `$requireNonce` (bool): Whether to require nonce (default: `true`)
|
|
2465
|
+
- `$blockType` (string): The block editor type being loaded
|
|
2466
|
+
- `$request` (array): The current request data
|
|
2467
|
+
|
|
2468
|
+
**Returns:** `bool` — Whether to enforce nonce verification
|
|
2469
|
+
|
|
2470
|
+
**Source:** `app/Hooks/Handlers/FluentCartBlockEditorHandler.php:54`
|
|
2471
|
+
|
|
2472
|
+
**Usage:**
|
|
2473
|
+
|
|
2474
|
+
```
|
|
2475
|
+
add_filter('fluent_cart/block_editor_require_nonce', function ($requireNonce, $blockType, $request) {
|
|
2476
|
+
// Disable nonce for specific block types (use with caution)
|
|
2477
|
+
if ($blockType === 'preview') {
|
|
2478
|
+
return false;
|
|
2479
|
+
}
|
|
2480
|
+
return $requireNonce;
|
|
2481
|
+
}, 10, 3);
|
|
2482
|
+
```
|
|
2483
|
+
|
|
2484
|
+
### ` disable_pro_email_templates `
|
|
2485
|
+
|
|
2486
|
+
`fluent_cart/disable_pro_email_templates` — Filter whether to disable Pro email templates
|
|
2487
|
+
|
|
2488
|
+
**When it runs:** This filter is applied when loading starter templates in the email block editor. When `true`, templates with `/pro` or `/modern` in their IDs are excluded from the template picker.
|
|
2489
|
+
|
|
2490
|
+
**Parameters:**
|
|
2491
|
+
|
|
2492
|
+
- `$disable` (bool): Whether to disable Pro templates (default: `true`)
|
|
2493
|
+
|
|
2494
|
+
**Returns:** `bool` — Whether to filter out Pro email templates
|
|
2495
|
+
|
|
2496
|
+
**Source:** `app/Hooks/Handlers/FluentCartBlockEditorHandler.php:230`
|
|
2497
|
+
|
|
2498
|
+
**Usage:**
|
|
2499
|
+
|
|
2500
|
+
```
|
|
2501
|
+
add_filter('fluent_cart/disable_pro_email_templates', function ($disable) {
|
|
2502
|
+
// Enable Pro templates when Pro is active
|
|
2503
|
+
if (defined('FLUENT_CART_PRO')) {
|
|
2504
|
+
return false;
|
|
2505
|
+
}
|
|
2506
|
+
return $disable;
|
|
2507
|
+
});
|
|
2508
|
+
```
|
|
2509
|
+
|
|
2510
|
+
### ` skip_no_conflict (editor) `
|
|
2511
|
+
|
|
2512
|
+
`fluent_cart_editor/skip_no_conflict` Pro — Filter whether to skip script unloading in the block editor
|
|
2513
|
+
|
|
2514
|
+
**When it runs:** This filter is applied when the email block editor loads. FluentCart aggressively unloads third-party scripts to prevent conflicts. Return `true` to skip this behavior and allow all scripts.
|
|
2515
|
+
|
|
2516
|
+
**Parameters:**
|
|
2517
|
+
|
|
2518
|
+
- `$skip` (bool): Whether to skip no-conflict mode (default: `false`)
|
|
2519
|
+
|
|
2520
|
+
**Returns:** `bool` — Whether to skip unloading third-party scripts
|
|
2521
|
+
|
|
2522
|
+
**Source:** `app/Hooks/Handlers/FluentCartBlockEditorHandler.php:717`
|
|
2523
|
+
|
|
2524
|
+
**Usage:**
|
|
2525
|
+
|
|
2526
|
+
```
|
|
2527
|
+
add_filter('fluent_cart_editor/skip_no_conflict', function ($skip) {
|
|
2528
|
+
// Allow all scripts in the block editor
|
|
2529
|
+
return true;
|
|
2530
|
+
});
|
|
2531
|
+
```
|
|
2532
|
+
|
|
2533
|
+
### ` asset_listed_slugs (editor) `
|
|
2534
|
+
|
|
2535
|
+
`fluent_cart_editor/asset_listed_slugs` Pro — Filter approved script slugs in block editor
|
|
2536
|
+
|
|
2537
|
+
**When it runs:** This filter is applied when unloading third-party scripts from the email block editor. Only scripts matching these slug patterns (regex) will be kept.
|
|
2538
|
+
|
|
2539
|
+
**Parameters:**
|
|
2540
|
+
|
|
2541
|
+
- `$approvedSlugs` (array): Array of regex slug patterns to keep
|
|
2542
|
+
|
|
2543
|
+
```
|
|
2544
|
+
$approvedSlugs = [
|
|
2545
|
+
'\/gutenberg\/',
|
|
2546
|
+
];
|
|
2547
|
+
// 'fluent-cart' is always appended automatically
|
|
2548
|
+
```
|
|
2549
|
+
|
|
2550
|
+
**Returns:** `array` — The modified approved slugs array
|
|
2551
|
+
|
|
2552
|
+
**Source:** `app/Hooks/Handlers/FluentCartBlockEditorHandler.php:729`
|
|
2553
|
+
|
|
2554
|
+
**Usage:**
|
|
2555
|
+
|
|
2556
|
+
```
|
|
2557
|
+
add_filter('fluent_cart_editor/asset_listed_slugs', function ($approvedSlugs) {
|
|
2558
|
+
// Allow scripts from a specific plugin
|
|
2559
|
+
$approvedSlugs[] = '\/my-custom-plugin\/';
|
|
2560
|
+
return $approvedSlugs;
|
|
2561
|
+
});
|
|
2562
|
+
```
|
|
2563
|
+
|
|
2564
|
+
### ` skip_no_conflict (styles) `
|
|
2565
|
+
|
|
2566
|
+
`fluent_cart/skip_no_conflict` Pro — Filter whether to skip style unloading in the block editor
|
|
2567
|
+
|
|
2568
|
+
**When it runs:** This filter is applied when unloading third-party stylesheets from the email block editor. Return `true` to allow all styles to load without filtering.
|
|
2569
|
+
|
|
2570
|
+
**Parameters:**
|
|
2571
|
+
|
|
2572
|
+
- `$skip` (bool): Whether to skip no-conflict mode for styles (default: `false`)
|
|
2573
|
+
- `$type` (string): The asset type (`'styles'`)
|
|
2574
|
+
|
|
2575
|
+
**Returns:** `bool` — Whether to skip unloading third-party styles
|
|
2576
|
+
|
|
2577
|
+
**Source:** `app/Hooks/Handlers/FluentCartBlockEditorHandler.php:786`
|
|
2578
|
+
|
|
2579
|
+
**Usage:**
|
|
2580
|
+
|
|
2581
|
+
```
|
|
2582
|
+
add_filter('fluent_cart/skip_no_conflict', function ($skip, $type) {
|
|
2583
|
+
if ($type === 'styles') {
|
|
2584
|
+
return true; // Allow all styles
|
|
2585
|
+
}
|
|
2586
|
+
return $skip;
|
|
2587
|
+
}, 10, 2);
|
|
2588
|
+
```
|
|
2589
|
+
|
|
2590
|
+
### ` asset_listed_slugs (styles) `
|
|
2591
|
+
|
|
2592
|
+
`fluent_cart/asset_listed_slugs` Pro — Filter approved style slugs in block editor
|
|
2593
|
+
|
|
2594
|
+
**When it runs:** This filter is applied when filtering third-party stylesheets from the email block editor. Only styles matching these slug patterns (regex) will be kept.
|
|
2595
|
+
|
|
2596
|
+
**Parameters:**
|
|
2597
|
+
|
|
2598
|
+
- `$approvedSlugs` (array): Array of regex slug patterns to keep
|
|
2599
|
+
|
|
2600
|
+
```
|
|
2601
|
+
$approvedSlugs = [
|
|
2602
|
+
'\/gutenberg\/',
|
|
2603
|
+
];
|
|
2604
|
+
// '\/fluent-cart\/' is always appended automatically
|
|
2605
|
+
```
|
|
2606
|
+
|
|
2607
|
+
**Returns:** `array` — The modified approved slugs array
|
|
2608
|
+
|
|
2609
|
+
**Source:** `app/Hooks/Handlers/FluentCartBlockEditorHandler.php:799`
|
|
2610
|
+
|
|
2611
|
+
**Usage:**
|
|
2612
|
+
|
|
2613
|
+
```
|
|
2614
|
+
add_filter('fluent_cart/asset_listed_slugs', function ($approvedSlugs) {
|
|
2615
|
+
// Allow styles from a specific plugin
|
|
2616
|
+
$approvedSlugs[] = '\/my-custom-plugin\/';
|
|
2617
|
+
return $approvedSlugs;
|
|
2618
|
+
});
|
|
2619
|
+
```
|
|
2620
|
+
|
|
2621
|
+
### ` block_editor_unregister_all_patterns `
|
|
2622
|
+
|
|
2623
|
+
`fluent_cart/block_editor_unregister_all_patterns` Pro — Filter whether to unregister default block patterns
|
|
2624
|
+
|
|
2625
|
+
**When it runs:** This filter is applied when loading the email block editor. By default, all WordPress core block patterns are removed since they are designed for web pages, not emails.
|
|
2626
|
+
|
|
2627
|
+
**Parameters:**
|
|
2628
|
+
|
|
2629
|
+
- `$shouldUnregister` (bool): Whether to unregister patterns (default: `true`)
|
|
2630
|
+
- `$context` (string): The editor context
|
|
2631
|
+
- `$data` (array): Additional context data
|
|
2632
|
+
|
|
2633
|
+
**Returns:** `bool` — Whether to unregister default block patterns
|
|
2634
|
+
|
|
2635
|
+
**Source:** `app/Hooks/Handlers/FluentCartBlockEditorHandler.php:843`
|
|
2636
|
+
|
|
2637
|
+
**Usage:**
|
|
2638
|
+
|
|
2639
|
+
```
|
|
2640
|
+
add_filter('fluent_cart/block_editor_unregister_all_patterns', function ($shouldUnregister, $context, $data) {
|
|
2641
|
+
// Keep default patterns for a specific context
|
|
2642
|
+
if ($context === 'page') {
|
|
2643
|
+
return false;
|
|
2644
|
+
}
|
|
2645
|
+
return $shouldUnregister;
|
|
2646
|
+
}, 10, 3);
|
|
2647
|
+
```
|
|
2648
|
+
|
|
2649
|
+
### ` block_editor_settings `
|
|
2650
|
+
|
|
2651
|
+
`fluent_cart/block_editor_settings` Pro — Filter block editor settings
|
|
2652
|
+
|
|
2653
|
+
**When it runs:** This filter is applied when preparing the settings object for the Gutenberg-based email block editor. It includes styles, image sizes, block categories, and editor configuration.
|
|
2654
|
+
|
|
2655
|
+
**Parameters:**
|
|
2656
|
+
|
|
2657
|
+
- `$editor_settings` (array): Editor configuration array
|
|
2658
|
+
|
|
2659
|
+
```
|
|
2660
|
+
$editor_settings = [
|
|
2661
|
+
'__experimentalFeatures' => [...],
|
|
2662
|
+
'styles' => [...], // Editor stylesheets
|
|
2663
|
+
'defaultEditorStyles' => [...], // Base CSS
|
|
2664
|
+
'imageSizes' => [...], // Available image sizes
|
|
2665
|
+
'blockCategories' => [...], // Block categories
|
|
2666
|
+
];
|
|
2667
|
+
```
|
|
2668
|
+
|
|
2669
|
+
**Returns:** `array` — The modified editor settings
|
|
2670
|
+
|
|
2671
|
+
**Source:** `app/Hooks/Handlers/FluentCartBlockEditorHandler.php:1224`
|
|
2672
|
+
|
|
2673
|
+
**Usage:**
|
|
2674
|
+
|
|
2675
|
+
```
|
|
2676
|
+
add_filter('fluent_cart/block_editor_settings', function ($editor_settings) {
|
|
2677
|
+
// Add a custom block category
|
|
2678
|
+
$editor_settings['blockCategories'][] = [
|
|
2679
|
+
'slug' => 'custom-blocks',
|
|
2680
|
+
'title' => 'Custom Blocks',
|
|
2681
|
+
];
|
|
2682
|
+
return $editor_settings;
|
|
2683
|
+
});
|
|
2684
|
+
```
|
|
2685
|
+
|
|
2686
|
+
### ` editor_allowed_block_types `
|
|
2687
|
+
|
|
2688
|
+
`fluent_cart/editor_allowed_block_types` Pro — Filter allowed block types in the email editor
|
|
2689
|
+
|
|
2690
|
+
**When it runs:** This filter is applied when determining which Gutenberg block types are available in the email block editor. Only whitelisted blocks appear in the inserter.
|
|
2691
|
+
|
|
2692
|
+
**Parameters:**
|
|
2693
|
+
|
|
2694
|
+
- `$allowedBlockTypes` (array): Array of allowed block type names (e.g., `'core/paragraph'`, `'core/image'`, `'fluent-cart/button'`)
|
|
2695
|
+
- `$editorContext` (string): The editor context such as `'template'`, `'campaign'`, or `'recurring_campaign'`
|
|
2696
|
+
|
|
2697
|
+
**Returns:** `array` — The modified allowed block types array
|
|
2698
|
+
|
|
2699
|
+
**Source:** `app/Hooks/Handlers/FluentCartBlockEditorHandler.php:1385`
|
|
2700
|
+
|
|
2701
|
+
**Usage:**
|
|
2702
|
+
|
|
2703
|
+
```
|
|
2704
|
+
add_filter('fluent_cart/editor_allowed_block_types', function ($allowedBlockTypes, $editorContext) {
|
|
2705
|
+
// Add a custom block to the email editor
|
|
2706
|
+
$allowedBlockTypes[] = 'my-plugin/custom-email-block';
|
|
2707
|
+
return $allowedBlockTypes;
|
|
2708
|
+
}, 10, 2);
|
|
2709
|
+
```
|
|
2710
|
+
|
|
2711
|
+
---
|
|
2712
|
+
|
|
2713
|
+
## PDF Generation
|
|
2714
|
+
|
|
2715
|
+
### ` pdf_templates/mpdf_config `
|
|
2716
|
+
|
|
2717
|
+
`fluent_cart/pdf_templates/mpdf_config` — Filter the mPDF library configuration used to generate PDFs
|
|
2718
|
+
|
|
2719
|
+
**When it runs:** This filter is applied right before instantiating the mPDF renderer used for receipts and other PDF templates (requires FluentCart Pro + FluentPDF). It receives the config after defaults have already been merged in with `wp_parse_args()`.
|
|
2720
|
+
|
|
2721
|
+
**Parameters:**
|
|
2722
|
+
|
|
2723
|
+
- `$mpdfConfig` (array): mPDF constructor configuration (page format, margins, fonts, temp directory, etc.)
|
|
2724
|
+
|
|
2725
|
+
**Returns:** `array` — The modified mPDF configuration
|
|
2726
|
+
|
|
2727
|
+
**Source:** `app/Services/PDF/PdfGeneratorService.php:61`
|
|
2728
|
+
|
|
2729
|
+
**Usage:**
|
|
2730
|
+
|
|
2731
|
+
```
|
|
2732
|
+
add_filter('fluent_cart/pdf_templates/mpdf_config', function ($mpdfConfig) {
|
|
2733
|
+
// Use landscape orientation for all generated PDFs
|
|
2734
|
+
$mpdfConfig['orientation'] = 'L';
|
|
2735
|
+
return $mpdfConfig;
|
|
2736
|
+
});
|
|
2737
|
+
```
|
|
2738
|
+
|
|
2739
|
+
---
|
|
2740
|
+
|
|
2741
|
+
## Logging & Utilities
|
|
2742
|
+
|
|
2743
|
+
### ` logs/allowed_models `
|
|
2744
|
+
|
|
2745
|
+
`fluent_cart/logs/allowed_models` — Filter models allowed in activity logs
|
|
2746
|
+
|
|
2747
|
+
**When it runs:** This filter is applied when creating activity log entries. Only module names matching this list will have their model type auto-resolved for log categorization.
|
|
2748
|
+
|
|
2749
|
+
**Parameters:**
|
|
2750
|
+
|
|
2751
|
+
- `$allowedModels` (array): Array of allowed model name strings
|
|
2752
|
+
|
|
2753
|
+
```
|
|
2754
|
+
$allowedModels = [
|
|
2755
|
+
'order',
|
|
2756
|
+
'product',
|
|
2757
|
+
'productVariation',
|
|
2758
|
+
'user',
|
|
2759
|
+
'coupon',
|
|
2760
|
+
'subscription',
|
|
2761
|
+
];
|
|
2762
|
+
```
|
|
2763
|
+
|
|
2764
|
+
**Returns:** `array` — The modified allowed models array
|
|
2765
|
+
|
|
2766
|
+
**Source:** `boot/globals.php:88`
|
|
2767
|
+
|
|
2768
|
+
**Usage:**
|
|
2769
|
+
|
|
2770
|
+
```
|
|
2771
|
+
add_filter('fluent_cart/logs/allowed_models', function ($allowedModels) {
|
|
2772
|
+
// Add a custom model for logging
|
|
2773
|
+
$allowedModels[] = 'license';
|
|
2774
|
+
$allowedModels[] = 'customEntity';
|
|
2775
|
+
return $allowedModels;
|
|
2776
|
+
});
|
|
2777
|
+
```
|
|
2778
|
+
|
|
2779
|
+
### ` site_prefix `
|
|
2780
|
+
|
|
2781
|
+
`fluent_cart/site_prefix` — Filter site prefix for external APIs
|
|
2782
|
+
|
|
2783
|
+
**When it runs:** This filter is applied when generating a site-specific prefix string derived from the home URL. Used as an identifier when communicating with external APIs or services.
|
|
2784
|
+
|
|
2785
|
+
**Parameters:**
|
|
2786
|
+
|
|
2787
|
+
- `$sitePrefix` (string): The generated prefix (e.g., `'example_com'` from `https://example.com`)
|
|
2788
|
+
- `$data` (array): Additional context data (empty array)
|
|
2789
|
+
|
|
2790
|
+
**Returns:** `string` — The modified site prefix
|
|
2791
|
+
|
|
2792
|
+
**Source:** `app/Helpers/Helper.php:1685`
|
|
2793
|
+
|
|
2794
|
+
**Usage:**
|
|
2795
|
+
|
|
2796
|
+
```
|
|
2797
|
+
add_filter('fluent_cart/site_prefix', function ($sitePrefix, $data) {
|
|
2798
|
+
// Use a custom site identifier
|
|
2799
|
+
return 'my_store_prod';
|
|
2800
|
+
}, 10, 2);
|
|
2801
|
+
```
|
|
2802
|
+
|
|
2803
|
+
### ` utm/allowed_keys `
|
|
2804
|
+
|
|
2805
|
+
`fluent_cart/utm/allowed_keys` — Filter allowed UTM parameter keys
|
|
2806
|
+
|
|
2807
|
+
**When it runs:** This filter is applied when capturing UTM tracking parameters from the checkout URL. Only parameters matching these keys will be stored with orders.
|
|
2808
|
+
|
|
2809
|
+
**Parameters:**
|
|
2810
|
+
|
|
2811
|
+
- `$keys` (array): Array of allowed UTM parameter key names
|
|
2812
|
+
|
|
2813
|
+
```
|
|
2814
|
+
$keys = [
|
|
2815
|
+
'utm_campaign',
|
|
2816
|
+
'utm_content',
|
|
2817
|
+
'utm_term',
|
|
2818
|
+
'utm_source',
|
|
2819
|
+
'utm_medium',
|
|
2820
|
+
'utm_id',
|
|
2821
|
+
'refer_url',
|
|
2822
|
+
'fbclid',
|
|
2823
|
+
'gclid',
|
|
2824
|
+
];
|
|
2825
|
+
```
|
|
2826
|
+
|
|
2827
|
+
- `$data` (array): Additional context data (empty array)
|
|
2828
|
+
|
|
2829
|
+
**Returns:** `array` — The modified allowed keys array
|
|
2830
|
+
|
|
2831
|
+
**Source:** `app/Helpers/UtmHelper.php:34`
|
|
2832
|
+
|
|
2833
|
+
**Usage:**
|
|
2834
|
+
|
|
2835
|
+
```
|
|
2836
|
+
add_filter('fluent_cart/utm/allowed_keys', function ($keys, $data) {
|
|
2837
|
+
// Track additional parameters
|
|
2838
|
+
$keys[] = 'msclkid'; // Microsoft Ads
|
|
2839
|
+
$keys[] = 'ttclid'; // TikTok Ads
|
|
2840
|
+
$keys[] = 'affiliate_id';
|
|
2841
|
+
return $keys;
|
|
2842
|
+
}, 10, 2);
|
|
2843
|
+
```
|
|
2844
|
+
|
|
2845
|
+
### ` cleanup/old_carts_days `
|
|
2846
|
+
|
|
2847
|
+
`fluent_cart/cleanup/old_carts_days` — Filter days before abandoned cart cleanup
|
|
2848
|
+
|
|
2849
|
+
**When it runs:** This filter is applied during the daily scheduled cleanup task. Carts older than this number of days (based on `updated_at`) are automatically deleted.
|
|
2850
|
+
|
|
2851
|
+
**Parameters:**
|
|
2852
|
+
|
|
2853
|
+
- `$days` (int): Number of days before cart deletion (default: `30`)
|
|
2854
|
+
|
|
2855
|
+
**Returns:** `int` — The modified number of days
|
|
2856
|
+
|
|
2857
|
+
**Source:** `app/Hooks/Scheduler/AutoSchedules/DailyScheduler.php:32`
|
|
2858
|
+
|
|
2859
|
+
**Usage:**
|
|
2860
|
+
|
|
2861
|
+
```
|
|
2862
|
+
add_filter('fluent_cart/cleanup/old_carts_days', function ($days) {
|
|
2863
|
+
// Keep abandoned carts for 90 days instead of 30
|
|
2864
|
+
return 90;
|
|
2865
|
+
});
|
|
2866
|
+
```
|
|
2867
|
+
|
|
2868
|
+
### ` frontend_assets/should_load_global `
|
|
2869
|
+
|
|
2870
|
+
`fluent_cart/frontend_assets/should_load_global` — Filter whether FluentCart's global frontend assets should load on the current page
|
|
2871
|
+
|
|
2872
|
+
**When it runs:** This filter is applied when deciding whether to enqueue FluentCart's shared frontend CSS/JS bundle on the current page — independent of whether a specific FluentCart page type (shop, checkout, etc.) is detected. Use it to force assets to load on a page FluentCart wouldn't otherwise recognize (e.g. a custom template embedding a shortcode).
|
|
2873
|
+
|
|
2874
|
+
**Parameters:**
|
|
2875
|
+
|
|
2876
|
+
- `$shouldLoad` (bool): The default decision (`true`)
|
|
2877
|
+
- `$context` (array): Context data
|
|
2878
|
+
|
|
2879
|
+
```
|
|
2880
|
+
$context = [
|
|
2881
|
+
'page_type' => 'shop', // TemplateService::getCurrentFcPageType()
|
|
2882
|
+
'is_marked' => false, // Whether assets were explicitly marked required elsewhere in the request
|
|
2883
|
+
'is_fluentcart_context' => true,
|
|
2884
|
+
'is_instant_checkout' => false,
|
|
2885
|
+
'is_modal_checkout' => false,
|
|
2886
|
+
];
|
|
2887
|
+
```
|
|
2888
|
+
|
|
2889
|
+
**Returns:** `bool` — Whether the global frontend assets should be enqueued
|
|
2890
|
+
|
|
2891
|
+
**Source:** `app/Modules/Templating/AssetLoader.php:44`
|
|
2892
|
+
|
|
2893
|
+
**Usage:**
|
|
2894
|
+
|
|
2895
|
+
```
|
|
2896
|
+
add_filter('fluent_cart/frontend_assets/should_load_global', function ($shouldLoad, $context) {
|
|
2897
|
+
// Force-load assets on a custom landing page template that embeds a shortcode
|
|
2898
|
+
if (is_page_template('templates/custom-landing.php')) {
|
|
2899
|
+
return true;
|
|
2900
|
+
}
|
|
2901
|
+
return $shouldLoad;
|
|
2902
|
+
}, 10, 2);
|
|
2903
|
+
```
|
|
2904
|
+
|
|
2905
|
+
### ` util/countries `
|
|
2906
|
+
|
|
2907
|
+
`fluent_cart/util/countries` — Filter the countries list used in address selectors
|
|
2908
|
+
|
|
2909
|
+
**When it runs:** Fires when building the country dropdown options shown in checkout, store settings, and address forms.
|
|
2910
|
+
|
|
2911
|
+
**Parameters:**
|
|
2912
|
+
|
|
2913
|
+
- `$options` (array): Country options (value/label pairs) from the localization service
|
|
2914
|
+
- `$data` (array): Additional context data (empty array)
|
|
2915
|
+
|
|
2916
|
+
**Returns:** `array` — The modified country options array
|
|
2917
|
+
|
|
2918
|
+
**Source:** `app/Helpers/Helper.php:1347`
|
|
2919
|
+
|
|
2920
|
+
**Usage:**
|
|
2921
|
+
|
|
2922
|
+
```
|
|
2923
|
+
add_filter('fluent_cart/util/countries', function ($options, $data) {
|
|
2924
|
+
// Remove a country from the address selector
|
|
2925
|
+
return array_filter($options, function ($option) {
|
|
2926
|
+
return $option['value'] !== 'XX';
|
|
2927
|
+
});
|
|
2928
|
+
}, 10, 2);
|
|
2929
|
+
```
|
|
2930
|
+
|
|
2931
|
+
### ` get_dynamic_search_{$key} `
|
|
2932
|
+
|
|
2933
|
+
`fluent_cart/get_dynamic_search_{$key}` — Filter dynamic search option results
|
|
2934
|
+
|
|
2935
|
+
**When it runs:** This filter is applied when the admin settings page performs a dynamic search (e.g., searching for pages, users, or custom entities in select fields). The `{$key}` portion is the `search_for` parameter value.
|
|
2936
|
+
|
|
2937
|
+
**Parameters:**
|
|
2938
|
+
|
|
2939
|
+
- `$results` (array): Search results (default: `[]`)
|
|
2940
|
+
- `$context` (array): Search context
|
|
2941
|
+
|
|
2942
|
+
```
|
|
2943
|
+
$context = [
|
|
2944
|
+
'searchBy' => 'search term entered by user',
|
|
2945
|
+
];
|
|
2946
|
+
```
|
|
2947
|
+
|
|
2948
|
+
**Returns:** `array` — The search results array
|
|
2949
|
+
|
|
2950
|
+
**Source:** `api/Helper.php:165`
|
|
2951
|
+
|
|
2952
|
+
**Usage:**
|
|
2953
|
+
|
|
2954
|
+
```
|
|
2955
|
+
// Example: Register a dynamic search handler for "custom_entities"
|
|
2956
|
+
add_filter('fluent_cart/get_dynamic_search_custom_entities', function ($results, $context) {
|
|
2957
|
+
$searchTerm = $context['searchBy'];
|
|
2958
|
+
// Return matching entities
|
|
2959
|
+
return [
|
|
2960
|
+
['id' => 1, 'label' => 'Entity One'],
|
|
2961
|
+
['id' => 2, 'label' => 'Entity Two'],
|
|
2962
|
+
];
|
|
2963
|
+
}, 10, 2);
|
|
2964
|
+
```
|
|
2965
|
+
|
|
2966
|
+
---
|