/** * 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
/** * 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
/** * Plugin Name: Wholesale Payments — send $0-today plan orders to Processing * Description: Temporary workaround. Moves a Wholesale Payments order from On Hold * to Processing when the hold was caused only by “no payment is due *…Continue reading
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
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
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
if ( ! function_exists( ‘rd_aw_blacklist_manager_normalize_email’ ) ) { /** * Normalise an email using Blacklist Manager’s active normaliser where available. * * @param mixed $email Raw email address. * @return string */ function rd_aw_blacklist_manager_normalize_email( $email ) { $email = is_string(…Continue reading