Internal API Methods

You can use internal API methods on your website. This can be very useful for automation processes.


Get Contact Tags By Email

if (function_exists('wpsgen_get_contact_tags_by_email')) { $tags = wpsgen_get_contact_tags_by_email($email) }
input:
$email (string) ‘[email protected]
output:
$tags (array) [‘1’ => ‘tag_1′, ’21’ => ‘tag_5’, …]


Delete Contact Tags By Email

if (function_exists('wpsgen_delete_contact_tags_by_email')) { wpsgen_delete_contact_tags_by_email($email, $tags)}
input:
$email (string) ‘[email protected]
$tags (array) [‘tag_1’, ‘tag_5’]
output:
$res (bool) – true, false


Add Tags to Contact By Email

if (function_exists('wpsgen_add_contact_tags_by_email')) { wpsgen_add_contact_tags_by_email($email, $tags) }
input:
$email (string) ‘[email protected]
$tags (array) [‘tag_1’, ‘tag_5’]
output:
$res (bool) – true, false

* If the contact or tag(s) does not exist, it will be created automatically.