Add extra tab to WooCommerce that points to job dashboard
-
I’ve added an extra tab to the WooCommerce dashboard.
It displays the job dashboard and I can edit jobs but I can’t mark a job as filled, duplicate a job or delete a job.This is the code I use.
// Register new endpoint to use for My Account page // Note: Resave Permalinks or it will give 404 error function jm_add_domein_beheer_endpoint() { add_rewrite_endpoint( 'manage-jobs', EP_ROOT | EP_PAGES ); } add_action( 'init', 'jm_add_domein_beheer_endpoint' ); // Add new query var function jm_domein_beheer_query_vars( $vars ) { $vars[] = 'manage-jobs'; return $vars; } add_filter( 'query_vars', 'dc_domein_beheer_query_vars', 0 ); // Insert the new endpoint into the My Account menu function jm_add_domein_beheer_link_my_account( $items ) { $items['manage-jobs'] = 'Manage Jobs'; return $items; } add_filter( 'woocommerce_account_menu_items', 'jm_add_domein_beheer_link_my_account' ); // Add content to the new endpoint function jm_domein_beheer_content() { echo do_shortcode( ' [job_dashboard] ' ); } add_action( 'woocommerce_account_domein-beheer_endpoint', 'dc_domein_beheer_content' );
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Add extra tab to WooCommerce that points to job dashboard’ is closed to new replies.