Skip to content

Instantly share code, notes, and snippets.

@digitalchild
Created July 3, 2021 05:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save digitalchild/3b1158add8c7324e7af99947db631b55 to your computer and use it in GitHub Desktop.
Save digitalchild/3b1158add8c7324e7af99947db631b55 to your computer and use it in GitHub Desktop.
Override the WC Vendors Pro Dashboard open partial
<?php
// This will assume you have created a directory in your theme called wc-vendors/partials/
// Then added the override file here.
add_filter( 'wcvendors_pro_dashboard_open_path', 'wcv_override_dashboard_open_path' );
function wcv_override_dashboard_open_path( $path ){
$path = get_stylesheet_directory(). '/wc-vendors/partials/wcvendors-pro-dashboard-open.php';
return $path;
}
@digitalchild
Copy link
Author

You can override any template partial as long as you have the partial override located within your theme.

This will override the product table actions partial.

// This will assume you have created a directory in your theme called wc-vendors/partials/ 
// Then added the override file here. 
add_filter( 'wcv_product_table_actions_path', 'wcv_override_product_table_actions_path' ); 
function wcv_override_product_table_actions_path( $path ){
	$path = get_stylesheet_directory(). '/wc-vendors/partials/product/wcvendors-pro-table-actions.php'; 
	return $path; 
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment