Is it necessary to auto delete my WP plugin database tables when users deactivate/delete my plugin?

In my opinion, a best practice would be to clean everything on uninstallation. It’s also mentioned as a best practice in the docs: When your plugin is uninstalled, you’ll want to clear out any plugin options and/or settings specific to to the plugin, and/or other database entities such as tables. However, if you’re struggling to … Read more

Why is one phpunit test throwing an error on one class when all other classes are similar without error?

the async property is marked as protected, so that usually signifies that it is related more to your implementation’s details rather than functionality. Ideally you would write your tests to test the public methods you have exposed. Testing that the class property you set in the constructor of one class is an instanceof what was … Read more

How I can use order by of the custom post title?

You can use the order and orderby param in WP_Query argument like below: $args = array( ‘post_type’ => ‘case’, ‘post_status’ => ‘publish’, ‘meta_key’ => ‘client’, ‘posts_per_page’ => 9, ‘orderby’ => ‘title’, ‘order’ => ‘ASC’, ); $query = new WP_Query( $args ); It will list out your posts by title. For more information check official WordPress … Read more

AJAX form post returns 0

your ajax post callable function action “get_news_callback” not working in your Class __construct() becuase You Can use simple WordPress action in the class. Use Action In The Class : add_action(‘wp_ajax_get_news_callback’, array($this, ‘get_news_callback’)); add_action(‘wp_ajax_nopriv_get_news_callback’, array($this, ‘get_news_callback’)); your Script also change So you Can Use below script to get your ajax response . defined(‘ABSPATH’) or die(‘Ah ah … Read more