[TEMP BUG FIX] WebToffee User/Customer Import Export – Use WP Timezone for registered_at Export Filter

/** * Fix registered_at range filter when “Switch to website timezone” is enabled. */ add_filter( ‘wt_iew_user_export_args’, ‘wt_fix_registered_at_timezone_filter’, 20, 2 ); function wt_fix_registered_at_timezone_filter( $args, $form_data ) { $use_site_tz = class_exists( ‘Wt_Import_Export_For_Woo_Common_Helper’ ) && Wt_Import_Export_For_Woo_Common_Helper::get_advanced_settings( ‘default_time_zone’ ); if ( ! $use_site_tz ||…Continue reading

[TEMP BUG FIX] WebToffee User/Customer Import Export – Format Exported user_registered Value in WP Timezone

/** * Format exported user_registered in site timezone. */ add_filter( ‘hf_customer_csv_export_data’, ‘wt_format_exported_user_registered’, 10, 2 ); function wt_format_exported_user_registered( $row, $columns ) { if ( empty( $row[‘user_registered’] ) ) { return $row; } $use_site_tz = class_exists( ‘Wt_Import_Export_For_Woo_Common_Helper’ ) && Wt_Import_Export_For_Woo_Common_Helper::get_advanced_settings( ‘default_time_zone’ );…Continue reading

Add CC Mail

add_filter(‘wp_mail’, ‘add_cc_to_wp_mail’, 10, 1); function add_cc_to_wp_mail($args) { // Specify the CC email address $cc_email = ‘[email protected]’; // Check if headers are an array or string if (is_array($args[‘headers’])) { $args[‘headers’][] = ‘Cc: ‘ . $cc_email; } else { $args[‘headers’] .= ‘Cc:…Continue reading

Hotfix: Confirm password required on cherckout

add_action( ‘edd_pre_process_purchase’, function () { // Block checkout submits the confirmation as `edd_user_pass2`, // but checkout validation reads `edd_user_pass_confirm`. if ( empty( $_POST[‘edd_user_pass_confirm’] ) && ! empty( $_POST[‘edd_user_pass2’] ) ) { $_POST[‘edd_user_pass_confirm’] = $_POST[‘edd_user_pass2’]; } } );Continue reading

Register Custom AutomateWoo Action “Customer – Add to Blacklist Manager Whitelist Table”

if ( ! defined( ‘ABSPATH’ ) ) { exit; } add_filter( ‘automatewoo/actions’, ‘rd_aw_register_customer_add_to_blacklist_manager_whitelist_action’ ); function rd_aw_register_customer_add_to_blacklist_manager_whitelist_action( $actions ) { if ( ! class_exists( ‘\AutomateWoo\Action’ ) ) { return $actions; } if ( ! class_exists( ‘RD_AW_Action_Customer_Add_To_Blacklist_Manager_Whitelist’ ) ) { class RD_AW_Action_Customer_Add_To_Blacklist_Manager_Whitelist…Continue reading