Broken variations checker

add_action(‘init’, function () { if (!current_user_can(‘manage_woocommerce’)) { return; } if (!isset($_GET[‘broken_variable_products’])) { return; } $product_ids = get_posts([ ‘post_type’ => ‘product’, ‘posts_per_page’ => -1, ‘fields’ => ‘ids’, ‘tax_query’ => [ [ ‘taxonomy’ => ‘product_type’, ‘field’ => ‘slug’, ‘terms’ => [‘variable’], ]…Continue reading

PPMX Security Essentials 2026

// Sitemap deaktivieren add_filter(‘wp_sitemaps_enabled’, ‘__return_false’); // Globale Auto-Updates deaktivieren if (!defined(‘AUTOMATIC_UPDATER_DISABLED’)) { define(‘AUTOMATIC_UPDATER_DISABLED’, true); } // XML-RPC deaktivieren add_filter(‘xmlrpc_enabled’, ‘__return_false’); // Generator Meta-Tag entfernen add_filter(‘the_generator’, ‘__return_empty_string’); // Core / Plugin / Theme Updates deaktivieren add_filter(‘auto_update_core’, ‘__return_false’); add_filter(‘auto_update_plugin’, ‘__return_false’); add_filter(‘auto_update_theme’, ‘__return_false’);…Continue reading

WordPress Post Views Counter Function (copy)

function wpb_set_post_views($postID) { $count_key = ‘wpb_post_views_count’; $count = get_post_meta($postID, $count_key, true); if($count==”){ $count = 0; delete_post_meta($postID, $count_key); add_post_meta($postID, $count_key, ‘0’); }else{ $count++; update_post_meta($postID, $count_key, $count); } } //Get rid of prefetching to keep the count accurate remove_action( ‘wp_head’, ‘adjacent_posts_rel_link_wp_head’, 10,…Continue reading