Lines:
1 to 94 of 94
<?php /** * User Functions * * Functions related to users / customers * * @package EDD * @subpackage Functions * @copyright Copyright (c) 2018, Easy Digital Downloads, LLC * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License * @since 1.0.8.6 */ // Exit if accessed directly defined( 'ABSPATH' ) || exit; /* function edd_get_users_purchases() – Get Users Purchases */ /* function edd_get_users_purchased_products() – Retrieve products purchased by a specific user. */ /* function edd_has_user_purchased() – Checks to see if a user has purchased a product. */ /* function edd_has_purchases() – Check if a user has made any purchases. */ /* function edd_get_purchase_stats_by_user() – Get purchase statistics for user. */ /* function edd_count_purchases_of_customer() – Count number of purchases of a customer. */ /* function edd_purchase_total_of_user() – Calculates the total amount spent by a user */ /* function edd_count_file_downloads_of_user() – Counts the total number of files a user (or customer if an email address is given) has downloaded */ /* function edd_count_file_downloads_of_customer() – Counts the total number of files a customer has downloaded. */ /* function edd_validate_username() – Validate a potential username */ /* function edd_connect_guest_customer_to_existing_user() – Attach the customer to an existing user account when completing guest purchase. */ add_action( 'edd_customer_post_attach_payment', 'edd_connect_guest_customer_to_existing_user', 10, 4 ); /* function edd_connect_existing_customer_to_new_user() – Attach the newly created user_id to a customer, if one exists */ add_action( 'user_register', 'edd_connect_existing_customer_to_new_user', 10, 1 ); /* function edd_add_past_purchases_to_new_user() – Looks up purchases by email that match the registering user */ add_action( 'user_register', 'edd_add_past_purchases_to_new_user', 10, 1 ); /* function edd_count_total_customers() – Counts the total number of customers. */ /* function edd_get_customer_address() – Returns the saved address for a customer */ /* function edd_new_user_notification() – Sends the new user notification email when a user registers during checkout */ add_action( 'edd_insert_user', 'edd_new_user_notification', 10, 2 ); /* function edd_set_user_to_pending() – Set a user’s status to pending */ /* function edd_set_user_to_verified() – Set the user from pending to active */ /* function edd_user_pending_verification() – Determines if the user account is pending verification. Pending accounts cannot view purchase history */ /* function edd_get_user_verification_url() – Gets the activation URL for the specified user */ /* function edd_get_user_verification_request_url() – Gets the URL that triggers a new verification email to be sent */ /* function edd_send_user_verification_email() – Sends an email to the specified user with a URL to verify their account */ /* function edd_get_user_verification_token() – Generates a token for a user verification URL. */ /* function edd_validate_user_verification_token() – Generate a token for a URL and match it against the existing token to make sure the URL hasn’t been tampered with. */ /* function edd_process_user_verification_request() – Processes an account verification email request */ add_action( 'edd_send_verification_email', 'edd_process_user_verification_request' ); /* function edd_process_user_account_verification() – Processes an account verification */ add_action( 'edd_verify_user', 'edd_process_user_account_verification' ); /* function edd_get_user_verification_page() – Retrieves the purchase history page, or main URL for the account verification process */ /* function edd_detach_deleted_user() – When a user is deleted, detach that user id from the customer record */ add_action( 'delete_user', 'edd_detach_deleted_user', 10, 1 ); /* function edd_show_user_api_key_field() – Modify User Profile */ add_action( 'show_user_profile', 'edd_show_user_api_key_field' ); add_action( 'edit_user_profile', 'edd_show_user_api_key_field' ); /* function edd_update_user_api_key() – Generate and Save API key */ add_action( 'personal_options_update', 'edd_update_user_api_key' ); add_action( 'edit_user_profile_update', 'edd_update_user_api_key' );