Blueness Store
shopping_cart
Sign In

API Reference

v1.0.1

Last updated 1 month ago

Developer Reference: Hooks & Filters

This reference list covers all the available hooks for the WooCommerce Order Tracker plugin.

🪝 Actions

bot_dispatch_notifications

Triggered after all notifications for a specific stage change have been dispatched.

  • Parameters:

    • $order_id (int): The ID of the WooCommerce order.

    • $stage_id (string): The ID of the stage the order just entered.

bot_render_sms_provider_fields

Fires inside the SMS settings table. Use this to render configuration fields for your custom SMS provider.

  • Parameters:

    • $settings (array): The current SMS notification settings array.

bot_render_whatsapp_provider_fields

Fires inside the WhatsApp settings table. Use this to render configuration fields for your custom WhatsApp provider.

  • Parameters:

    • $settings (array): The current WhatsApp notification settings array.

bot_render_notification_tab_{$active_tab}

Fires when a non-core notification tab is active. Use this to render the settings UI for custom channels.

  • Parameters: None. (Access settings via get_option).


🔍 Filters

bot_active_channels

Defines the list of active notification channels.

  • Default: ['email', 'sms', 'whatsapp']

  • Returns: array

bot_notification_tabs

Defines the tabs displayed on the Notification settings page.

  • Default: ['email', 'sms', 'whatsapp', 'templates']

  • Returns: array (associative: id => Label)

bot_sms_providers

Registers available SMS gateway providers.

  • Default: ['africas_talking', 'twilio']

  • Returns: array (associative: id => Label)

bot_whatsapp_providers

Registers available WhatsApp Business API providers.

  • Default: ['meta_direct', 'twilio']

  • Returns: array (associative: id => Label)

bot_default_templates

Filters the default notification templates used when a new stage is created.

  • Parameters:

    • $defaults (array): The default templates array.

    • $stage_id (string): The ID of the stage.

    • $stage_name (string): The display name of the stage.

bot_notification_factory_make

Filters the result of the Notification Factory. Use this to return a custom Notification object.

  • Parameters:

    • $notification (Notification|null): The notification object.

    • $channel (string): The channel name.

    • $order (WC_Order): The order object.

    • $stage (array): The stage details.

bot_notifier_factory_make

Filters the result of the Notifier Factory. Use this to return a custom Notifier object.

  • Parameters:

    • $notifier (Notifier|null): The notifier object.

    • $channel (string): The channel name.