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:
- When to use Exceptions vs Error Objects vs just plain false/null
- wpdb::prepare was called incorrectly
- Detect a focus on wp_editor
- Display a text message if the shortcode is not found?
- Utilize WP-CLI from inside WordPress, not SSH
- Why is PHP Cookie via plugin only set when logged in as Admin and not regular users? and other questions
- Disable External Pingacks on WordPress Posts and Only Allow ‘Self Pings’
- Loading page template into shortcode
- Using wp_get_image_editor in a standalone script
- Continue execution after WP REST API response
- WordPress Ajax Custom Query – High CPU LOAD
- allow users to publish without admin approval
- action hook wp_head higher priority as all other plugins/hooks
- How to call function at the bottom of post using plugin?
- Do my defines need to be unique?
- What does $wpdb->get_row return?
- WP add_action factory
- woocommerce subscriptions – get expiration date [closed]
- Delete a WordPress transient from a shortcode on Page/Post update
- Plugin CSS not enqueing
- Swapping wp_dropdown_categories function with wp_category_checklist
- How to show phpinfo() only in a new tab?
- How can I remove a function that has been added to wordpress with add_filter?
- PHP Fatal error: Uncaught mysqli_sql_exception: Table doesn’t exist in wordpress/wp-includes/wp-db.php
- How to use $_GET function WordPress backend
- How to call plugin function per site in a multisite?
- How wp-cron can run in background if PHP is single threaded?
- Options API get_option() and update_option() Not Correctly Updating or Returning
- wp_head function not outputting
- How to make own crop image function for WordPress plugin
- “Undefined index” error when saving empty array with checkboxes
- Is it save to use eval for a jQuery callback method coming from the database?
- Scheduling an event inside plugin class is not working
- How to Change CSS Colors from Custom Plugin Settings Page
- Passing the name of selected color from the custom component to `render_callback`
- Any ideas why I am getting “I’m getting “wp-admin/admin-ajax.php 401 (Unauthorized)”
- Cant register rest routs from class instance
- wordpress frontend editor to add extra css to website
- How can I search all plugins for composer’s vendor/autoload.php?
- Action Hook Inside WordPress Plugin Shortcode
- PHP: How to access db the right way in plugin?
- select a single val though a table in wordpress
- Submit form to db
- WordPress – Get Posts with Category data
- How to use wp_send_json() and output the value with ajax?
- PHP using external anonymous function inside class
- Problem with inserting multiple images in gallery of each WooCommerce product programmatically
- Is it possible to access admin-ajax.php using PHP?
- Call to “admin_notices” hook from a static method
- How to Create custom block for displaying information in content section which act like shortcode
- How to detect and handle the time difference between server and user in WordPress?
- How to setup the Email piping in WordPress plugin?
- Reliable way to add nonce to HTTP Header in WordPress?
- Getting an error when my plugin is updated, but the files update correctly
- Creating a POP Alert
- Add Pre-Defined Value to Click Counter in WordPress
- ssl redirect function is not working
- WordPress Plugin Development – get_option error
- how to add new PHP page in WordPress plugin
- How can I get my WordPress plugin to receive data and relay it in an ajax/php request to a remote server that requires authentication?
- code that I can run, or a plug in to show what sql tables something pulls information from
- Automatic email message after manual user approval
- Constant expression contains invalid operations plugin class properties visibility
- Display attached images of a page or post that are insetred using gallery
- overwrite wordpress gallery with custom gallery shortcode
- Gutenberg blocks shortcodes compatibility
- Enqueue sripts and styles only if function is called
- Add widget area from visual editor
- Save custom field on WP_List_Table
- Load script and styles using an array of resources
- Register/enqueue scripts only on certain admin pages
- Looping through custom data in a custom table to display all items in a post
- Input field duplicates on form submit by jQuery
- Custom Plugin Develoment, Form Action
- How to Request a User to Register on Landing at a Site, Then Automatically Delete the Users Password on Logout?
- Plugin Modification Change Functionality For Logged User Only
- Unable to pass variable to database
- Gravity Forms Marketo Plugin Feed [closed]
- INCOMING: Wall of code for form and $_POST, not updating custom field’s value
- add shortcode heading showing multiple time
- Add custom filter to register data in array
- WP multisite network plugin fails to see classes loaded with spl autoload
- Trouble using wordpress functions in a pop-up modal form
- MySQL update text field with ‘
- What is this mark for “? function()” [closed]
- how can I make content from a plugin hidden when user is logged in? [duplicate]
- display php code in header using wp_head()
- using a shortcode in a hyperlink
- Login user into magento using wordpress account
- How to pass and validate nonce in custom REST routes
- ajax problems on loading page [closed]
- Customize create table SQL statement in any WordPress plugin
- wp_mail – send emails after 24 hours from users registration
- Does it make sense to sanitize the output of an SVG file?
- Compare user meta values before update them
- Capture the Selected Radio Button Value between two files in wordpress theme
- How to change product SKU’s in bulk with a plugin
- JQuery UI Autocomplete showing as bullets
- Add Imports to Existing WordPress Import Map
- Custom plugin with dynamic child pages listing database records