This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.
This is accurate as of WordPress 4.9.
There are a few TODOs left. Please bear with me.
function update_product_schedule_date_meta( $post_id ) { | |
$dates_from = get_post_meta( $post_id, '_sale_price_dates_from', true ); | |
$dates_to = get_post_meta( $post_id, '_sale_price_dates_to', true ); | |
$dates_from = strtotime($dates_from); | |
$dates_to = strtotime($dates_to); | |
update_post_meta( $post_id, '_sale_price_dates_from', $dates_from ); | |
update_post_meta( $post_id, '_sale_price_dates_to', $dates_to ); | |
} |
if ( function_exists('ffwd_activate') ) { | |
remove_filter( 'mce_external_plugins', 'ffwd_register' ); | |
remove_filter( 'mce_buttons', 'ffwd_add_button', 0 ); | |
if ( is_admin() ) { | |
add_filter( 'mce_external_plugins', 'ffwd_register' ); | |
add_filter( 'mce_buttons', 'ffwd_add_button', 0 ); | |
} | |
} |
root@serveraddress:DirectoryURL/.git |
function Stack() { | |
this.value = []; | |
} | |
Stack.prototype.push = function(value) { | |
return this.value.push(value); | |
} | |
Stack.prototype.pop = function() { | |
return this.value.pop() ? true : false; |
<?php | |
global $current_user; | |
$address_fields = array(); | |
if ( isset( $_POST['add_line_1'] ) | |
&& isset( $_POST['city'] ) | |
&& isset( $_POST['state'] ) | |
&& isset( $_POST['zip_code'] ) |
<?php | |
global $current_user; | |
$address_fields = array(); | |
if ( isset( $_POST['add_line_1'] ) | |
&& isset( $_POST['city'] ) | |
&& isset( $_POST['state'] ) | |
&& isset( $_POST['zip_code'] ) |
This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.
This is accurate as of WordPress 4.9.
There are a few TODOs left. Please bear with me.
<?php | |
function wpuf_unique_product_sku_notice( $error ) { | |
if ( isset( $_POST['_sku'] ) ) { | |
global $wpdb; | |
$sku = $_POST['_sku']; | |
$product_id = $wpdb->get_var( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key='_sku' AND meta_value='%s' LIMIT 1", $sku ) ); |
<?php | |
// Add user role as body class | |
function print_user_classes() { | |
add_filter('body_class','class_to_body'); | |
} | |
add_action('init', 'print_user_classes'); | |
// Add user role class to front-end body tag | |
function class_to_body($classes) { |