2
Checking the action hooks API reference, "activated_plugin" is an Advanced hook. It operates outside the normal loop which would permit you to do what you want.
A better way would be to add_action('admin_footer_text'), as illustrated in this WPBeginner article.
However, if you only want this to show when a particular plugin is activated, you can add the ...
1
Thist function not working in product page
is_product_category()
So, for me the best options is first get the terms of the current post and the next step is get the name or slug, in this case i chose the category name
$product_cat_name = $term->name;
But you can chose the slug too (better option)
$product_cat_slug = $term->slug;
Here the ...
1
make the slug of parent menu item and sub menu same (first one item) like below
function acutions_recent_bids_add_admin_page(){
add_menu_page('Recent Bids', 'Auction Reports', 'manage_options','wc-auction-reports','acutions_recent_bids_list','dashicons-chart-area', 56);
add_submenu_page(
'wc-auction-reports', // parent slug
'Recent Bids', ...
Only top voted, non community-wiki answers of a minimum length are eligible
Related Tags
plugin-development × 5184plugins × 1469
php × 492
theme-development × 314
custom-post-types × 291
hooks × 234
functions × 211
customization × 211
ajax × 188
woocommerce × 157
filters × 154
actions × 147
shortcode × 143
javascript × 140
jquery × 138
options × 135
wp-admin × 134
database × 130
widgets × 120
settings-api × 99
wp-query × 91
wp-enqueue-script × 88
forms × 82
posts × 81
custom-field × 81