Hide PDF Invoice Notice
January 17, 2025 · AI Conversations
If your logo is missing from the invoice you can set the "Set Resources Folder" option to "Yes" in the PDF Invoices Settings.
More information is available in the PDF Invoices Documentation.
hide above admin notices
### 1. **Using `functions.php`**
Add the following code snippet to your theme's `functions.php` file:
add_action('admin_init', function() {
remove_action('admin_notices', 'your_plugin_admin_notice_function');
});
You need to replace `your_plugin_admin_notice_function` with the actual function name responsible for displaying the notice. If you're not sure of the function name, you can find it by inspecting the plugin files or by enabling debugging and tracing hooks.
—
### 2. **Using a Plugin**
If you'd rather not modify your theme files, create a small plugin to handle this. Follow these steps:
1. **Create a new file:** `hide-pdf-notice.php` in your `/wp-content/plugins/` directory.
2. **Add the following content:**
<?php
/*
Plugin Name: Hide PDF Notice
Description: Hides the PDF invoice logo update admin notice.
Version: 1.0
Author: Your Name
*/
add_action('admin_init', function() {
remove_action('admin_notices', 'your_plugin_admin_notice_function');
});
3. Replace `your_plugin_admin_notice_function` with the correct function name.
4. **Activate the Plugin:**
– Go to your WordPress admin dashboard.
– Navigate to **Plugins > Installed Plugins**.
– Find your "Hide PDF Notice" plugin and activate it.
—
### 3. **Alternative: CSS Solution**
If the notice does not have a specific action hook or function, you can hide it using CSS:
1. Go to **Appearance > Customize > Additional CSS** in your WordPress admin.
2. Add the following CSS:
.notice-class-name {
display: none;
}
Replace `.notice-class-name` with the specific CSS class of the admin notice. Inspect the notice using browser developer tools to find its class.
These solutions will suppress the notice while keeping the rest of the admin area functional. Let me know if you'd like help identifying the specific function or class!