Last active
March 1, 2022 07:11
-
-
Save smartdeal/c23a7e88ac2dc9ce22875ea5fe98c2e8 to your computer and use it in GitHub Desktop.
пример интеграции #Wordpress #Sendpulse #WP_CF7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function add_email_to_sendpulse($contact_form) { | |
| $wpcf7 = WPCF7_ContactForm::get_current(); | |
| $submission = WPCF7_Submission::get_instance(); | |
| $data = $submission->get_posted_data(); | |
| $cur_email = $data['Email']; | |
| if ($cur_email != '') { | |
| define( 'API_USER_ID', '' ); | |
| define( 'API_SECRET', '' ); | |
| define( 'TOKEN_STORAGE', 'file' ); | |
| $SPApiProxy = new SendpulseApi( API_USER_ID, API_SECRET, TOKEN_STORAGE ); | |
| $SPApiProxy->addEmails(633919, array($cur_email) ); | |
| } | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@snmazko действительно рабочий вариант!!!
Спасибо за подробную инструкцию.