Skip to content

Instantly share code, notes, and snippets.

@fernandoacosta
Last active April 27, 2018 02:58
Show Gist options
  • Save fernandoacosta/50528f8b29274cf408e65306455c375e to your computer and use it in GitHub Desktop.
Save fernandoacosta/50528f8b29274cf408e65306455c375e to your computer and use it in GitHub Desktop.
Adicionar tags a um contato no mautic!
add_action( 'init', 'mautic_add_tag' );
function mautic_add_tag() {
$email = '[email protected]';
$api_data = AP_Mautic_Api::get_api_method_url( $email );
$url = $api_data['url'];
$method = $api_data['method'];
$body = array(
'email' => $email,
'tags' => 'produto-999, produto-5555, produto-11111, produto-0000',
);
print_r( AP_Mautic_Api::ampw_mautic_api_call( $url, $method, $body ) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment