Actions
Actions are one of the two types of hooks. They provide a way for running a function at a specific point in the execution of WordPress Core, plugins, and themes. You can learn more about actions here.
All our products at Thrive Themes come with a set of helpful hooks so you can extend the functionality with your own custom logic.
Please note that adding custom code through hooks should be reserved for those with technical expertise and implemented locally or on a staging website before pushing to your live site. Coding mistakes can cause errors and bring your website down.
Example
Here’s sample code showing how you can hook into an action:
function doSomething($data)
{
// add your custom logic here
}
add_action('thrive_ultimatum_evergreen_campaign_start', 'doSomething');
In this article, you’ll find:
Full List of Actions
Thrive Dashboard
thrive_core_user_login
DESCRIPTION / USE CASE |
PRODUCT |
PARAMETERS |
This hook is fired when a user logs into the platform. The hook can be fired multiple times per user. Example use case:- Show the users specific content depending on the login URL |
Thrive Dashboard |
|
Thrive Architect
thrive_core_lead_signup
DESCRIPTION / USE CASE |
PRODUCT |
PARAMETERS |
This hook is fired when a user signs up, using a lead generation form. The hook can be fired multiple times for the same form and user. Example use case:- Send lead data to a third party integration |
Thrive Architect |
|
Thrive Apprentice
thrive_apprentice_restricted_course
DESCRIPTION / USE CASE |
PRODUCT |
PARAMETERS |
This hook is triggered when a user tries to access a premium course, but they don’t have access to it. The hook can be fired multiple times per user, each time they try to access the restricted course. Example use case:- Send an email to let the user know how to login to the course |
Thrive Apprentice |
|
thrive_apprentice_lesson_start
DESCRIPTION / USE CASE |
PRODUCT |
PARAMETERS |
Triggered when a user views a lesson for the first time.The hook is fired each time the user starts a new lesson, but only once per lesson. Example use case:- Trigger an email event when a students views a lesson for the first time |
Thrive Apprentice |
|
thrive_apprentice_free_lesson_completed
DESCRIPTION / USE CASE |
PRODUCT |
PARAMETERS |
This hook is triggered when the user finishes a lesson, and another one loads, in the same session. The hook will only be fired once per user, for each completed lesson. Example use case:- Display in-course notifications and interactive widgets, so that the course participants are able to navigate through the course. |
Thrive Apprentice |
|
thrive_apprentice_lesson_complete
DESCRIPTION / USE CASE |
PRODUCT |
PARAMETERS |
This hook is triggered when the user finishes a lesson, and another one loads, in the same session.The hook will only be fired once per user, for each completed lesson. Example use case:- Display in-course notifications and interactive widgets, so that the course participants are able to navigate through the course. |
Thrive Apprentice |
|
thrive_apprentice_module_start
DESCRIPTION / USE CASE |
PRODUCT |
PARAMETERS |
This hook is triggered when a user views a module for the first time. Only fired once per module per user. Can be useful if, for example, you would like to congratulate the students by sending an email through an autoresponder, when they start a module in Thrive Apprentice. |
Thrive Apprentice |
|
thrive_apprentice_module_finish
DESCRIPTION / USE CASE |
PRODUCT |
PARAMETERS |
This hook is triggered when a user finishes all the lessons from a module. The hook will only be fired once per user, when the module has been completed. Example use case:- Send an email to congratulate the student on completing a module. |
Thrive Apprentice |
|
thrive_apprentice_course_start
DESCRIPTION / USE CASE |
PRODUCT |
PARAMETERS |
This hook is triggered when someone loads the first lesson of a course for the first time. The hook will only be fired once per user, when they start a new course. Example use case:- Send the date the student started the course to an autoresponder |
Thrive Apprentice |
|
thrive_apprentice_course_finish
DESCRIPTION / USE CASE |
PRODUCT |
PARAMETERS |
This hook is triggered when a user finishes all the lessons from a course. It will only be fired once per user, once the course has been completed. Example use case:- Send an email to congratulate the student on completing the course |
Thrive Apprentice |
|
Thrive Ovation
thrive_ovation_testimonial_ready
DESCRIPTION / USE CASE |
PRODUCT |
PARAMETERS |
The hook is triggered when the status of a testimonial changes to “Ready for display”. This can be fired multiple times, if the admin decides to change the status of a testimonial from “Rejected” to “Ready for display”. Example use case:- Thank the student for submitting the testimonial by email and letting them know that it has been published on the site. |
Thrive Ovation |
|
thrive_ovation_testimonial_rejected
DESCRIPTION / USE CASE |
PRODUCT |
PARAMETERS |
The hook is triggered when the status of a testimonial changes to “Rejected”. This can be fired multiple times, if the admin decides to change the status of a testimonial from “Ready” to “Rejected”. Example use case:- inform a student that the testimonial has been rejected, via email. |
Thrive Ovation |
|
thrive_ovation_testimonial_submit
DESCRIPTION / USE CASE |
PRODUCT |
PARAMETERS |
The hook is triggered when a user submits a testimonial through Thrive Ovation. The hook can be fired multiple times, as the user can leave multiple testimonials. Example use case:- Give students access to a bonus course after they have submitted a testimonial. |
Thrive Ovation |
|
Thrive Ultimatum
thrive_ultimatum_evergreen_campaign_start
DESCRIPTION / USE CASE |
PRODUCT |
PARAMETERS |
When an evergreen campaign starts for a specific user, this hook is triggered.The trigger will only be fired once per evergreen campaign per user. Example use case:- Synchronize data with a third party system when a new user triggers an evergreen countdown. You may use this hook to send the end time and date of the countdown campaign to your autoresponder for use in follow up emails. |
Thrive Ultimatum |
|
Thrive Quiz Builder
thrive_quizbuilder_quiz_restarted
DESCRIPTION / USE CASE |
PRODUCT |
PARAMETERS |
The hook is triggered when a user restarts the same quiz. It can be fired multiple times, if the user chooses to restart the quiz multiple times Example use case:- Record the number of times a student took the quiz in order to achieve a score. |
Thrive Quiz Builder |
|
thrive_quizbuilder_quiz_completed
DESCRIPTION / USE CASE |
PRODUCT |
PARAMETERS |
The hook is triggered when a quiz result is loaded. The hook can be fired multiple times, if the user completes the same quiz multiple times. Example use case:- Send an email based on the quiz result. Start the quiz result to a CRM / Autoresponder. Start an evergreen campaign based on the quiz result. |
Thrive Quiz Builder |
|
thrive_quizbuilder_answer_submitted
DESCRIPTION / USE CASE |
PRODUCT |
PARAMETERS |
The hook is triggered when a user submits the answer to a question of the quiz. It can be fired multiple times, if the user completes the same quiz multiple times. Example use case:- Send the answer selected to your analytics platform |
Thrive Quiz Builder |
|
Full List of Functions
Thrive Dashboard
thrv_update_tags
DESCRIPTION / USE CASE |
PRODUCT |
PARAMETERS |
RETURN |
Add one or more tags to a subscriber in an autoresponder that’s connected through the API. |
Thrive Dashboard |
|
(boolean) |
thrv_add_custom_fields
DESCRIPTION / USE CASE |
PRODUCT |
PARAMETERS |
RETURN |
Add or update a custom field to a subscriber record in an autoresponder that’s connected through the API. |
Thrive Dashboard |
|
(int|boolean) |
thrv_get_available_custom_fields
DESCRIPTION / USE CASE |
PRODUCT |
PARAMETERS |
RETURN |
This is a helper for the thrv_add_custom_fields function. It will return the available custom field for a specific connection. |
Thrive Dashboard |
|
(boolean|array)
|
thrv_get_available_lists
DESCRIPTION / USE CASE |
PRODUCT |
PARAMETERS |
RETURN |
This is a helper for the update thrv_update_tags and thrv_add_custom_fields functions. It will return the available lists for a specific connection. |
Thrive Dashboard |
|
(boolean|array)
|
Thrive Ultimatum
tu_start_campaign
DESCRIPTION / USE CASE |
PRODUCT |
PARAMETERS |
RETURN |
The function triggers an evergreen countdown campaign for a specific user |
Thrive Ultimatum |
|
(boolean) |
tu_end_campaign
DESCRIPTION / USE CASE |
PRODUCT |
PARAMETERS |
RETURN |
The function removes a user from an evergreen countdown campaign |
Thrive Ultimatum |
|
(boolean) |
Parameter Data
→ Campaign Details
Parameter |
Description |
Type |
Example |
campaign_id |
The ID of the Ultimatum campaign |
INT |
759 |
campaign_name |
The name of the campaign |
STRING |
7 day offer |
campaign_type |
The type of campaign (Evergreen) |
STRING |
evergreen |
campaign_start_date |
The exact date when the campaign starts |
STRING |
2020-09-28 |
campaign_trigger_type |
The trigger that started the campaign |
STRING |
1. url 2. promotion |
countdown_event_id |
This returns the ID of the event that triggered the countdown |
INT |
22 |
→ User details
Parameter |
Description |
Type |
Example |
user_id |
The ID of the user |
INT |
40 |
last_logged_in |
The date the user last logged in |
STRING |
2020-10-23 10:26:11 |
last_updated |
The date the user last updated the user profile |
STRING |
2020-10-23 10:30:00 |
user_registered |
The date the user has registered on the site |
STRING |
2020-10-15 11:22:56 |
username |
The username of the user |
STRING |
kate |
membership_level |
The role of the user for which the campaign has started |
STRING |
administrator |
user_email |
The email of the user |
STRING |
|
ip_address |
The IP of the user, received from the browser |
STRING |
85.10.198.93 |
user_agent |
The user agent, received from the browser |
STRING |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0 |
comments |
The number of comments the user has on the website |
INT |
2 |
tva_last_lesson_viewed |
An array containing the ID of the last lesson viewed by the user |
ARRAY |
(0 => ‘113085060’) |
tva_last_module_viewed |
An array containing the ID of the last module viewed by the user |
ARRAY |
(0 => ‘123’ ) |
tva_last_course_viewed |
An array containing the ID of the last course viewed by the user |
ARRAY |
(0 => ‘392’ ) |
tva_courses |
An array containing the IDs of the courses the user has access to |
ARRAY |
(0 => ‘392’, 1 => ‘393’) |
→ Lesson details
Parameter |
Description |
Type |
Example |
lesson_id |
The ID of the lesson |
INT |
2926 |
lesson_url |
The URL of the lesson |
STRING |
|
lesson_title |
The title of the lesson |
STRING |
Lesson 1:How to train a dog |
lesson_type |
The type of lesson (audio/video/text) |
STRING |
text |
lesson_image_url |
The URL of the featured image set to the lesson |
STRING |
https://example.domain.com/wp-content/uploads/2020/01/dog-2981865_1920.jpg |
module_id |
The ID of the module the lesson belongs to |
INT |
434 |
module_title |
The title of the module that the lesson belongs to |
STRING |
Module 1 |
course_id |
The ID of the course that the lesson belongs to |
INT |
30 |
course_title |
The title of the course that the lesson belongs to |
STRING |
A man’s best friend |
→ Module details
Parameter |
Description |
Type |
Example |
module_id |
The ID of the module |
INT |
434 |
module_url |
The URL of the module |
STRING |
|
module_title |
The title of the module |
STRING |
Module 1 |
module_image_url |
The URL of the featured image set for the module |
STRING |
https://example.domain.com/wp-content/uploads/2020/01/dog-2981865_1920.jpg |
module_description |
The description of the module |
STRING |
Welcome to the first module. |
course_id |
The ID of the course that the module belongs to |
INT |
30 |
course_title |
The title of the course that the module belongs to |
STRING |
A man’s best friend |
→ Course details
Parameter |
Description |
Type |
Example |
course_id |
The ID of the course |
INT |
30 |
course_url |
The URL of the course |
STRING |
|
course_title |
The title of the course that the module belongs to |
STRING |
A man’s best friend |
course_image_url |
The URL of the featured image assigned to the course |
STRING |
https://example.domain.com/wp-content/uploads/2020/01/dog-2981865_1920.jpg |
course_description |
The description of the course |
STRING |
This course will help you get a better understanding of a dog’s behavior. |
→ User Login
Parameter |
Description |
Type |
Example |
user_login |
The username of the user |
STRING |
Kate |
→ Form Data
Parameter |
Description |
Type |
Example |
login_page |
The page accessed by the user for them to log in |
STRING |
|
login_redirect |
The page where the user was redirected after they logged in |
STRING |
|
login_time |
The exact time when the user logged in |
STRING |
2020-11-03 16:24:37 |
result |
The result of the log in |
STRING |
success |
→ WP_User
This parameter is similar to the $wp_user one, please see this article for more information.
→ Lead Data
Parameter |
Description |
Type |
Example |
name |
The username of the user |
STRING |
kate |
|
The email of the user |
STRING |
|
user_consent |
Informs you whether the user agreed to the GDPR policy |
STRING |
GDPR ACCEPTED |
mapping_textarea_xxx |
The text that the user enters in the “Textarea” field. The “xxx” number will be automatically filled with a random generated value when someone completes a “Textarea” type of field |
STRING |
Lorem Ipsum |
mapping_checkbox_xxx |
The option(s) that the user checks in the “Checkbox” fields. The “xxx” number will be automatically filled with a random generated value when someone completes a “Checkbox” type of field |
ARRAY(STRING) |
(‘Option A’,’Option B’)
|
mapping_url_xxx |
The URL entered in the “URL” field. The “xxx” number will be automatically filled with a random generated value when someone completes a “URL” type of field |
STRING |
|
mapping_radio_xxx |
The option(s) that the user checks in the “Radio” fields. The “xxx” number will be automatically filled with a random generated value when someone completes a “Radio” type of field |
STRING |
Option C |
mapping_select_xxx |
The option that the user checks in the “Select” fields. The “xxx” number will be automatically filled with a random generated value when someone completes a “Select” type of field |
STRING |
Option C |
phone |
The telephone number of the user |
STRING |
555 333 1234 |
g-recaptcha-response |
This parameter stores the Google reCAPTCHA response, if it is enabled on the site |
STRING |
1234567_7654321 |
mapping_hidden_xxx |
The information that is received with the use of the “Hidden” fields. The “xxx” number will be automatically filled with a random generated value when someone completes a form that has such fields |
STRING |
Google Chrome |
_asset_option |
Informs you if the “Asset Delivery” feature is enabled. ‘1’ means that the asset delivery feature is enabled. |
STRING |
1 |
_asset_group |
The asset group set when configuring the asset delivery feature. |
STRING |
Asset Group 1 |
_tcb_files |
The files uploaded via the “File Upload” field. See more details here. |
Array(ID,Array(File)) |
|
url |
The URL of the user’s website |
STRING |
|
_tcb_id |
The ID of the lead generation form setting |
STRING |
5653 |
tcb_token |
A token used to check if the request comes from a web browser |
STRING |
ej0h548h2 |
post_id |
The ID of the page that contains the form |
STRING |
1234 |
tcb_file_field |
The custom field used for mapping the file upload values |
STRING |
mapping_file_50 |
tcb_file_id |
The ID of the uploaded file, when using the “File Upload” type of field. |
STRING |
1234 |
$$trusted |
We use this parameter to ensure that the request has been performed from a Lead Generation element. If it has, then the parameter returns true; and false otherwise. |
BOOLEAN |
TRUE |
_use_captcha |
Informs you if the form is using spam prevention. If the value is equal with 1, than the form it is spam protected. |
INT |
1 |
mapping_file_xxx |
The file uploaded with the use of the File Upload” fields. The “xxx” number will be automatically filled with a random generated value when someone uploads a file. |
ARRAY |
( 0 => ‘https://www.dropbox.com/s/sm3g0rinb0snf63/image.png?dl=0‘ ) |
Auto-responder specific fields |
These parameters are specific to each autoresponder, will provide two examples. |
Active Campaign: activecampaign_form: ‘Example’, activecampaign_tags: ‘100%’ Drip: drip_type :’list’, |
|
→ File Details Parameters
Parameter |
Description |
Type |
Example |
url |
When uploading a file via the “File Upload” field, this parameter will show the URL of the uploaded file, stored in the storage service of your choice. |
STRING |
|
name |
When uploading a file via the “File Upload” field, this parameter will show the name of the uploaded file. |
STRING |
image.jpg |
path |
The exact time when the user logged in. |
STRING |
/image.jpg |
→ Quiz Details
Parameter |
Description |
Type |
Example |
quiz_id |
The ID of the quiz. |
INT |
3800 |
quiz_name |
The name of the quiz. |
STRING |
Are you an introvert or an extrovert? |
result |
The result that the user achieved. |
STRING |
Introvert |
answers |
An array of all the answers that the user has given |
ARRAY (ANSWERS DETAILS FOR QUIZ DETAILS) |
|
user_id |
The ID of the user |
INT |
68 |
→ Answer Details for Quiz Details
Parameter |
Description |
Type |
Example |
id |
Auto Generated ID for each answer provided by the user. |
STRING |
100 |
question_id |
The ID of the question. |
STRING |
101 |
answer_text |
In the case of open-ended questions, this parameter will show the answer that the user has given. |
STRING |
I’m doing very well |
q_text |
The text of the question. |
STRING |
How do you get set for remote work? |
q_type |
The type of question. |
STRING |
Multiple Choice with Buttons |
a_text |
Unless the question is an open-ended one, this parameter will show the actual answer text. |
STRING |
I drink a coffee and watch TV |
→ Answer Details
Parameter |
Description |
Type |
Example |
quiz_id |
The ID of the quiz. |
INT |
3800 |
question_id |
The ID of the question. |
STRING |
100 |
question_answer |
The answer that the user has given. It will be an array, in case there are multiple answers. |
ARRAY(STRING) |
(‘I love social gatherings’) |
question_answer_id |
The ID of the answer. |
|
208 |
question_type |
The type of question. |
STRING |
Multiple Choice with Buttons |
→ Testimonial Details
Parameter |
Description |
Type |
Example |
testimonial_id |
The ID of the testimonial. |
INT |
343 |
testimonial_submission_url |
The URL of the page where the testimonial was submitted. |
STRING |
|
testimonial_content |
The content of the testimonial. |
STRING |
Such a useful blog post! |
testimonial_tags |
An array of tags associated with the testimonial. This can only be added by the administrator of the website. |
ARRAY |
(‘review’) |
→ Connection
Parameter |
Description |
Type |
Example |
connection (Required) |
Represents the name of the connection. Here is the mapping used and details related to the support for adding tags and custom fields: MailChimp (Custom Fields & Tags):mailchimp Maierlite (Custom Fields):mailerlite ActiveCampaign (Custom Fields & Tags): activecampaign Aweber (Custom Fields & Tags): aweber Zoho (Custom Fields): zoho Drip (Tags): drip KlickTipp (Tags) : klicktipp Infusionsoft (Custom Fields & Tags): infusionsoft SendLane (Tags): sendlane SendInBlue (Custom Fields): sendinblue GetResponse (Custom Fields): get-response ConvertKit (Custom Fields & Tags) : convertkit Campaign Monitor (Custom Fields): campaignmonitor |
STRING |
convertkit |
→ Update Tags Data
Parameter |
Description |
Type |
Example |
email (Required) |
The email address of the user. |
STRING |
|
tags (Required) |
A list of tags associated with the user |
ARRAY |
(‘tag 1’, ‘tag2’) |
list_identifier (Required) |
In order to work autoresponders will require a list_identifier parameter. Here is the list of autoresponders requiring the list_identifier: -Aweber -ConvertKit -Drip -Infusionsoft -MailChimp |
ARRAY |
array( ‘list_identifier’ ,703417 ) |
→ Custom Fields Data
Parameter |
Description |
Type |
Example |
email (Required) |
The email address of the user. |
STRING |
|
custom_fields (Required) |
A key-value pair, where the key is the id of the custom field defined in the autoresponder and the value that will be mapped with that field. |
ARRAY |
array( ‘customfield1′ ,’mycustomtext’ ) |
list_identifier (Required) |
In order to work autoresponders will require a list_identifier parameter. Here is the list of autoresponders requiring the list_identifier: -Aweber -ConvertKit -Drip -Infusionsoft -MailChimp |
ARRAY |
array( ‘list_identifier’ ,703417 ) |
→ Campaign ID
Parameter |
Description |
Type |
Example |
campaign_id (Required) |
The ID of the Ultimatum Campaign |
INT |
759 |
→ User Email
Parameter |
Description |
Type |
Example |
user_email (Required) |
The email of the user |
INT |