Connect WordPress SDK to Bento.

The Bento WordPress SDK repo for developers who want WooCommerce events, site tracking, and wp_mail() delivery handled by one plugin.

WordPress SDKBento
WordPress SDK to Bento
  • $OrderPlaced

    dana@example.com

    Recordednow
  • $thrive.optin.{form_identifier}

    sam@example.com

    Recorded2s ago
  • $SubscriptionCreated

    omar@example.com

    Recorded5s ago
  • $OrderPlaced

    priya@example.com

    Recorded7s ago
Listening for WordPress SDK data

Built by

Bento

Type

SDK

Category

Developer

Setup

5 steps

How it works.

The WordPress SDK is the repo behind the Bento Helper plugin. It sends events from WooCommerce, WooCommerce Subscriptions, LearnDash, Easy Digital Downloads, SureCart, and form plugins, and can load Bento.js for site tracking.

It also hooks into the native wp_mail() function, so password resets, new user notices, and WooCommerce order confirmations go out through Bento. Emails with attachments fall back to WordPress mail.

Set it up in five steps.

  1. 1

    Get the latest release

    Download the source zip from the latest bento-wordpress-sdk release on GitHub and upload it in Plugins > Add New. The plugin is not listed on WordPress.org.

  2. 2

    Add your API keys

    Open Bento in the WordPress admin menu and enter your Site Key, Publishable Key, and Secret Key from the Bento teams screen. Click Save & Validate Connection.

  3. 3

    Route wp_mail() through Bento

    Turn on Enable Transactional Emails. Then pick a From Email from the list of your Bento authors.

  4. 4

    Send a test event

    Turn on Debug Logging, then click Test Event. The plugin sends a $test_event event to Bento so you can confirm the keys work.

  5. 5

    Turn off debug logging for production

    Debug logging writes to wp-content/debug.log. It is verbose, so turn it off in production.

What syncs.

  • $OrderPlacedInto Bento

    Sent when a WooCommerce order is marked completed, with the order total added to lifetime value.

  • $SubscriptionCreatedInto Bento

    Sent when a WooCommerce subscription is created at checkout, in any status.

  • learndash_course_completedInto Bento

    Sent when a LearnDash user completes a course.

  • $thrive.optin.{form_identifier}Into Bento

    The event format for ThriveLeads opt-ins, ending in the form identifier.

  • Page viewsInto Bento

    Site Tracking loads Bento.js on your site so page views reach Bento.

  • wp_mail() messagesFrom Bento

    WordPress email is delivered by Bento as transactional email instead of local mail.

Send a custom event from your theme.

functions.php
add_action( 'user_register', function ( $user_id ) {
  if ( ! class_exists( 'Bento_Events_Controller' ) ) {
    return;
  }

  $user = get_userdata( $user_id );

  // Adds the user's name, login, and roles as fields.
  Bento_Events_Controller::trigger_event(
    $user_id,
    '$UserRegistered',
    $user->user_email,
    array( 'source' => 'wordpress' )
  );
} );

What you can build with WordPress SDK.

The data lands on the person, so segments, tags, and flows can use it right away.

Profiles stay current.

Ddana@example.comSubscribed
WordPress SDKuserpost-purchase
Events47
  • $OrderPlacedJust now
  • $thrive.optin.{form_identifier}2m ago
  • $SubscriptionCreated1h ago

Flows start when the data arrives.

  • Post-purchase

    When $OrderPlaced

    Live
  • Subscription onboarding

    When $SubscriptionCreated

    Live
  • Opt-in welcome

    When ThriveLeads opt-in

    Live
  • Laravel News
  • Examine
  • Less Annoying CRM
  • Geocodio
  • Authority Hacker
  • HeadshotPro
  • QuickMail

More integrations.

Segment

Developer

Forward your Segment track events to Bento with a destination function and use them to start automations.

Webhooks

Developer

Call your own endpoints from Bento workflow steps, and send events from any system into Bento to start automations.

JavaScript

Developer

Track page views, events, tags, and fields from your website so Bento can start flows when visitors act.

Questions about WordPress SDK.

Which WordPress email skips Bento?
Emails with attachments fall back to WordPress mail. Every other wp_mail() call goes through Bento while transactional email is on, including mail from other plugins.
Can transactional email reach unsubscribed users?
The settings include a Transactional Override toggle for this. Use it with care, because spam reports from those recipients hurt your sending reputation.
Can my theme send its own events?
Yes. Call Bento_Events_Controller::trigger_event() with a user ID, event name, email, and optional details and fields. The plugin uses the same method for its form integrations.
Does the WordPress SDK integration cost extra?
No. The SDKs and the Events API come with your Bento account. Marketing Platform starts at $29/mo for up to 5,000 active users, with a 30-day free trial.

Connect WordPress SDK in your free trial.

Free for 30 days. Move your lists, flows, and templates with help from a human.