add_action( ‘wwlc_action_after_create_wholesale_lead’, function( WP_User $new_lead ) { // Retrieve opt-in meta matching the Custom Field ID configured in WWLC admin $opted_in = get_user_meta( $new_lead->ID, ‘klaviyo_subscribe’, true ); // Check both standard string and checkbox group array formats for the checked…Continue reading
/** * WPForms — Quantity-Aware Form Locker Inventory * * Makes WPForms Form Locker’s “Total Entry Limit” behave as a unit/inventory * counter instead of a submission counter. When a customer submits a form, * the quantity they selected is…Continue reading
/** * Rende collassabile (di default collassato) il box “Descrizione prodotto” * nella schermata di modifica prodotto WooCommerce (editor classico). * * Il contenuto vero viene gestito via UX Builder, quindi l’editor della * descrizione è normalmente rumore: lo si…Continue reading
/** * Recalculate the cart subtotal discount to exclude products that: * – belong to a specific product category e.g., ‘music’ , OR * – have an individual wholesale price set for the customer’s role. */ add_filter( ‘wwpp_cart_subtotal_based_discount’, ‘wwpp_recalculate_discount_for_eligible_items’ );…Continue reading
add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in…Continue reading
if ( ! is_admin() && isset($_SERVER[‘REQUEST_URI’])){ if(preg_match(‘/(wp-comments-post)/’, $_SERVER[‘REQUEST_URI’]) === 0 && !empty($_REQUEST[‘author’]) ) { wp_die(‘Du hast keine Rechte diese Adresse aufzurufen’); } }Continue reading