Category: eCommerce
https://library.wpcode.com/editor
[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
hotmart
Untitled Snippet
google-site-verification=2qRnmMOU51GWk3rx-tL2TwbUAd1kOVvjw9caXI6AvrAContinue reading
Untitled Snippet
WWPAY – Change Order status (On Hold → Processing)
/** * 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 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