Main Header

Loading SignalPress Safely

Updated on July 30, 2026

SignalPress boots on plugins_loaded at priority 5. Other plugins must not call sp_capture() at file scope because WordPress does not guarantee plugin load order.

Once you understand Capturing Events with sp_capture(), wire calls through hooks instead. New sites should finish Setup & Activating SignalPress before adding capture calls.

Preferred hook: signalpress/ready

PHP

add_action(
	'signalpress/ready',
	function () {
		sp_capture( 'integration ready' );
	}
);

signalpress/ready fires after core APIs and bundled services are initialized.

Other safe hooks

Themes and plugins can also capture from:

  • init — general WordPress bootstrap
  • Application-specific actions after your plugin registers its own logic
  • Admin or REST callbacks where SignalPress is already loaded

Avoid calling SignalPress from bare plugins_loaded handlers in *other* plugins unless you run at priority 6 or later, or use signalpress/ready.

After capture, inspect results in Connection Tests and Delivery Log or Your First Connection Test.

Guard optional integrations

For code that must survive when SignalPress is inactive:

PHP

if ( function_exists( 'sp_capture' ) ) {
	sp_capture( 'order completed', [ 'order_id' => 123 ] );
}

This pattern keeps your plugin activatable without a hard dependency on SignalPress. Limit destinations with Service Targeting when SignalPress is present.

Custom service registration (Tier 2)

External integration plugins should register on signalpress/register_services from the integration’s main plugin file. SignalPress only invokes the custom registration API when the site has Tier 2 or higher access. See Custom integrations and Extending SignalPress.

Tier requirements and hooks: Free vs SignalPress Pro and Hooks and Filters.

Pro plugin load order

SignalPress Pro must load after the free plugin. Both should be active before calling Pro-only APIs or premium service IDs.