Skip to content

Instantly share code, notes, and snippets.

View 75nineteen's full-sized avatar

75nineteen Media 75nineteen

View GitHub Profile
@75nineteen
75nineteen / delete_all_unsent_emails.sql
Created October 16, 2015 14:00
Delete all scheduled followups for Follow-up Emails
DELETE FROM {$wpdb->prefix}followup_email_orders WHERE is_sent = 0
@75nineteen
75nineteen / delete_specific_emails_from_queue_history.sql
Last active December 4, 2015 17:05
Delete all scheduled emails for a specific email
DELETE FROM {$wpdb->prefix}followup_email_orders WHERE email_id=12345 AND is_sent=0
@75nineteen
75nineteen / custom_ms_field.php
Last active October 16, 2015 13:57
Add a user entry field to the Ship to Multiple Locations for WooCommerce
function custom_shipping_fields( $fields, $country ) {
$fields['shipping_test'] = array(
'label' => 'Test',
'placeholder' => 'Test'
);
return $fields;
}
add_filter( 'woocommerce_shipping_fields', 'custom_shipping_fields', 10, 2 );
function display_custom_shipping_fields( $formatted_address, $address ) {
@75nineteen
75nineteen / custom_variables_two.php
Last active June 28, 2019 02:30
Another example for building your own custom variables
add_action( 'fue_before_variable_replacements', 'fue_register_variable_replacements', 10, 4);
function fue_register_variable_replacements( $var, $email_data, $fue_email, $queue_item ) {
$variables = array(
'referral_code' => ''
);
if ( isset( $email_data['test'] ) && $email_data['test'] ) {
$variables['referral_code'] = '13221';
@75nineteen
75nineteen / custom_variables.php
Created September 22, 2015 21:03
Creating custom variables for Followup Emails
add_filter( 'fue_variable_replacements', 'fue_register_variable_replacements', 10, 3);
function fue_register_variable_replacements( $variables, $queue_item, $fue_email ) {
$license_key = '';
foreach ( $licenses as $license) {
if ( $license->software_product_id == 'the_matching_product_id' ) {
$license_key = $license->licence_key;
break;
}
@75nineteen
75nineteen / customer-new-account.php
Last active May 2, 2023 18:08
Include email address in new customer email for WooCommerce instead of user login
<?php
/**
* Customer new account email
*
* @author WooThemes
* @package WooCommerce/Templates/Emails
* @version 1.6.4
*/
// load customer data and user email into email template