This plugin adds useful admin links and massive resources for the WooCommerce Shop Plugin to the WordPress Toolbar / Admin Bar.
Have Quicker Access to Your WooCommerce Shop Resources – Time Saver!
This small and lightweight plugin just adds a lot WooCommerce related resources to your WordPress Toolbar / Admin Bar.
Also links to all setting/ tab pages of the plugin are added making life for shop administrators/ webmasters a lot easier. So you might just switch from the frontend of your site to ‘Payment Settings’ page or check recent ‘Orders’ etc.
As the name suggests this plugin is intended towards admins/ webmasters/ shop managers. The new admin bar entries will only be displayed if the current user has the WooCommerce capability of manage_woocommerce
(a.k.a. user role “Shop Manager”). (Note: I am open for suggestions here if the default value should maybe changed to a more suitable capability. However, you can now tweak this also yourself using our new filter π
Currently supporting: 27 official premium extensions // 15 free third-party extensions // 13 third-party premium themes/frameworks // 1 free third-party theme // plus all official free/premium WooCommerce themes by WooThemes!
At this time the plugin out of the box supports links to settings pages of these WooCommerce-specific extensions/plugins:
At this time the plugin out of the box supports links to settings pages of these WooCommerce-specific themes:
woocommerce-admin-bar-addition.pot
) for translators is also always included πCredit where credit is due: This plugin here is inspired and based on the work of Remkus de Vries @defries and his original “WooThemes Admin Bar Addition” plugin.
A plugin from deckerweb.de and GenesisThemes
Enjoy using WooCommerce Admin Bar Addition? Please consider making a small donation to support the project’s continued development.
/wp-content/languages/wcaba/
(just create this folder) – This enables you to use fully custom translations that won’t be overridden on plugin updates. Also, complete custom English wording is possible with that, just use a language file like wcaba-en_US.mo/.po
to achieve that (for creating one see the following tools).Easy plugin translation platform with GlotPress tool:Translate “WooCommerce Admin Bar Addition”…
Note: All my plugins are internationalized/ translateable by default. This is very important for all users worldwide. So please contribute your language to the plugin to make it even more useful. For translating I recommend the awesome “Codestyling Localization” plugin and for validating the “Poedit Editor”, which works fine on Windows, Mac and Linux.
Idea Behind / Philosophy: Just a little leightweight plugin for all the WooCommerce shop managers out there to make their daily shop admin life a bit easier. Integration of extensions and third-party plugins & themes was also an important goal. — I’ll try to add even more plugin/theme support if it makes some sense. So stay tuned :).
WooCommerce News Planet I also have started a little news/feed service via “FriendFeed” that you can subscribe to: http://friendfeed.com/woocommerce-news — Please contact me via my Twitter for new resources (that have an RSS feed and are WooCommerce-related!)
Special Thanks go out to my family for allowing me to do such spare time projects (aka free plugins) and supporting me in every possible way!
General Extensions
Converters/ Importers
Of course, only extensions with own settings pages (which are linkable!) could be integrated. More extensions might be added as they become available and I could get my hands on the internal parameters… :-).
All the following custom & branding stuff code can also be found as a Gist on Github: https://gist.github.com/deckerweb/2173193 (you can also add your questions/ feedback there π
Add the following code to your active theme/child theme functions.php
file:
/** WooCommerce Admin Bar Addition: Add Order Status Links */ add_theme_support( 'wcaba-order-status' );
–> Links will appear under “Orders” item as sub-level links
Add the following code to your active theme/child theme functions.php
file:
/** WooCommerce Admin Bar Addition: Add Shop Pages Links */ add_theme_support( 'wcaba-shop-links' );
–> Links will appear between “Reports” and “Extensions” — also the WordPress capability edit_pages
is required – because you’ll want to edit your stuff right away π
This is possible since version 2.3 of the plugin! There are 4 action hooks available for hooking custom menu items in — wcaba_custom_main_items
for the main section, wcaba_custom_extension_items
for the exentensions section, wcaba_custom_theme_items
for the theme section plus wcaba_custom_group_items
for the resource group section. Here’s an example code:
add_action( 'wcaba_custom_group_items', 'wcaba_custom_additional_group_item' ); /** * WooCommerce Admin Bar Addition: Custom Resource Group Items * * @global mixed $wp_admin_bar */ function wcaba_custom_additional_group_item() { global $wp_admin_bar; $wp_admin_bar->add_menu( array( 'parent' => 'ddw-woocommerce-wcgroup', 'id' => 'your-unique-item-id', 'title' => __( 'Custom Menu Item Name', 'your-textdomain' ), 'href' => 'http://deckerweb.de/', 'meta' => array( 'title' => __( 'Custom Menu Item Name Tooltip', 'your-textdomain' ) ) ) ); }
To achieve this add one, some or all of the following constants to your active theme/child theme’s functions.php
file:
/** WooCommerce Admin Bar Addition: Remove ALL Items! */ define( 'WCABA_DISPLAY', FALSE ); /** WooCommerce Admin Bar Addition: Remove Extensions Items */ define( 'WCABA_EXTENSIONS_DISPLAY', FALSE ); /** WooCommerce Admin Bar Addition: Remove Themes Items */ define( 'WCABA_THEMES_DISPLAY', FALSE ); /** WooCommerce Admin Bar Addition: Remove Resource Items */ define( 'WCABA_RESOURCES_DISPLAY', FALSE ); /** WooCommerce Admin Bar Addition: Remove German Language Items */ define( 'WCABA_DE_DISPLAY', FALSE ); /** WooCommerce Admin Bar Addition: Remove Dutch Language Items */ define( 'WCABA_NL_DISPLAY', FALSE ); /** WooCommerce Admin Bar Addition: Remove Spanish Language Items */ define( 'WCABA_ES_DISPLAY', FALSE ); /** WooCommerce Admin Bar Addition: Remove Czech Language Items */ define( 'WCABA_CZ_DISPLAY', FALSE ); /** WooCommerce Admin Bar Addition: Remove WC Debug Link */ define( 'WCABA_DEBUG_DISPLAY', FALSE ); /** WooCommerce Admin Bar Addition: Remove Reports/Statistics */ define( 'WCABA_REPORTS_DISPLAY', FALSE );
–> You can also combine these with conditional if
statements to customize this even more, for example:
If you want to disable the display of any “WooCommerce Admin Bar Addition” items for all user roles of “Editor” please use this code:
/** WooCommerce Admin Bar Addition: Remove all items for "Editor" user role */ if ( current_user_can( 'editor' ) ) { define( 'WCABA_DISPLAY', FALSE ); }
To hide the “Extensions” section only from a user with the user ID of “2”, just use this code:
/** WooCommerce Admin Bar Addition: Remove all items for user ID 2 */ if ( 2 == get_current_user_id() ) { define( 'WCABA_EXTENSIONS_DISPLAY', FALSE ); }
All filters are listed with the filter name in bold and the below additional info, helper functions (if available) as well as usage examples.
wcaba_filter_capability_all
manage_woocommerce
(set by “WooCommerce” plugin itself, the main capability for shop managers!)5 Predefined helper functions:
__wcaba_admin_only
— returns 'administrator'
role — usage:add_filter( ‘wcaba_filter_capability_all’, ‘__wcaba_admin_only’ );
__wcaba_role_shop_manager
— returns 'shop_manager'
role — usage:add_filter( ‘wcaba_filter_capability_all’, ‘__wcaba_role_shop_manager’ );
__wcaba_role_editor
— returns 'editor'
role — usage:add_filter( ‘wcaba_filter_capability_all’, ‘__wcaba_role_editor’ );
__wcaba_cap_manage_options
— returns 'manage_options'
capability — usage:add_filter( ‘wcaba_filter_capability_all’, ‘__wcaba_cap_manage_options’ );
__wcaba_cap_install_plugins
— returns 'install_plugins'
capability — usage:add_filter( ‘wcaba_filter_capability_all’, ‘__wcaba_cap_install_plugins’ );
Another example:
add_filter( ‘wcaba_filter_capability_all’, ‘custom_wcaba_capability_all’ );
/**
–> Changes the capability to edit_theme_options
wcaba_filter_main_icon
7 Predefined helper functions for the 6 included colored icons, returning special colored icon values – the helper function always has this name: __wcaba_colornamehere_icon()
this results in the following filters ready for usage:
add_filter( ‘wcaba_filter_main_icon’, ‘__wcaba_blue_icon’ );
add_filter( ‘wcaba_filter_main_icon’, ‘__wcaba_grey_icon’ );
add_filter( ‘wcaba_filter_main_icon’, ‘__wcaba_orange_icon’ );
add_filter( ‘wcaba_filter_main_icon’, ‘__wcaba_pink_icon’ );
add_filter( ‘wcaba_filter_main_icon’, ‘__wcaba_red_icon’ );
add_filter( ‘wcaba_filter_main_icon’, ‘__wcaba_teal_icon’ );
add_filter( ‘wcaba_filter_main_icon’, ‘__bptb_theme_images_icon’ );
–> Where the last helper function returns the icon file (icon-wcaba.png
) found in your current theme’s/child theme’s /images/
subfolder
Another example:
add_filter( ‘wcaba_filter_main_icon’, ‘custom_wcaba_main_icon’ );
/**
–> Uses a custom image from your active theme’s /images/
folder
–> Recommended dimensions are 16px x 16px
wcaba_filter_main_icon_display
icon-woocommerce
(class is: .icon-woocommerce
)1 Predefined helper function:
__wcaba_no_icon_display()
— usage:add_filter( ‘wcaba_filter_main_icon_display’, ‘__wcaba_no_icon_display’ );
Another example:
add_filter( ‘wcaba_filter_main_icon_display’, ‘custom_wcaba_main_icon_display_class’ );
/**
–> You then have to define CSS rules in your theme/child theme stylesheet for your own custom class .your-custom-icon-class
wcaba_filter_main_item
Example code for your theme’s functions.php
file:
add_filter( ‘wcaba_filter_main_item’, ‘custom_wcaba_main_item’ );
/**
wcaba_filter_main_item_tooltip
Example code for your theme’s functions.php
file:
add_filter( ‘wcaba_filter_main_item_tooltip’, ‘custom_wcaba_main_item_tooltip’ );
/**
wcaba_filter_woocommerce_name and wcaba_filter_woocommerce_name_tooltip
Final note: If you don’t like to add your customizations to your theme’s functions.php
file you can also add them to a functionality plugin or an mu-plugin. This way you can also use this better for Multisite environments. In general you are then more independent from theme changes etc.
All the custom & branding stuff code above can also be found as a Gist on Github: https://gist.github.com/deckerweb/2173193 (you can also add your questions/ feedback there π
woocommerce-admin-bar-addition
folder to the /wp-content/plugins/
directoryNote: This plugin has NO settings page because I believe it’s just not neccessarry. All customizing could be done via action hooks, filters, constants and regular WordPress user roles & capabilities (see “Other Notes” section here). As the plugin is indended for a shop manager/ admin/ webmaster use that’s the way to go. This way we can save the overhaul of an options panel/settings page, additional database requests, uninstall routines and such. End result: a lightweight system that just works and saves clicks & time :-).
Multisite install: Yes, it’s fully compatible but have a look in the FAQ section here for more info π
Own translation/wording: For custom and update-secure language files please upload them to /wp-content/languages/wcaba/
(just create this folder) – This enables you to use fully custom translations that won’t be overridden on plugin updates. Also, complete custom English wording is possible with that, just use a language file like wcaba-en_US.mo/.po
to achieve that (for creating one see the tools on “Other Notes”).
WooCommerce Toolbar / Admin Bar Addition in action - default status. (Click here for larger version of screenshot)
WooCommerce Toolbar / Admin Bar Addition in action - shop settings, plus sub items. (Click here for larger version of screenshot)
WooCommerce Toolbar / Admin Bar Addition in action - support & resources links. (Click here for larger version of screenshot)
WooCommerce Toolbar / Admin Bar Addition in action - more WooCommerce related resources. (Click here for larger version of screenshot)
WooCommerce Toolbar / Admin Bar Addition in action - with German translation active, and German language plugin support. (Click here for larger version of screenshot)
WooCommerce Toolbar / Admin Bar Addition in action - mobile support: view your orders on the go :). (Click here for larger version of screenshot)
WooCommerce Toolbar / Admin Bar Addition in action - plugin help tab. (Click here for larger version of screenshot)
Just drop me a note on my Twitter @deckerweb or via my contact page and I’ll add the link if it is useful for admins/ webmasters and the WooCommerce community.
This is possible of course and highly welcomed! Just drop me a note on my Twitter @deckerweb or via my contact page and we sort out the details!
Particularly, I need the admin url for the primary options page (like so wp-admin/admin.php?page=foo
) – this is relevant for both, plugins and themes. For themes then I also need the correct name defined in the stylesheet (like so Footheme
).
Simple answer: The settings of these add-ons are added directly to the various WooCommerce settings pages or tabs and have no anchor to link to. So linking/ adding is just impossible.
All this could be done via our filters and constants. Really lightweight and simple. Just step up the “Other Notes” area here and scroll down to the proper section.
Yes, it is! π Works really fine in Multisite invironment – here I just recommend to activate on a per site basis so to load things only where and when needed.
Yes, you could. — However, it doesn’t make much sense. The plugin is intented for a per site use as the admin links refer to the special settings, plugin-support and theme-support for that certain site/blog. So if you have a Multisite install with 5 sites but only 3 would run “WooCommerce” then the other 2 sites will only see support links in the Toolbar / Admin Bar… I guess, you got it? π
Though intended for a per site use it could make some sense in such an edge case: if all of the sites in Multisite use WooCommerce and have lots of WooCommerce-specific plugins in common and use the same theme/framework. This might be the case if you use Multisite for multilingual projects, especially via that awesome plugin: https://wordpress.org/plugins/multilingual-press/
This plugin has NO settings page because I believe it’s just not neccessarry. All customizing could be done via CSS styling, filters, constants and regular WordPress user roles & capabilities. As the plugin is indended for a shop manager/ admin/ webmaster use that’s the way to go. This way we can save the overhaul of an options panel/ settings page, additional database storing & requests, uninstall routines and such. End result: a lightweight system that just works and saves clicks & time :-).
wcaba
to woocommerce-admin-bar-addition
to match the plugin’s slug!constants
in your active theme/child theme — this way you can customize for your staff members if you need some more users with extended or restricted admin bar/toolbar access (See “Other Notes” here)add_theme_support
you can now add all WooCommerce order status with counters to the “Orders” item — I decided to make it optional because getting the counts will need a database call, so not every admin will want this! (See “Other Notes” here)add_theme_support
you can now add all frontend shop links (all special shop, cart etc. pages) to the main level “Orders” — not every shop manager needs that so I decided to make it optional (See “Other Notes” here)/wp-content/languages/wcaba/
(just create this folder) – this enables you to use fully custom wording or translations