add_action( ‘woocommerce_subscription_date_updated’, function( $subscription, $date_type ) { // Only proceed if it’s a next_payment date change if ( ‘next_payment’ !== $date_type || is_admin() ) { return; } // Make sure WP Fusion is active if ( ! function_exists( ‘wp_fusion’ )…Continue reading
function wpf_tags_body_class( $classes ) { if ( ! function_exists( ‘wp_fusion’ ) ) { return $classes; } if( ! wpf_is_user_logged_in() || wpf_admin_override() ) { return $classes; } $tags = wp_fusion()->user->get_tags(); if( ! empty( $tags ) ) { foreach( $tags as $tag_id…Continue reading
function rd_watch_selected_wpf_meta_fields( $fields ) { $fields[] = ‘example_user_meta_name_1’; // Add real user meta field name/key $fields[] = ‘example_user_meta_name_1’; // Add real user meta field name/key $fields[] = ‘example_user_meta_name_1’; // Add real user meta field name/key, add more rows as required…Continue reading
add_filter( ‘charitable_default_donation_fields’, function( $fields ) { if ( isset( $fields[‘title’] ) ) { // Remove from the donation form entirely $fields[‘title’][‘donation_form’] = false; } return $fields; }, 20 );Continue reading
add_action( ‘template_redirect’, ‘rd_preload_marked_theme_background_images’, 1 ); function rd_preload_marked_theme_background_images() { if ( is_admin() || wp_doing_ajax() || wp_is_json_request() ) { return; } if ( defined( ‘REST_REQUEST’ ) && REST_REQUEST ) { return; } if ( is_feed() || is_trackback() || is_robots() || is_embed() )…Continue reading
add_action(‘template_redirect’, function () { if (isset($_GET[‘rd_test_wp_die’])) { if (!defined(‘DONOTCACHEPAGE’)) { define(‘DONOTCACHEPAGE’, true); } if (!defined(‘DONOTCACHEDB’)) { define(‘DONOTCACHEDB’, true); } if (!defined(‘DONOTMINIFY’)) { define(‘DONOTMINIFY’, true); } nocache_headers(); wp_die(‘This would be the default WordPress Admin Error Message.’); } });Continue reading
/** * Convert Uploaded Images to WebP Format * * This snippet converts uploaded images (JPEG, PNG, GIF) to WebP format * automatically in WordPress. Ideal for use in a theme’s functions.php file, * or with plugins like Code Snippets…Continue reading
/** * Convert Uploaded Images to WebP Format * * This snippet converts uploaded images (JPEG, PNG, GIF) to WebP format * automatically in WordPress. Ideal for use in a theme’s functions.php file, * or with plugins like Code Snippets…Continue reading