Documentation

ShopMagic Twilio hooks

Verified with ShopMagic for Twilio 2.1.29 and ShopMagic 4.8.9.

Legacy filter: shopmagic/twilio/send_sms/remote_post_args#

This filter is not called in ShopMagic for Twilio 2.1.29. SMS messages are sent through the Twilio SDK.

shopmagic/core/action/before_execution#

Runs before an action executes. This is a ShopMagic core hook and applies to all action types.

Arguments, in order:

  1. $action — action instance.
  2. $automation — automation instance.
  3. $event — event instance.

To modify Twilio SMS fields, check that $action is an instance of \WPDesk\ShopMagicTwilio\Action\TwilioSendSms. Access its field values through $action->get_parameters().

Field key Value
target_phone Recipient number.
target_from Sender number or alphanumeric sender.
message Message content.

Placeholders are processed during SMS execution, after this hook.

Sender precedence: When Messaging Service SID is configured, the action sends messagingServiceSid instead of from. Changing target_from does not override this setting.

Not the solution you are looking for?

Please check other articles or open a support ticket.