Skip to content

Template Overrides

Woo Sell Services uses a template system that allows themes to override plugin templates without modifying plugin files.

The plugin checks for template files in two locations, in this order:

  1. Theme directory: your-theme/woo-sell-services/
  2. Plugin directory: woo-sell-services/public/templates/

If a matching template exists in your theme, it is used instead of the plugin’s version. The theme path can be changed using the woo_sell_services_addon_template_path filter (default: woo-sell-services/).

  1. Find the template you want to customize in woo-sell-services/public/templates/
  2. Create a woo-sell-services/ directory in your active theme
  3. Copy the template file into your theme’s woo-sell-services/ directory
  4. Edit the copied file

The plugin will automatically load your theme’s version.

Template File Purpose
single-order-service.php Main service order detail page (conversations, deliveries, reviews)
single-subscription-service.php Subscription service order page with renewal navigation
service-single.php Router template that loads regular or subscription template
service-provider.php Dokan vendor dashboard service provider tab
wcfm-service-provider.php WCFM vendor dashboard service provider page
wss-requirement-form-template.php Customer requirement submission form
woo-sell-requirement-template.php Display of filled/submitted requirements
wss-services-notification.php Notifications list page

Email templates follow the WooCommerce override pattern:

  1. Find templates in woo-sell-services/woocommerce/templates/emails/
  2. Copy to your-theme/woocommerce/emails/
Template Purpose
customer-submit-requirement.php Requirement submission prompt to customer
customer-order-ready.php Delivery ready notification to customer
admin-order-accepted.php Delivery accepted notification to vendor
admin-order-rejected.php Delivery rejected notification
customer-vendor-order-conversation.php Conversation message notification
admin-requirements-received.php Requirements received notification to vendor
plain/*.php Plain text versions of all emails above

Use the wb_wss_get_public_template filter to programmatically override template paths:

add_filter( 'wb_wss_get_public_template', function( $template_path, $template, $args ) {
if ( strpos( $template, 'single-order-service.php' ) !== false ) {
return get_stylesheet_directory() . '/custom-templates/my-order-service.php';
}
return $template_path;
}, 10, 3 );

Each template receives specific variables through WordPress’s include mechanism. Check the plugin’s template files to see which variables are available. Common variables include:

Variable Available In Type
$order_id Most templates int
$product_id Most templates int
$item_id Most templates int
$user_id Most templates int
$messages single-order-service.php array
$notifications wss-services-notification.php array
  • Always start with a copy of the original template to maintain expected variable usage
  • Test thoroughly after plugin updates, as template structure may change
  • Keep customizations minimal to reduce maintenance burden
  • Use hooks and filters when possible instead of full template overrides