WordPress Integration Guide
This guide walks you through integrating the Frak Components into your WordPress site (with or without WooCommerce) to enable referral acquisition, reward-aware sharing, and purchase tracking.
The Frak plugin works on both classic and block themes and ships each Frak component as a Gutenberg block, a shortcode, and a sidebar widget — so you can drop them in from the Block Editor, the Classic Editor, a page builder, or a widget area.
Prerequisites
Before you begin, ensure that:
- You have a merchant account on the Frak business dashboard. Your main domain is registered automatically at sign-up — nothing else to enable on the Frak side.
- You have admin access to your WordPress site.
- Your WordPress site meets the plugin minimums: WordPress 6.4+ and PHP 8.0+.
- (Optional, for purchase tracking) WooCommerce is installed and active. The plugin is HPOS-compatible.
Step 2: Generate the WooCommerce webhook secret
Frak uses a standard HMAC-signed webhook to receive order updates from WooCommerce. The secret is owned by business.frak.id (single source of truth) — the dashboard generates it for you, you paste it into the WordPress plugin, and the plugin provisions the WooCommerce webhook automatically.
- Log in to the Frak Business Dashboard.
- Open your merchant and navigate to Purchase Tracker.
- Select WooCommerce, then click Register at the bottom — the dashboard automatically generates a Webhook Secret for you.
- Copy the generated secret and keep the dashboard tab open — you'll paste it in Step 4.
Step 3: Install and activate the Frak plugin
-
Download the latest
frak-integration.zipfrom the Frak Wallet releases. Pick the newest asset taggedwordpress-<version>. -
Go to your WordPress admin panel. (Log in to your WordPress account, then go to Plugins → Add New Plugin → Upload Plugin.)
-
Upload the
frak-integration.zipfile and click Install Now. -
Click Activate to activate the Frak plugin.
Step 4: Configure the plugin
-
In your WordPress admin panel, go to Settings → Frak.
-
Under Website Information, fill in:
- App Name — defaults to your site name. Click Use Site Name to auto-fill.
- Logo URL — defaults to your site icon. Click Use Site Icon to auto-fill, or upload a logo.
- Under Purchase Tracking → Webhook Configuration:
- Paste the secret you copied in Step 2 into Webhook Secret.
- Confirm the Merchant row shows
✓ Connected: <your merchant name>. If it says✗ Not resolved for this domain, check that your site's domain is registered on the dashboard (main domain works automatically; subdomains need to be added under Allowed Domains), then click Refresh Merchant.
- Click Save Settings.
Step 5: Provision the WooCommerce webhook
The plugin wires a native WC_Webhook (visible under WooCommerce → Settings → Advanced → Webhooks) so WooCommerce owns retry, delivery logging, and admin visibility. You no longer create the webhook manually.
-
Scroll to the WooCommerce Webhook section on the Frak settings page.
-
Click Set up webhook. The button is disabled until the merchant is resolved and the secret is saved — if it's disabled, re-check Step 4.
-
Confirm the green banner:
✓ WooCommerce webhook active — order updates are being delivered to Frak.The Secret in WooCommerce row should read✓ matches the secret saved above.
That's the full attribution setup — WooCommerce will now forward order updates to Frak, with retries and delivery logs handled by WooCommerce itself.
Step 6: Place the Frak Components
The plugin exposes three components — each available as a Gutenberg block, a shortcode, a sidebar widget, and an Elementor widget. Pick the surface that fits your theme.
| Component | Block | Shortcode | Widget |
|---|---|---|---|
| Share button — docs | frak/share-button | [frak_share_button] | Frak Share Button |
| Banner — docs | frak/banner | [frak_banner] | Frak Banner |
| Post-purchase card — docs | frak/post-purchase | [frak_post_purchase] | Frak Post-Purchase |
Block Editor (block theme or Gutenberg)
- Open the post, page, or template part in the Block Editor (for FSE: Appearance → Editor).
- Click the
+where you want the component and search forFrak. - Pick Frak Share Button, Frak Banner, or Frak Post-Purchase.
- Tune the attributes in the block sidebar (button style, click action, reward display…), then save.
Classic Editor, page builders, or PHP templates
Use the matching shortcode. Attribute names are snake_case and mirror the block attributes:
[frak_share_button text="Share and earn!" button_style="primary" click_action="sharing-page" use_reward="1"]
[frak_banner]
[frak_post_purchase variant="referrer"]From a theme template you can also call do_shortcode():
echo do_shortcode( '[frak_share_button text="Share & earn"]' );Classic themes — sidebar / footer widget
Go to Appearance → Widgets, pick the target sidebar, and add Frak Share Button, Frak Banner, or Frak Post-Purchase. Each widget exposes the same attributes as the matching block via a simple form UI.
Elementor
If your site is built with Elementor, the plugin registers a Frak widget category in the editor. Drag Frak Share Button, Frak Banner, or Frak Post-Purchase from the left panel onto the canvas; the controls in the right sidebar mirror the block attributes.
Troubleshooting
- Merchant says "Not resolved for this domain" — Add the current site's host under Merchant → Allowed Domains on
business.frak.id, then click Refresh Merchant on the plugin settings page. - Webhook delivery stopped after a domain change — Same fix: add the new domain and click Refresh Merchant. The webhook URL is automatically re-pointed to the new domain.
- Webhook section shows "Secret does not match" — Re-copy the secret from the dashboard's Purchase Tracker → WooCommerce section, paste it back in Settings → Frak, save, then click Sync webhook.
- Delivery logs — Under WooCommerce → Status → Logs, select source
webhooks-delivery. - Vendor folder missing admin notice — You unzipped a developer checkout instead of the packaged release. Download the
frak-integration.zipfrom the releases page.