Skip to content

Data & Storage

These values are part of the public integration surface:

IdentifierValue
Namespace rootWPAnchorBay\UpsellBay\
Text domainupsellbay
Plugin slugupsellbay
REST namespaceupsellbay/v1
Option prefixupsellbay_
Offer and attribution meta prefix_ub_
Hook prefixupsellbay_
Offer post typeupsellbay_offer
Stats table suffixupsellbay_offer_stats_daily
Action Scheduler groupupsellbay
  • Offers are stored in the private upsellbay_offer post type.
  • Configuration is stored as _ub_ post meta.
  • External code should create or normalize offer payloads through the plugin schema, not by guessing raw meta.

Core fields external integrations usually care about:

Meta keyPurpose
_ub_offer_typePlacement type: checkout, product, cart, or thank-you
_ub_statusDraft, paused, or active state
_ub_offer_product_idProduct being offered
_ub_discount_typeDiscount mode
_ub_discount_valueDiscount amount
_ub_headlineShopper-facing title
_ub_rulesNormalized eligibility rules
_ub_rules_matchall or any rule logic
_ub_placement_configPlacement-specific configuration
_ub_hide_if_in_cartWhether to hide the offer if the product is already in cart
_ub_priorityLower numbers render first
  • Global plugin settings are stored in the single option upsellbay_settings.
  • Aggregate daily analytics are stored in {$wpdb->prefix}upsellbay_offer_stats_daily.
  • The table is non-PII by design and is meant for reporting, not customer history reconstruction.
  • Operational logs are stored in {$wpdb->prefix}upsellbay_logs.
  • UpsellBay stores accepted offers, dismissed offers, cart item keys, placement context, and hashed validation tokens in the WooCommerce session.
  • Session storage should not contain email addresses, phone numbers, license keys, or payment identifiers.

UpsellBay writes order and order-item attribution through WooCommerce CRUD objects, not direct SQL.

Key attribution meta includes:

  • _ub_offer_id
  • _ub_offer_type
  • _ub_offer_placement
  • _ub_discount_type
  • _ub_discount_amount
  • _ub_source_context
  • _ub_source_order_id
  • _ub_source_offer_id
  • _ub_follow_on_order
  • Use WooCommerce CRUD APIs for orders and order items.
  • Do not write directly to HPOS tables, wp_postmeta, or order item meta tables.
  • Do not store customer PII in custom analytics or session extensions.
  • Use the documented import/export flow for portable offer templates.