Type: php
WWPP & Elementor – Show correct wholesale prices in the Elementor side cart
/** * WWPP & Elementor: show correct wholesale prices in Elementor side cart. */ add_filter( ‘woocommerce_cart_item_price’, function ( $price_html, $cart_item, $cart_item_key ) { if ( is_cart() || is_checkout() ) { return $price_html; } global $wc_wholesale_prices_premium, $wc_wholesale_prices; if ( ! isset(…Continue reading
WWLC – Route logout through home URL to prevent exposing the hidden login path
/** * Route logout through home URL to prevent exposing the hidden login path. */ add_filter( ‘logout_url’, function ( $logout_url, $redirect ) { $redirect_to = $redirect ?: home_url( ‘/’ ); return add_query_arg( [ ‘do_logout’ => ‘1’, ‘_wpnonce’ => wp_create_nonce( ‘safe-logout’…Continue reading
Test
echo “test”;Continue reading
WWPP & WPML: bulk sync wholesale prices to translated products
// 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
dd the “MSRP” or “MAP” label to the regular price for wholesale customers
/* 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
Untitled Snippet
PHP: [AdminOnly]: List Customizations: Image + Slug
// // // 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
PHP: [RunEverywhere]: ACF Improvements
// // // 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
PHP: [AdminOnly]: Perfomance + Accessibility + Security
// // // 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