/** * This will turn on deferred transactional emails in WooCommerce. This may help if you * are experiencing slow checkouts or checkout timeouts. */ add_filter( ‘woocommerce_defer_transactional_emails’, ‘__return_true’ );Continue reading
function ts_add_description_field_to_shipping_method( $fields ) { $fields[‘short_description’] = array( ‘title’ => __( ‘Short Description’, ‘woocommerce’ ), ‘type’ => ‘textarea’, ‘description’ => __( ‘Add a short description for this shipping method.’, ‘woocommerce’ ), ‘default’ => ”, ‘desc_tip’ => true, ); return $fields;…Continue reading
add_filter( ‘woocommerce_disable_password_change_notification’, ‘__return_true’ );Continue reading
add_filter(‘bwfan_enable_twilio_advanced_settings’, ‘__return_true’);Continue reading
add_filter( ‘bos_use_regular_price’, function( $use_regular_price ) { // If the return is false, it will use the Sale Price, if any. If not it will use the Regular Price. // If the return is true, it will use only the Regular…Continue reading
// Cron event add_action(‘init’, function () { if (!wp_next_scheduled(‘tune_hourly_coupon_import’)) { wp_schedule_event(time(), ‘hourly’, ‘tune_hourly_coupon_import’); } // Optional: manual trigger for testing if (isset($_GET[‘import_tune_coupons’]) && $_GET[‘import_tune_coupons’] === ‘1’) { tune_import_coupons_from_tune(); } }); add_action(‘tune_hourly_coupon_import’, ‘tune_import_coupons_from_tune’); function tune_import_coupons_from_tune() { if (!function_exists(‘wc_get_coupon_id_by_code’)) return; $network_token =…Continue reading
add_filter( ‘bwfan_broadcast_sms_per_second_limit’, function () { return 10; } );Continue reading
add_action(‘save_post_shop_coupon’, function($post_id, $post, $update) { if (wp_is_post_revision($post_id) || wp_is_post_autosave($post_id)) { return; } if ($post->post_type !== ‘shop_coupon’) { return; } if ($post->post_status !== ‘publish’ && $post->post_status !== ‘draft’ && $post->post_status !== ‘pending’) { return; } if (get_post_meta($post_id, ‘_tune_imported’, true)) { return;…Continue reading
add_filter( ‘action_scheduler_default_cleaner_statuses’, function ( $statuses ) { $statuses[] = ‘failed’; return $statuses; } ); add_filter( ‘action_scheduler_retention_period’, ‘custom_action_scheduler_retention’ ); /** * Change Action Scheduler default purge to 1 day */ function custom_action_scheduler_retention() { return DAY_IN_SECONDS; // DAY_IN_SECONDS is a built-in WordPress…Continue reading
/** * Scoped From header override for Magic Login Pro emails only. * * Conditions: * – Subject contains “Log in to” * – Body contains Magic Login expiry string */ add_filter(‘wp_mail’, function ($args) { $subject = isset($args[‘subject’]) ? (string)…Continue reading