Skip to content

Commit

Permalink
Add support for template fo dokan status.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aunshon committed Jan 14, 2025
1 parent 30232b8 commit 4a33fdd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
15 changes: 14 additions & 1 deletion includes/VendorNavMenuChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,20 @@ class VendorNavMenuChecker {
* @var array $template_dependencies List of template dependencies.
* [ 'route' => [ ['slug' => 'template-slug', 'name' => 'template-name' (Optional), 'args' = [] (Optional) ] ] ]
*/
protected array $template_dependencies = [];
protected array $template_dependencies = [
'withdraw' => [
[ 'slug' => 'withdraw/withdraw-dashboard' ],
[ 'slug' => 'withdraw/withdraw' ],
[ 'slug' => 'withdraw/header' ],
[ 'slug' => 'withdraw/status-listing' ],
[ 'slug' => 'withdraw/pending-request-listing' ],
[ 'slug' => 'withdraw/approved-request-listing' ],
[ 'slug' => 'withdraw/cancelled-request-listing' ],
[ 'slug' => 'withdraw/tmpl-withdraw-request-popup' ],
[ 'slug' => 'withdraw/request-form' ],
[ 'slug' => 'withdraw/pending-request-listing-dashboard' ],
],
];

/**
* Constructor.
Expand Down
11 changes: 6 additions & 5 deletions includes/functions-dashboard-navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ function dokan_get_dashboard_nav(): array {
'permission' => 'dokan_view_order_menu',
],
'withdraw' => [
'title' => __( 'Withdraw', 'dokan-lite' ),
'icon' => '<i class="fas fa-upload"></i>',
'url' => dokan_get_navigation_url( 'withdraw' ),
'pos' => 70,
'permission' => 'dokan_view_withdraw_menu',
'title' => __( 'Withdraw', 'dokan-lite' ),
'icon' => '<i class="fas fa-upload"></i>',
'url' => dokan_get_navigation_url( 'withdraw' ),
'pos' => 70,
'permission' => 'dokan_view_withdraw_menu',
'react_route' => 'withdraw',
],
'settings' => [
'title' => __( 'Settings', 'dokan-lite' ),
Expand Down

0 comments on commit 4a33fdd

Please sign in to comment.