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

Charitable: Force PayPal Legacy gateway

/** * Charitable — Force PayPal Legacy gateway on this site. * * Overrides Charitable Pro 1.8.15+ PayPal tier detection at read-time * so the legacy `paypal` gateway stays visible (and PayPal Commerce stays * hidden) regardless of what was…Continue reading