Paramount Site

add_shortcode(‘paramount_site’, function () { ob_start(); ?> PARAMOUNT CONTACT PARTNERS Revenue Appointments Contact Let’s Talk → DTC Retention · Payment Recovery · Reactivation We Don’t RunCall CentersWe Build Revenue Engines. Most companies lose money in the exact place they should be…Continue reading

Tiered Affiliate Rates — Per-Group Tier Structures

add_filter( ‘affwp_get_affiliate_rate’, function( $rate, $affiliate_id, $type ) { // Respect individual rates — if the affiliate has one set manually, skip group tiers. $affiliate_rate = affiliate_wp()->affiliates->get_column( ‘rate’, $affiliate_id ); if ( ! empty( $affiliate_rate ) ) { return $rate; }…Continue reading

Rest API Custom Field

add_action( ‘init’, function() { register_meta( ‘post’, ‘_wpai_unique_key’, array( ‘type’ => ‘string’, // ‘string’, ‘number’, ‘boolean’, ‘integer’, ‘array’, or ‘object’ ‘single’ => true, ‘show_in_rest’ => true, // Required to show in API ) ); });Continue reading

WWPP – Restrict add-to-cart on specific products to a specific wholesale role only

// 1. Make the product unpurchasable for non-doctors add_filter( ‘woocommerce_is_purchasable’, ‘wws_restrict_purchase_for_doctors’, 10, 2 ); function wws_restrict_purchase_for_doctors( $is_purchasable, $product ) { $allowed_role = ‘doctors’; $restricted_category = ‘doctors-only’; $product_id = $product->is_type( ‘variation’ ) ? $product->get_parent_id() : $product->get_id(); if ( has_term( $restricted_category, ‘product_cat’,…Continue reading

Removal Redirect

add_action(‘template_redirect’, function () { if (is_admin()) { return; } $request_path = trim(parse_url($_SERVER[‘REQUEST_URI’], PHP_URL_PATH), ‘/’); // Match /removal-request/ on any mapped subsite domain if ($request_path === ‘removal-request’) { wp_safe_redirect(home_url(‘/privacy-policy-2/’), 301); exit; } });Continue reading