Helper Functions
These procedural helpers live in includes/reign_wc_vendors_core_functions.php and are available on both the front end and admin. All are wrapped in function_exists() guards so a theme or sibling addon can predefine them.
Store data
Section titled “Store data”| Function | Returns |
|---|---|
reign_wc_vendors_format_store_address( $vendor_id ) |
The vendor address as a comma-joined string, built from the WC Vendors address, city, state, postcode, and country fields. Filterable via reign_wc_vendors_format_store_address_args and reign_wc_vendors_format_store_address_output. |
reign_wc_vendors_format_store_url( $vendor_id ) |
The store website as an anchor tag, or an empty string when no URL is set. Filterable via reign_wc_vendors_format_store_url. |
reign_wc_vendors_format_store_social_icons( $vendor_id, $size = 'sm', $hidden = array() ) |
The store social icons as a <ul>, or nothing. Returns early when WCV_PRO_PUBLIC_ASSETS_URL is undefined, because the icon sprite ships with WC Vendors Pro. |
reign_wc_vendors_banner_image( $vendor_id ) |
An inline style attribute for the store banner background (WC Vendors Pro). |
reign_wc_vendors_stor_icon( $vendor_id, $width = 150, $height = 150 ) |
The store icon URL, falling back to the vendor avatar. |
reign_wc_vendors_shop_description( $vendor_id ) |
The store description, stripped of tags and shortcodes and trimmed to the limit from reign_wc_vendors_shop_description_limit (default 350). |
reign_wc_vendors_shop_rating( $vendor_id ) |
Echoes the vendor rating link (WC Vendors Pro, when ratings are enabled). |
reign_wc_vendors_vendor_products( $vendor_id ) |
Echoes up to three of the vendor’s product thumbnails, with a link to the store when there are more. |
Sales count
Section titled “Sales count”| Function | Returns |
|---|---|
reign_wcvendors_get_vendor_total_sales( $vendor_id ) |
The vendor’s order count for the free version, cached for one hour. Uses an aggregated query against the WooCommerce order-product lookup table, and falls back to scanning orders only when that table is absent. Supports both HPOS and legacy order storage. |
Two lower-level helpers back this: reign_wcvendors_count_vendor_sales_via_lookup() (aggregated query) and reign_wcvendors_count_vendor_sales_via_scan() (legacy fallback).
Utility
Section titled “Utility”| Function | Returns |
|---|---|
rwcv_user_meta( $meta_key, $user_id ) |
The user meta value, or 0 when empty. |
reign_wcvendors_is_truthy( $value ) |
A boolean, matching the Reign theme’s reign_is_truthy(). Use it to read customizer switches. |
wcv_check_js_css_load() |
True on pages where the addon’s assets should load (community profile and directory pages, WooCommerce product and shop pages, and the WC Vendors dashboard and vendor-list pages). |
reign_wc_vendors_get_social_media_settings() |
The social platforms map (Twitter, Instagram, Facebook, LinkedIn, YouTube, Pinterest, Snapchat, Telegram) with field id, label, icon, and URL template. Filterable via reign_wc_vendors_get_social_media_settings. |
EDD license options
Section titled “EDD license options”The license integration stores two options: Reign_Wcvendors_Addon_edd_license_key and Reign_Wcvendors_Addon_edd_license_status. The license panel renders into the Reign theme’s premium-addon license area.

