WWLC – Sync the Wholesale Lead Data to Klaviyo

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

Disable comments

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

Completely Disable Comments

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