You could insert a
$wpdb->show_errors();
to output the errors in your query.
Also you need to input that sql into
dbDelta($sql)
did you miss that?
Related Posts:
- How to make WordPress plugin check for database changes and then do something?
- Database “Migration” for Plugins?
- Plugin Modification Change Functionality For Logged User Only
- Transaction when using WP functions rather than vanilla SQL?
- I can’t fetch query parameters ($_GET parameters) with get_query_var
- Change Password Hint
- Dynamic URL to reference custom PHP files
- How to auto login user again after change user_login
- Prevent multiple counts by same user – WP PostViews plugin
- Second select list values are not saved after clicking update
- Use wc_enqueue_js only on specific pages – nested add_action
- Theme url in all plugin pages
- Why WordPress architecture is not pure object oriented and it don’t use MVC pattern? [closed]
- How to access function from outside of a class within this class in WP plugin?
- How can i display post loop in table format?
- PHP can I add line numbers to file_get_contents()
- Get Current User Id Inside a Loop Returns 0 For a Shortcode
- Transferring working local PHP site to wordpress – with database (MySQL)
- Detect session/cookie variable in wordpress to prevent access to documents
- what is the best practice to add new field to an api route
- Use custom post type for a store locator
- How do I programmatically set a user as spam in BuddyPress? [closed]
- WP CRON duplicate wp_insert_post with has < and > tag
- How to send Ajax request from my plugin in admin dashboard?
- AJAX success response is not working but it’s saving my changes
- Best practice for show data to one specific user?
- Font Awesome changing default WordPress Font
- Can’t print Yoast meta description into page template (syntax error, unexpected ‘.’) [closed]
- Download full html page with CSV export plugin
- Asynchronous multiple requests 401 Unauthorized
- Using data sent via AJAX in multiple functions on a WP plugin
- What does -> mean in WordPress?
- Change product_base programmatically
- How to add the sidebar to all the pages except the home page? [closed]
- how to save checkbox data for custom setting?
- WordPress shortcode returns the data before
- Plugin development and composer
- PHP -> SQL Query with Summing
- Set default Database Storage Engine when creating tables with plugins?
- WordPress WP_Query without query GET parameters
- Where to copy woocommerce files to in my custom theme to avoid editing the core plugin?
- custom post type with role Vendor
- Removed jQuery script from header.php , any problems?
- Execute Jquery when a specific page in my plugin is loading
- calling admin-ajax.php from admin-ajax.php
- Remove password protection from all posts
- How does add_option() function enable action hooks to fire right after actiavtion?
- Ajax on the Administration Side of plugin – wp_localize_script – how to pass value from JQuery to PHP function in class?
- WordPress can’t use ZipArchive
- WordPress SQL Prepare
- Settings API form – submit with AJAX
- How to change basename url for wp-admin?
- Only the first image uploads
- WordPress loading progess – wp-blog-header.php
- Run a sql (update) after 12 hours after the user login. Woocommerce users
- Illegal string offset checkbox
- Custom plugin: how do I call a PHP file if settings option is set to true?
- Trying to use a variable to set image width
- wp_update_post gives 500 internal error
- Submit remote form to wordpress REST API and save data to custom post type
- How to identify which php file a plugin is using on page load?
- dashboard widget form not submit mails
- register_setting not save checkbox
- How to import woocommerce custom fields data into another site?
- Add a custom link to each image in WordPress gallery
- How to access this jQuery/AJAX data in a PHP file/WordPress plugin
- post_exists stops working in a scheduled event
- register dependency css and js inside a plugin class
- How does one make a URL return dynamic JSON with custom Content Type?
- How to give custom roles the capability to edit one Menu instead of every Menu
- add menu page in loop menu order
- defined (‘ABSPATH’) false after AJAX post to other PHP-file
- Getting error in sql query
- PHP get_category() function redeclared
- SQL Query Search page
- Private messaging – Getting and displaying the avatar/url of a message recipient
- I’m writing my first plugin and my echo output is showing up on every page of my wordpress installation
- wp_query (or hook) posts by date (id) in array then set post_type
- Chosen Select jquery Not Working in Plugin
- widget: input the px value from user and use it as inline style in widget function
- PHP calling function within a class
- Custom post type single page return to listing page
- Save data of select list after clicking save
- Accessing Variables Used In a Plugin Using PHPStorm + XDebug
- Create and update Custom Cookie based on multiple GET and POST Values for first time visitors?
- Can’t remove menu items added by plugin
- Issues separating my Plugin pages into different files
- How to hide Ads From Certain Categories?
- How do I change the Go To Categories link in the term_updated_messages
- Custom field fetch error on woocommerce pdf invoice
- Implement OAuth2 in custom plugin
- login redirect based on user role not work as expected
- redirect user from login page if is logged
- How to lock users account until approvation
- Variable ++ in query loop
- WordPress REST API – Custom field not added to pages
- Cannot register a custom WP-CLI command
- Why does WordPress not make use of gettext directly?
- Trouble with WordPress Settings API: Form Submits When Fields Called Directly, Fails When Using Callbacks
- How can I catch WordPress custom settings page slug has already changed?