What I do, when I’m developing a plugin (or theme) on a local WordPress install and I’m feeling lazy, I just use a combination of
var_dump($my_variable);
die; // exit; works too
This way I get an idea whats going on and I see when the variable stops being what I expect it to be.
Another thing I sometimes do is I use error_log( print_r( $my_variable, true ) );
inside functions to push stuff into the error log so that I can review it later.
Unfortunately I haven’t worked that much with custom tables so I can’t comment on those matters.
Related Posts:
- Associate multiple email addresses with the same user account, so they can log in with either
- Which hook should be used to add an action containing a redirect?
- add_action hook for completely new post?
- How to debug a plugin with Xdebug?
- Send user activation email when programmatically creating user
- WordPress Hook for user register
- Get list of scripts / styles and show file which enqueued them
- Is there widely accepted phpDoc syntax for documenting which hook calls a function?
- What’s the earliest point I can get the queried object ID?
- How do I Make a Theme “plugin-ready”?
- WordPress scheduled task is called but not executed
- How to modify post content before writing to database?
- How to use filter hook ‘post_updated_messages’ in coherence with action hook ‘save_post’
- How to check if certain plugin exists and in expected version
- Plugin development, hooks, generate content
- Is it possible to create an action hook using do_action() within add_action()?
- Custom user profile, registration, login page with theme
- Hook event for upload image in the menu
- Help with callback using do_action_ref_array
- Is it possible to modify the media library admin screen?
- What function to hook for changes made in status and visibility of a post
- Best Practices for Creating and Handling Forms with Plugins?
- Is there a better way to implement responsive images than what WordPress uses by default?
- Modifying values with add_action to be sent to db
- Woocommerce – Hide a Column in Cart Table
- Hook to get image filename when it is uploaded
- Get the password key when using the wp_new_user_notification_email filter
- How to display a message about updates in the plugin list
- How to delete an user including data from custom database tables
- Should action callbacks start with a verb?
- Why is my javascript not invoked in my hooks except wp_head?
- Namespaced action and filter tags
- What filter should I use to insert a button inside on Media>Add New
- Two functions utilizing registration_errors filter
- .mo translation strings not loading in PHP scripts that handle AJAX calls
- How to add custom fields to the all users page
- How to use a hook to override an update_post_meta call in a plugin?
- External Authentication, session_tokens not destroyed on logout
- Trying to understand order and frequency of action hooks firing
- Including the necessary functions for a custom ajax registration form
- correct way to call javascript into hook function
- Prefixing plugin hooks (actions/filters) with a wrapper class or functions
- user_register not triggering with email verification
- Send push when new post is published in a certain category
- template_redirect or admin-ajax.php?
- WordPress custom taxonomy check box to dropdown
- Force HTTPS 301 redirect with hook
- What action hook can I use to add a JavaScript to a page post using a theme template that is not including get_header() nor get_footer()?
- Plugin uninstall function is not working
- Bug: Post needs to be updated twice when adding action for save_post hook
- How do I have now a duplicated user entry if this is not allowed (and I cannot replicate it)?
- Remove an action by extending class and replacing it
- Trying to get class to instantiate ONCE (or, “why do I keep punching myself in the head?”)
- Why enqueue styles on hook?
- What’s the hook for filtering every texts of site?
- Getting a WordPress Debug Strategy
- Unable to get a simple plugin admin page to work
- Hook add_attachment error
- WooCommerce change Tax Class programmatically when Recalculating an existing Order [closed]
- How to make and save custom form in custom plugin page?
- hook update_option/updated_option empty $old_value and $value
- Hide one specific woocoomerce product
- Can I Hook Into the TinyMCE Insert/Edit Link Button to Use Shortlink For Post?
- How do I debug an error that a plugin is causing?
- Redirect returning users to a certain page?
- Restrict certain actions to plugin-specific admin menu pages only
- How to automatically activate users after registration without activation email?
- Set the payment processor callbacks to a plugin
- How to enhance a self developed plugin by its own plugin architecture
- How to update global variables in plugin activation callback?
- Allowing duplicating users with same user_login and user_email
- Add two button to page and post admin to redirect to : add new & list of (posts – pages) just after saving post or page
- `registration_errors` filter doesn’t seem to be called
- How to grab data after wp user search is complete
- Using custom IDP with WP
- Why does do_action pass a blank string as the first parameter if no $arg is set?
- Add a custom submenu under submenu in a Custom WordPress Plugin
- Hook for validating and rejecting frontend image upload
- Does hooking into a plugin action / filter override the plugin’s function for that hook?
- Nested Hooks with do_action for performance reasons – safe/necessary?
- WordPress Plugin Boilerplate – add actions and/or filters based on user’s role
- remove different admin menu for specific users
- Add_action not calling callback function
- Custom Registration Form and Passwords
- how to retrieve post_id under woocommerce_add_to_cart_validation hook?
- How and when would I implement some code which would take data from one part of the Db and put it in another?
- add_option_{$option} action hook not being called
- plugin modal/popup integration best practice
- Multi hook deploiement
- woocommerce single product page hook not working
- How can I set a dynamic value for post_updated_messages based on return value of post_updated?
- What is the use of wp_schedule_event hook?
- first_name property missing inside register_user action hook
- Get user logged in status from within a plugin. $current_user not defined
- Insert plugin html content to a specific spot in the frontpage
- Send Webhook when post-status is publish or trash
- Using “add_image_size” to register custom image sizes inside plugins not working
- get_term_by() returning null on plugin
- Ninja Forms: Front-End Forms, Post ID?
- How do I modify the error code array used by “shake_error_codes” filter?