/** * Disable and Redirect the Wholesale Suite Dashboard to reduce admin bloat and improve load times. */ // 1. Remove the Dashboard submenu page from the admin menu add_action( ‘admin_menu’, ‘wws_remove_dashboard_submenu’, 9999 ); function wws_remove_dashboard_submenu() { // Parent slug…Continue reading
add_action(‘woocommerce_order_status_completed’, ‘send_order_to_google_sheets’, 10, 1); function send_order_to_google_sheets($order_id) { $order = wc_get_order($order_id); if (!$order) return; $line_items = $order->get_items(); $product_ids = array(); $product_names = array(); foreach ($line_items as $item) { $product_ids[] = $item->get_product_id(); $product_names[] = $item->get_name(); } $data = array( ‘id’ => $order->get_id(),…Continue reading
if ( ! function_exists( ‘rd_wc_subscription_renewal_coupon_locked_context’ ) ) { function rd_wc_subscription_renewal_coupon_locked_context(): bool { if ( is_admin() && ! wp_doing_ajax() ) { return false; } if ( ! function_exists( ‘WC’ ) ) { return false; } if ( function_exists( ‘wcs_cart_contains_renewal’ ) &&…Continue reading
/* Default Wholesale Leads list to sort by registration date (newest first) */ add_action( ‘pre_user_query’, function( $user_query ) { if ( ! defined( ‘REST_REQUEST’ ) || ! REST_REQUEST ) { return; } if ( false === strpos( $_SERVER[‘REQUEST_URI’] ?? ”,…Continue reading
// Show retail reference price including tax for specific wholesale roles only // Requires: WWPP Settings > Tax > “Tax Display on Wholesale Price” = “Excluding Tax” add_filter( ‘wwp_product_original_price’, function( $price_html, $wholesale_price, $product_price, $product, $user_wholesale_role ) { $target_roles = array(…Continue reading