Replace “myplugin_” with your prefix:
global $wpdb;
$plugin_options = $wpdb->get_results( "SELECT option_name FROM $wpdb->options WHERE option_name LIKE 'myplugin_%'" );
foreach( $plugin_options as $option ) {
delete_option( $option->option_name );
}
Related Posts:
- Allow only 1 taxonomy per custom post type [duplicate]
- Custom plugin: Trying to show saved data on frontend
- Is there a way for a plugin to add an attribute to the tag of a theme?
- Do I require the use of nonce?
- Gutenberg Blocks doesn’t render correctly when using do_blocks
- Retrieve multiple values passed to a single attribute in a shortcode
- How to change date language without changing the entire site language?
- Save selected item from dropdown menu in a meta box as a metadata value for a custom post type
- OOP Plugin Development. Including external object
- Authenticating to WordPress, using my own authentication two-factor system
- Use composer to load custom classes [closed]
- Why when I instantiate wp_error in a validation method my user registration method stops working?
- My shortcode is showing up twice
- Database “Migration” for Plugins?
- Create table in database when activating plugin
- Problem with WordPress Ajax form
- allow user to select pages from dropdown in my plugin
- Using Font Awesome as post thumbnail
- Does wp-cron runs all tasks scheduled at same time together or one after other?
- How to set a custom path, for ajax image upload folder in admin?
- admin-ajax.php responding with 0
- How do I use the Simple HTML DOM Parser in plugin when other plugin already uses it?
- custom shortcode will not display the wrapped content
- How to restrict wp generate attachment metadata() to certain intermediate image sizes
- Will simple function names in a class structure conflict with other plugins?
- WordPress php filter admin_body_class not working
- Instantiate class to be available to all plugin functions
- Common abstract class for plugins
- How to test nonce with AJAX – Plugin development
- WP nonce invalid
- Same log message keeps on printing to debug.log file thousand of times
- How can i upload images in an admin page?
- Append HTML Using Shortcode
- Create onClick Event to Re-load a Widget
- Accessing the database from a plugin outside of action hooks
- Adding subdomain to home_url for “add_menu_page”
- How to select the contents in the text view textrea in wp_editor?
- Retrieve $_POST data submitted from external URL in WordPress(NOT API)
- Reprinting tags with all attributes
- Update results, Before deleting the related category [closed]
- How to auto fetch customer details in Woocommerce in checkout page
- Can’t upload image using media_sideload_image
- I want to add custom add to cart link [closed]
- Execute long and heavy processes
- Adding function to Genesis genesis_header [closed]
- how to update and display an option without reloading the page
- Custom plugin settings link doesn’t append current class to menu item when visited? Why?
- How to obtain the current website URL in my theme?
- How to hook code to show after the_content?
- Undefined method class::construct() when creating a plugin
- Using and saving custom dropdown boxes on user profiles
- Hook called before text widget save
- Problem with AJAX in wordpress plugin
- wpdb prepare insert table doesn’t work
- Can a plugin redirect product page based on IF condition?
- Save html content of a widget textarea
- Why does my settings form redirect to the homepage?
- Using admin-post.php for admin form but it directs me to admin-post.php white screen
- How can I display Custom Post type Custom Columns and its Content in a Dashboard Widget?
- How to override a plugins script
- Woocommerce custom Plugin in wordpress [closed]
- custom plugin with upload files does not work
- What is the difference between Null vs Empty (Zero Length) string?
- send popup after wp_redirect()
- no_rest_route error on custom routes
- Post form – AJAX won’t upload featured image – Plugin development
- File is executed twice if plugin is activating
- product_type_options get saved value [closed]
- Plugin won’t output characters with diacritics properly
- Display a custom name when the user has no name settle in his account
- WP Hook Before a post is created
- ACF relationship on user profile page used for allowed access
- Store user form submitted information in post type
- Problem with my Login Plugin
- How to return html as a string from php for WordPress
- Sum All the Post Meta of Published posts of Current Logged in user
- Taxonomy Child Term, Counter is staying on 0
- Need help with format of nested array in MySQL
- Autoloading Classes in Plugins
- How to add delete, approve, spam Links to Comments
- Help on Wp_query to print an term
- Comparing Dates within plugin using PHP If statement
- Upload images from one server to an other in wordpress
- Setting at job with shortcode not working
- Run code before WordPress loads and insert data into WP if need be
- Singleton plugin activation; create database
- PHP: Why does my code work in index.php but not a widget?
- How to use Amazon Elastic Transcoder from WordPress using AWS SDK for PHP?
- Accessing Variables Used In a Plugin Using PHPStorm + XDebug
- How to get WordPress Adminmenu items?
- How keep woocommerce users separeted in multisite install and keep admins on network
- I’m not able to get access $wpdb in my php file in wordpress
- How do I change the Go To Categories link in the term_updated_messages
- Login user into magento using wordpress account
- Redirect users by role to custom pages
- getJSON response to PHP
- Custom plugin with shortcode not working
- Customize create table SQL statement in any WordPress plugin
- wp_register_script – illegal string offset
- How can I modify the html output of a custom post type admin page?