Localizing Date Picker Strings

/** * Load the date picker locale strings. * * @link https://wpforms.com/developers/localize-the-date-picker-strings/ */ function wpf_dev_datepicker_locale( $forms ) { if ( true === wpforms_has_field_type( ‘date-time’, $forms, true )){ wp_enqueue_script( ‘wpforms-datepicker-locale’, ‘https://npmcdn.com/[email protected]/dist/l10n/es.js’, array( ‘wpforms-flatpickr’ ), null, true ); } } add_action( ‘wpforms_frontend_js’,…Continue reading

Disable All UpdraftPlus Email Notifications

/** * Comprehensive UpdraftPlus Email Notification Disabler * Add this code to your theme’s functions.php or WPCode * By: Empathy First Media */ // Master switches and initialization prevention add_filter(‘updraftplus_disable_all_mail_init’, ‘__return_true’); // Master switch to disable email initialization add_filter(‘updraftplus_email’, ‘__return_false’);…Continue reading

WP Aggregator Feed Limit

// Set custom number of posts for category feeds function custom_category_feed_limit($query) { if ($query->is_feed() && $query->is_category()) { $query->set(‘posts_per_rss’, 100); $query->set(‘nopaging’, true); } } add_action(‘pre_get_posts’, ‘custom_category_feed_limit’);Continue reading

How to Hide Zero Quantity Items in Dropdown Payment Field Notifications

/** * Hide zero quantity items from Dropdown Items payment field notifications * * @link https://wpforms.com/developers/how-to-hide-zero-quantity-items-in-dropdown-payment-field-notifications */ add_action(‘wpforms_loaded’, function() { add_filter(‘wpforms_entry_email_data’, function ($fields, $entry, $form_data) { foreach ($fields as $field_id => $field) { if (‘payment-select’ === $field[‘type’]) { // Get…Continue reading

Modify WooCommerce Coupon Message

add_filter( ‘woocommerce_coupon_message’, ‘modify_woocommerce_coupon_message’, 10, 3 ); function modify_woocommerce_coupon_message( $msg, $msg_code, $coupon ) { if( $msg === __( ‘Coupon code applied successfully.’, ‘woocommerce’ ) ) { $msg = sprintf( __( “You are getting $%s discounts.”, “woocommerce” ), ‘‘ . $coupon->get_amount() .…Continue reading