// WooCommerce Wholesale Prices Premium × WPML — bulk sync wholesale prices to translated products. // Add to functions.php. Visit: /wp-admin/?wwp_wpml_sync=1 as admin. Remove after use. add_action( ‘init’, function () { if ( ! current_user_can( ‘manage_options’ ) || empty( $_GET[‘wwp_wpml_sync’]…Continue reading
/* WWPP – Add the “MSRP” or “MAP” label to the regular price for wholesale customers */ add_action( ‘wp_head’, function() { global $wc_wholesale_prices_premium; $user_wholesale_role = $wc_wholesale_prices_premium->wwpp_wholesale_roles->getUserWholesaleRole(); if ( !empty( $user_wholesale_role ) ) { echo ‘ ‘; } });Continue reading
// // // ADMIN UI: SHOW FEATURED IMAGE COLUMN AND SLUG BELOW POST TITLE // Adds a thumbnail column to the posts and pages list tables in the admin for faster visual // identification. The post slug is displayed inline…Continue reading
// // // ADMIN UI: HIDE ACF FIELDS WITH CLASS u-dnone // Allows specific ACF fields to be conditionally hidden in the editor by assigning them the // u-dnone class via field settings. Useful for internal or deprecated fields that…Continue reading
// // // PERFORMANCE: REDUCE HEARTBEAT API INTERVAL IN ADMIN // WordPress fires Heartbeat requests every 15–60 seconds by default, generating continuous AJAX // load on the server. Reducing the interval to 120 seconds keeps auto-save and session detection //…Continue reading
// // // SECURITY: DISABLE XML-RPC // XML-RPC is a legacy WordPress remote access protocol that is rarely needed on modern sites. // It is a common vector for brute-force and DDoS amplification attacks. This filter disables it // entirely,…Continue reading
add_action(‘wp_head’, function() { if (!is_admin_bar_showing()) return; ?>Continue reading
/** * Suppress WWP’s per-item cart recalculation during Wholesale Order Form batch adds. * Defers to a single recalculation at the end of each batch request instead. * * Add to functions.php or a mu-plugin. * Requires: Wholesale Prices 2.2.8+,…Continue reading
if ( ! isset( $GLOBALS[‘post_md_rec_shown’] ) ) { $GLOBALS[‘post_md_rec_shown’] = []; } $already_shown = &$GLOBALS[‘post_md_rec_shown’]; // Theme unique_ids einlesen und mit eigener Liste zusammenführen $unique_ids = get_query_var( ‘unique_ids’, [] ); $already_shown = array_unique( array_merge( $already_shown, $unique_ids ) ); $post =…Continue reading