This file contains 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 | |
/* | |
Plugin Name: Frontend AJAX Sub-Category Dropdown | |
Plugin URI: http://khaledsaikat.com | |
Description: Load sub-category dropdown based on parent category by ajax call | |
Version: 0.1 | |
Author: Khaled Hossain | |
Author URI: http://khaledsaikat.com | |
*/ |
This file contains 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 | |
add_action( 'user_register', 'add_user_to_sendy_list' ); | |
function add_user_to_sendy_list( $user_id ) { | |
$list = 'SENDY_LIST_ID'; | |
$url = 'http://SENDY_INSTALL_URL/subscribe'; | |
$user = get_userdata( $user_id ); | |
$email = $user->data->user_email; | |
$name = $user->data->user_nicename; |
This file contains 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 | |
/* | |
Original code by Pross found here https://gist.github.com/Pross/3ff9f68fea20dcdc8845919dc51de90d | |
//-------------------------------------------------------------------------------------// | |
Version 1.0.0 | |
bdacus01 2020 found here https://gist.github.com/bdacus01/84171d9454e7ab4152be2edc65855c21 | |
Improvements to code: added api key, firstname, and customer filter list. | |
If new account doesn't have the first_name filled in pull it from the registration POST. | |
user_register does not write out to the database until after registration is complete. | |
This code is for WC Customers. We are assuming they bought products or created an account. |