Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Email capture hook?
(1 viewing) (1) Guest
"ARI Stream Quiz" WordPress plugin
Go to bottomPage: 123
TOPIC: Email capture hook?
#63376
Email capture hook? 5 Years, 11 Months ago Karma: 0
We are using an email marketing system not on your list. I already have an in-house plugin that will hook into other processes to capture user emails to send them along. Do you have such a hook? As an example, in the WP-viral-quiz plugin, when we ask for an email to see the results, they have a hook I can use to capture that email and pass it along to our backend system using their API. Do you have any such thing? If not, I may be able to get creative with Zapier...
The administrator has disabled public write access.
 
#63377
Re:Email capture hook? 5 Years, 11 Months ago Karma: 748
Hello,

Currently the plugin doesn't support this hook, but we can implement it. Do you want to receive name and email in hook handler?

Regards,
ARI Soft
The administrator has disabled public write access.
 
#63378
Re:Email capture hook? 5 Years, 11 Months ago Karma: 0
Our plugin accepts email alone or email + first and last name (as 3 discrete fields).

That would be awesome!

-A
The administrator has disabled public write access.
 
#63383
Re:Email capture hook? 5 Years, 11 Months ago Karma: 748
v. 1.5.27 supports "asq_session_user_data" hook. It send an array with "name" and "email" elements to hook handler.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#63403
Re:Email capture hook? 5 Years, 11 Months ago Karma: 0
So I am trying this out but my code (below) is not capturing any email (and the debug message is not showing up in the log). Any suggestions?

Code:


add_action('asq_session_user_data', 'quiz_email_hook', 10, 4);

function quiz_email_hook($user_data) {

     $email = $user_data['email'];

     write_log('Caught email hook for ' . $email);

     if ( $email ) send_email_to_marketing_system ( 'QUIZ', $email, '', '' );
}

Last Edit: 2018/07/25 20:17 By aaffleck.
The administrator has disabled public write access.
 
#63405
Re:Email capture hook? 5 Years, 11 Months ago Karma: 748
The following code is working fine on our side:

Code:


add_action( 'asq_session_user_data', function( $data ) {
    file_put_contents( ARISTREAMQUIZ_PATH . '/hook_data.txt', var_export( $data, true ) );
});



PS: Do you use PRO version? v. 1.5.27?

Regards,
ARI Soft
The administrator has disabled public write access.
 
Go to topPage: 123