Disable Automatic Updates Emails

// Disable auto-update emails. add_filter( ‘auto_core_update_send_email’, ‘__return_false’ ); // Disable auto-update emails for plugins. add_filter( ‘auto_plugin_update_send_email’, ‘__return_false’ ); // Disable auto-update emails for themes. add_filter( ‘auto_theme_update_send_email’, ‘__return_false’ );Continue reading

Add an audio field to the sign up form (copy)

// Add the audio field to the signup form. add_action( ‘wcv_form_input_after__wcv_store_name’, ‘wcv_audio_uploader’); function wcv_audio_uploader( ){ // Remove this check to have it show on sign up and settings pages. if (‘signup’ == WCVendors_Pro_Store_Form::$form_type ){ echo ‘ Audio Uploader ‘; $value…Continue reading

WC Vendors Activate All Vendors

/** Activates all Vendor Stores **/ function wcv_activate_all_vendors() { global $wpdb; $users = get_users( array( ‘fields’ => array( ‘ID’ ), ‘role’ => ‘Vendor’ ) ); $meta_key = ‘_wcv_vendor_status’; foreach($users as $user){ $wpdb->query($wpdb->prepare(“UPDATE wp_usermeta SET meta_value=’active’ WHERE user_id=$user->ID AND meta_key=’$meta_key’”)); }…Continue reading

Completely Disable Comments

add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in…Continue reading

Add A Default Campaign Custom Amount

add_filter( ‘charitable_session_donation_amount’, ‘example_get_donation_amount_in_session’, 999, 2 ); function example_get_donation_amount_in_session( $amount = false, $campaign = false ) { // If the donation amount is not set in the session, return the default amount. // WARNING: Setting a default amount here will override…Continue reading