DOCS

WooCommerce integration

Fundations Pro can create WooCommerce orders linked to donations. This is a fulfillment and reporting integration, not an alternative payment gateway. Donors still pay through Mollie, Stripe, or PayPal. WooCommerce order records are created as a side-effect after payment completes.

> Requires: Fundations Pro, WooCommerce

Woocommerce donation order admin

Why use this integration

Use the WooCommerce integration when:

  • You want to offer physical or digital products alongside donations (for example, a thank-you gift or campaign merchandise).
  • Your fulfillment workflow relies on WooCommerce orders.
  • You need donation data in WooCommerce reports.
  • You run a zero-amount campaign (leads) and want a WooCommerce order created for follow-up.

If you only need to accept donations without product fulfillment, you do not need this integration.

What it does

Product association

WooCommerce products can be linked to Fundations campaigns. A product flagged as Fund-enabled appears in a product selector on the donation page. Donors can choose products alongside their donation amount. The selected products are stored with the donation record.

Products can be scoped to specific campaigns or shown on all campaign pages.

Order creation (two-phase)

When a donor submits the donation form and products are selected, Fundations creates WooCommerce orders in two steps:

  1. When the donation status becomes pending, a WooCommerce order in pending status is created. The order ID is saved to the donation record. This step is idempotent; if an order already exists, it is not created again.
  2. When the donation status changes to paid (the get_fund_donation_completed action fires), the pending order is completed by calling WooCommerce’s payment_complete() method.

In test mode, or when no pending order exists at completion time, Fundations creates and immediately completes the order in a single step.

Leads mode

If the donation status is leads (used for zero-amount campaign submissions), a WooCommerce order is created in pending status but payment_complete() is not called. This lets you use WooCommerce for follow-up fulfillment without a payment transaction.

Customer emails

All standard WooCommerce customer-facing emails are suppressed for orders linked to Fundations donations. This includes processing, completed, on-hold, refunded, cancelled, customer note, and invoice emails. Fundations sends its own donation confirmation email instead.

Admin-facing WooCommerce emails are not affected.

Admin integration

  • A WooCommerce order column appears in the Fundations donations list, showing the linked order ID.
  • A WooCommerce tab is added to the Fundations donation meta box in the admin.
  • A “Fundations Donation Order” meta box appears on the WooCommerce order edit screen, showing the linked donor, amount, and campaign.
  • The integration supports both WooCommerce’s legacy post-based orders and HPOS (High-Performance Order Storage).

Donation confirmation email

If a donation includes products, a product table is appended to the Fundations donation confirmation email.

How to set it up

Enable the integration

  1. Confirm WooCommerce is installed and activated.
  2. Confirm your Fundations Pro license is active.
  3. Confirm at least one payment gateway (Mollie, Stripe, or PayPal) is configured.

Enable a product for Fund checkouts

  1. In WordPress, go to WooCommerce, then Products and open a product.
  2. In the Product Data panel, open the Fundations tab.
  3. Set Enable in Fund Checkout to yes.
  4. Optionally enter a description to display on the campaign page instead of the product’s WooCommerce description.
  5. To show the product only on specific campaigns, enable Specific Fundations and search for the campaigns by name.
  6. Save the product.
Woocommerce product fund tab

Add blocks to a campaign page

  1. Open a campaign page in the block editor.
  2. Add the Fundations Product Selector block to show available products.
  3. Optionally add the Fundations Checkout Button block to link to a dedicated checkout page.
  4. Configure the checkout page ID in Fundations settings if using the Checkout Button.
Product selector block editor

Blocks reference

Product Selector (get-fund/product-selector)

Shows WooCommerce products enabled for the current campaign. Donors can select products to add to their donation.

AttributeDescriptionValues
titleBlock heading textstring
showTitleShow or hide the headingbool
columnsColumn layout (stored but rendered as a single column in current version)int
imageSizeProduct image sizethumbnail or medium
priceColorPrice text colorCSS color

Checkout Button (get-fund/checkout-button)

A styled button linking to the Fundations checkout page.

AttributeDescription
buttonTextLabel shown on the button
buttonColorBackground color
buttonTextColorText color
buttonHoverColorBackground color on hover
buttonSizesmall, medium, or large
alignmentHorizontal alignment
borderRadiusCorner radius in px
checkoutPageUrlURL override for the checkout page
fullWidthStretch button to full container width
isOutlineRender as an outline button
borderThicknessOutline border width in px
borderColorOutline border color
outlineTextColorText color for outline variant
outlineHoverTextColorText color on hover for outline variant

Settings reference

Option keyDescription
get_fund_fundations_checkout_page_idWP page ID for the checkout button target page
get_fund_totals_products_labelLabel for the products line in totals (default: “Products”)
get_fund_totals_donation_labelLabel for the donation line in totals (default: “Donation”)
get_fund_totals_total_labelLabel for the total line (default: “Total”)
get_fund_totals_products_total_labelLabel for the products subtotal line (default: “Products Total:”)

Product meta keys

Meta keyValueNotes
_get_fund_checkout_enabledyes or noEnables the product for Fund pages
_get_fund_checkout_descriptionrich textReplaces WooCommerce description on Fund pages
_get_fund_specific_actionsyes or noScope to specific campaigns
_get_fund_selected_actionsarray of post IDsRequired when specific mode is yes

What you can and cannot do

You can:

  • Associate WooCommerce products with donations and create linked WC orders after payment.
  • Scope products to specific campaigns or all campaigns.
  • Use WooCommerce fulfillment, shipping, and order management for donation-linked products.
  • Create pending WC orders for zero-amount lead submissions.
  • View the linked WC order from the Fundations admin, and the donation from the WC order admin.

You cannot:

  • Route donation payments through WooCommerce checkout. Payment processing happens through Mollie, Stripe, or PayPal. WooCommerce is not in the payment flow.
  • Add donation products to the WooCommerce cart. There is no cart integration; products are selected in the Fundations donation form and the WC order is created programmatically.
  • Sync WooCommerce order status changes back to the donation. The integration is one-directional: donation completion updates the WC order, but changes to WC order status do not update the donation.
  • Use WooCommerce Subscriptions for recurring donations. There is no WooCommerce Subscriptions integration. Recurring donations via Mollie mandates are a separate feature that is currently disabled.
  • Receive standard WooCommerce customer emails for Fund-linked orders. All customer-facing WC emails are suppressed; Fundations sends its own confirmation.

Troubleshooting

WC order not created after donation is paid

The order is created when the get_fund_donation_completed action fires. Confirm the payment gateway (Mollie, Stripe, or PayPal) is firing this action correctly. Check the PHP error log for WooCommerce order creation failures. Confirm WooCommerce is active and the product exists.

Product not appearing on the campaign page

Confirm _get_fund_checkout_enabled is set to yes on the product. If the product is scoped to specific campaigns, verify the campaign post ID is in _get_fund_selected_actions. The Product Selector block reads the ?fund_action= URL parameter to determine which campaign’s products to show; confirm the block is on a page where this parameter is set.

Duplicate WC orders

Order creation is idempotent in the pending phase: if _get_donation_wc_order_id already exists on the donation, a second order is not created. If you are seeing duplicates, check whether a third-party plugin or custom code is also calling the order creation function.

Donor receiving WooCommerce emails

The integration suppresses all standard WooCommerce customer emails for orders with a _get_fund_donation_id meta value. If a donor is still receiving WC emails, confirm the order has this meta key set. If a third-party WooCommerce email plugin is active, it may bypass these filters.

Product images not displaying correctly

The imageSize block attribute accepts thumbnail or medium. If images appear at an unexpected size, confirm the correct value is set in the block attributes.

Developer reference

Hooks consumed by the integration

HookWhenWhat happens
get_fund_donation_status_transitionStatus changes to pendingCreates a pending WC order if none exists
get_fund_donation_completedDonation paidCompletes the pending WC order via payment_complete()

Hooks fired by the integration

HookTypeParametersDescription
get_fund_wc_order_createdAction$wc_order_id (int), $donation_id (int)Fired after a WC order is created in either phase

Filters

FilterParametersDescriptionSince
get_fund_wc_product_data$products (array of {id, quantity}), $donation_id (int), $action_id (int)Modify the product array before adding items to the WC order1.1.0
get_fund_donation_email_content$content (string), $donation_id (int)WooCommerce integration appends a product table to the Fundations confirmation email1.0.0

WooCommerce email suppression filters

The integration returns false for the following WooCommerce filters when the order has a _get_fund_donation_id meta value:

  • woocommerce_email_enabled_customer_processing_order
  • woocommerce_email_enabled_customer_on_hold_order
  • woocommerce_email_enabled_customer_completed_order
  • woocommerce_email_enabled_customer_refunded_order
  • woocommerce_email_enabled_cancelled_order
  • woocommerce_email_enabled_customer_note
  • woocommerce_email_enabled_customer_invoice

To re-enable a specific email type for Fund orders, add your own filter at a later priority.

AJAX endpoints

ActionAuthDescription
get_fund_search_actionsLogged-in admin, nonce get_fund_search_actionsSearch for Fundations campaigns by title (used in product scoping UI)
get_fund_get_checkout_productsPublic, no nonceReturns the product list for a given action_id

Donation meta keys set by the integration

Meta keyTypeNotes
_get_donation_productsarray of {id, quantity}Products selected during donation
_get_donation_wc_order_idintLinked WooCommerce order ID

WC order meta keys set by the integration

Meta keyTypeNotes
_get_fund_donation_idintLinked Fundations donation ID
_get_fund_action_idintLinked campaign (Fundation) post ID