Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

The tag has no usage guidance.

0
votes
0answers
17 views

Notice in WooCommerce

I am getting below notice in WooCommerce. Notice: WC_Product::get_rating_html is deprecated since version 3.0! Use wc_get_rating_html instead. in How can I remove it ?
0
votes
0answers
16 views

How to do persistent data on Front End?

I´m doing a plugin with a member system. I need to : display notices ( error, warning, info ) for visitors when they fill the form to subscribe. To match with my core project, I need a system with a ...
0
votes
1answer
304 views

relocate woocommerce notices/messages on Cart page

EDIT: see solution below from @motivast. With his basic setup you can then make whatever changes you'd like to specific auto-scroll actions and relocate whichever specific notices you want. My final ...
0
votes
1answer
18 views

Hide admin notice when user profile updated

I added an admin notice to the subscribers profile screen to invite them to complete their profile's extra fields. How can the notice hide automatically when the user updates the profile? When a user ...
0
votes
0answers
21 views

Content Locked notice

can someone please help me to figure out how to hide the avatar of the user who is currently editing, and display the role of the user instead of their name? For example: Author will be blocked from ...
1
vote
2answers
202 views

Warning Notice $wpdb->prepare incorrect number of arguments passed

I am receiving this notice when trying to use the $wpdb->prepare function: Notice: wpdb::prepare was called incorrectly. The query does not contain the correct number of placeholders (7) for the ...
0
votes
1answer
32 views

admin notice on Insert Media popup screen

I want an admin notice box on all media upload pages. I did that for media library page by code add_action( 'load-upload.php', array( $this, 'media_library_message_load' ) ); public function ...
0
votes
1answer
52 views

Problem with display data from get_option

I have a problem with get_option function. I created options page with one field for testing in form. Everything saving data to database, but when i try display it i getting "Undefined index", but ...
0
votes
1answer
182 views

Dynamically set taxonomy term and show admin notice on post save

I have a taxonomy of "date" listing all months of the year. And I have a custom field of "start_date". I would like to update the 'date' taxonomy dynamically so the user doesnt need to click both when ...
3
votes
1answer
40 views

How to add a link to the tax term in the admin Edit page?

I have a custom taxonomy, 'genre.' I'd like my editors, from the 'Edit Genre' screen (in the admin), to be able to link to the front end page for that genre/term. So, at the top of the 'Edit Genre' ...
0
votes
0answers
33 views

Get property of non-object on theme activation

I am getting a notice from the reviewer: Make sure that your template doesn’t raise any PHP errors, notices or warnings on activation. Enabling wp_debug and using the Debug Bar plugin can help ...
0
votes
1answer
14 views

Find out if post was just updated on post edit screen

Is it possible to add an admin_notice to the post.php edit screen in the admin– only if the post was just updated. function my_admin_notice(){ global $pagenow; if ( $pagenow == 'post.php' ) { ...
1
vote
1answer
48 views

How to inform the user that the save was not successful?

When saving a post, i have a meta box in which the user must put something. If the user input is something when i do not accept, how will i tell him? add_action('save_post' , 'my_save_metaboxe_data');...
1
vote
1answer
53 views

How to customize post edit notices

How to customize the notice message ('Post published' or 'Post updated') displayed when I add or edit a custom post type registered with register_post_type() function?
1
vote
0answers
37 views

Display popup or admin-notice after add new categories

I need to display an admin notice or better a js popup after adding a new category. In my functions.php I've created 2 functions: add_action('create_category', 'popup_reminder_caller'); function ...
0
votes
1answer
619 views

Getting admin notices to appear after page refresh

I am hooking into the profile_update event in order to perform an action to member profiles when they are saved from the backend. After the event and my code is triggered Wordpress redirects the page ...
1
vote
1answer
67 views

Popup or admin/update notice on post/page edit screen without page refresh

Wordpress has similar functionality when another user is "taking over" editing a post WP gives you an instant warning. I want to be able to either trigger a popup or show a new admin notice on top of ...
1
vote
1answer
55 views

How to notify the admin about something that happened during a cron job

Our company has put out a Wordpress plugin that consumes our content api. Problem is, some of the content goes away. Sometimes for a time, sometimes forever. To be on the legal safe side we have to ...
3
votes
1answer
181 views

Wordpress admin notice in plugin function

i have sample wordpress plugin class. Im hooking woocommerce woocommerce_saved_order_items and i want create a admin notice. Add action from __construct works, but when i want create a notice in hook ...
1
vote
1answer
2k views

PHP notice coming from the WordPress core?

Do you also experience this particular notice? ( Of course one has to turn on the DEBUG mode at the wp-config.php to be able to see this kind of a notice ). > Notice: add_shortcode_param is ...
0
votes
1answer
31 views

Show message from backend

I need to show messages on wordpress page editor, when a page is updated. I know there is a admin_notice hook to show messages. I have a save_post_page perfectly working on my code, but I need to know ...
1
vote
1answer
74 views

Deprecated issue in WordPress [closed]

I am new in WordPress Development. I updated version of my WordPress site to 4.6.1. Then I found this error in debug.log Notice: The called constructor method for WP_Widget in C_Widget_Gallery is ...
4
votes
2answers
339 views

Add custom post notice after post delete

I am trying to add a custom info notice after the post has been deleted from the trash, but I'm not having any luck with it add_action( 'delete_post', 'show_admin_notice' ); /** * Show admin notice ...
2
votes
1answer
1k views

How to stop showing admin notice after close button has been clicked

First of all I do know how to add admin notice in the wordpress admin menu. And I added an admin notice like this: <?php add_action( 'admin_notices', function() { ?> <div class="...
0
votes
1answer
225 views

wp_new_comment requires author url and author email

I am using the wp_new_comment() (previously used the wp_insert_comment()) function. I now notice that I get a Notice: Undefined index: comment_author_url and a: Notice: Undefined index: ...
1
vote
0answers
75 views

How to throw admin notice error on image upload

I created a plugin that creates a new image size and turns it B&W. I need the script to throw an notice if the user upload an image smaller then 1000x1000. I tried this, but Wordpress is ...
0
votes
1answer
324 views

Displaying “One Time” Notification in Plugins

In WordPress's backend, you can add notifications and errors using HTML that looks like this <div class="updated error"> <p><?php esc_html_e( 'A bad thing happened!', 'your-text-...
2
votes
1answer
70 views

Admin Notices coding standard issue

I am having a bit of an issue right now with the VIP coding standards. I am trying to print out an admin notice as follows: add_action( 'admin_notices', function() { $class = 'notice notice-...
0
votes
3answers
2k views

Trying to get property of non-object notices in comment-template.php

I need some customization of WORDPRESS comment area, so I've used this code in my child theme : <div id="comments" class="x-comments-area"> <?php if ( have_comments() ) : ?> ...
0
votes
2answers
764 views

Debug Notice: X is deprecated since version 4.5! Use Y instead

I recently updated my WordPress to latest version, and now I'm getting following messages: Notice: get_currentuserinfo is deprecated since version 4.5! Use wp_get_current_user() instead. in /X/...
0
votes
2answers
3k views

Wordpress error [closed]

Hi I have updated my wordpress site manually, now i get below mentioned error in the front and backend. Notice: register_sidebar was called incorrectly. No id was set in the arguments array for ...
39
votes
6answers
116k views

Annoying JQMIGRATE: Migrate is in console after update to WP 4.5

Can anyone explain why is there a constant notice JQMIGRATE: Migrate is installed, version 1.4.0 that points to load-scripts.php in my console when I updated my theme to WordPress 4.5, and how can ...
4
votes
1answer
2k views

How to pass parameters to admin_notices?

So there is the following case. I need to display a name inside of admin_notices. class MyPlugin_Admin { public static function render_admin_notice() { echo $name . ' has been upgraded.';...
1
vote
1answer
712 views

How to disable admin notice in child theme? [closed]

Similar to https://wordpress.stackexchange.com/q/206735/92434, Disable update notification for individual plugins. I have purchased a theme, which displays a notice in admin panel to all ...
1
vote
0answers
15 views

Plugin activation/deactivation page transitions with page parameters, then vanished

When activating or deactivating WordPress plugin, within a blink of eye some URL parameters just come and vanish, can't even snap them so fast. And then the admin notice appears: Plugin activated. ...
0
votes
3answers
63 views

Plugin Options Array Set to Undefined

I want to set a number of plugin options set to blank if they are not defined so I can avoid the PHP notices. What is a better way of writing this code? $options = get_option('plugin_options'); // ...
0
votes
1answer
1k views

wp_get_http has been deprecated. Use WP_Http instead

I use a premium plugin (for theme dev.) that has included the WordPress Importer plugin and I get a deprecated notice: "wp_get_http has been deprecated. Use WP_Http instead" But the WP_Http send me ...
0
votes
3answers
1k views

How to change the location of admin notice in html without using Javascript?

I am adding an admin notice via the conventional admin_notice hook in my plugin: function my_admin_notice() { ?> <div class="notice notice-info is-dismissible"> <p><?php ...
1
vote
1answer
174 views

How does one dismiss the 'upgrade notice' when managing upgrades with SVN?

I manage a site as a Subversion checkout of a tagged release (e.g. http://develop.svn.wordpress.org/tags/4.3.1 ), which means that I don't use the built-in core updater but rather just do a svn sw to ...
0
votes
1answer
39 views

A more elegant way to handle notices/warnings

I have a wordpress site with a number of different plugins (about 75) all created by me, old and new included. With the evolution of WP and PHP/MySQL, some of the functions in the plugins have ...
0
votes
2answers
645 views

PHP Notice: Undefined offset: 0

I have errors in WordPress: PHP Notice: Undefined offset: 0 in /home/userpro/public_html/wp-content/themes/hoon/inc/tweaks.php on line 602 PHP Notice: Trying to get property of non-object ...
1
vote
0answers
41 views

CPT Validation to not show “Post updated.”

Now this has been asked several times over on all WP forums, but how you change the success message? First, I know there are 2 choices for managing the error message: setting in the options and using ...
4
votes
3answers
2k views

How to Make an admin_notices Message That Disappears Once the User Leaves That Particular Page?

It's easy enough to find help with admin_notices which: show permanently in the admin screen only show when a particular kind of page is shown show until the user dismisses it But I can't find help ...
1
vote
1answer
6k views

Notice: wp_enqueue_script was called incorrectly

This is an error I'm receiving when my plugin is activated: Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, ...
0
votes
0answers
210 views

Unable to render Admin Notices

I am trying to build a plugin and on activation I would like to render message on the dashboard whether the table exists or not but on activation I am getting the following error: The plugin ...
0
votes
1answer
762 views

Notice- undefined variable post and trying to get property of non-object

i created a custom post type interview for that i also created custom post taxonomy interview_category and that custom taxonomy have some terms like students, teachers and some more. i trying to get ...
1
vote
1answer
970 views

wp-includes/comment-template.php:26 - Trying to get property of non-object

I get this notice when debugging my new site. Does anybody know what this means? It doesn't break the site but it's just a warning when I switch debug mode on and I would like to solve this issue. ...
0
votes
2answers
667 views

What is the callback sent to add_submenu_page() invoked by WordPress?

WordPress tries to be event driven with all it's actions and filters you can hook to. But it also has special functions to create admin pages such as add_submenu_page() which accepts a (callback) $...
3
votes
2answers
2k views

wp_logout_url() - WordPress Failure Notice

My wp_logout_url() is working right from the front end. But when I change the new password from the front end, then, on the change password page, when I click on logout, the wp_logout_url() outputs ...
0
votes
1answer
1k views

Hook into admin_notices after sending mail

In my (admin) plugin I want to display a message using admin_notices action on successful sending of mail. Currently it is not displaying. I know this has something to do with the order of events, but ...