Skip to content

Template Overrides

The addon overrides one WC Vendors template: the store header. You can override it again from your theme without editing the plugin.

  • Plugin path: templates/wc-vendors/store/store-header.php
  • Template name: store-header.php
  • Template path segment: wc-vendors/store/

The header is loaded with WooCommerce’s wc_get_template(), and the addon hooks woocommerce_locate_template to resolve the path. The lookup order is:

  1. your-child-theme/wc-vendors/store/store-header.php
  2. your-theme/wc-vendors/store/store-header.php
  3. The plugin copy in templates/wc-vendors/store/store-header.php

To customize the header, copy the plugin template to wc-vendors/store/store-header.php inside your theme and edit the copy.

The header template receives:

  • $vendor_id: the vendor user ID.
  • $vendor_meta: a flattened map of the vendor’s user meta.

Inside the template these are used to read the WC Vendors store fields (pv_shop_name, pv_shop_description, _wcv_store_icon_id, _wcv_store_banner_id, _wcv_store_phone, address fields, social fields, _wcv_verified_vendor, _wcv_trusted_vendor, and opening hours), and the customizer switches through get_theme_mod().

The template reads switches through reign_wcvendors_is_truthy(), which mirrors the Reign theme’s reign_is_truthy(). Use this helper rather than a raw truthiness check so that both the current 1/0 storage and legacy string values (off, no) evaluate correctly. When you add your own switch-driven markup to an override, always verify the off state renders as expected.