Articles of plugin development

Best way to ping for the API changes in the wordpress?

I am importing the posts into the wordpress from external API’s , i have created the plugin for this, posts are imported successfully. but now i am going to implement auto check for the new API changes and if new posts exists on the API then import that post into the wordpress. What is the […]

WordPress Active Plugins

I have in my website right now around 100 active plugins. I need to know a way to erase those active plugins that I’m not using. Actually that is affecting the speed of my website and back-end too. In my side I found that does not exist a plugin that can tell me this… Any […]

Is it fair to use MIT licensed code in WordPress plugins?

Is it fair to use an MIT licensed jQuery library inside a plugin and then sell it as a freemium plugin on WordPress.org?

How to access OOP plugin function inside themes or other plugin

first of all I’m really sorry if the title of the question doesn’t explain everything. Anyways here’s what I was looking for. I’m creating a WordPress plugin with OOP concept. So, I’ve codes like this class somePlugin { //constructor goes here public function is_it_safe() { if( true ) { return true; } else { return […]

Ajax function is not working on WordPress

I am creating a plugin for WordPress, I have a script that runs perfectly to part to make ajax request to write some data in the database. The code works until the part to display the text within the “ divpasso2form which is initially empty and after clicking on the text button is inserted into […]

WordPress debug messages not displaying

WordPress is not displaying any errors / debug messages, even though I double- and triple-checked every setting. In php.ini, I have error_reporting = E_ALL & ~E_NOTICE display_errors = On display_startup_errors = On log_errors = On track_errors = On In wp-config.php, I have: define(‘WP_DEBUG’, true); define(‘WP_DEBUG_LOG’, true); define(‘WP_DEBUG_DISPLAY’, true); @ini_set(‘display_errors’, 1); error_reporting(E_ALL^E_NOTICE); Still, no errors are […]

Converting core modification to a plugin

I needed to change two strings shown to the user on the site upon clicking the confirmation links in the email (not to modify the emails sent out). I made the following modifications and it worked.: — wp-activate.bak 2017-02-28 13:01:03.883175677 +0530 +++ wp-activate.php 2017-02-28 13:47:35.000000000 +0530 @@ -13,6 +13,10 @@ require( dirname(__FILE__) . ‘/wp-load.p require( […]

Search users with custom meta data

I’m looking for a way to search to make wordpress search for matches on a WC users billing-/shipping-company – but im not sure how to achive this. I found out how i can do it with the most common user fields (ID, login, email & nicename). Searching for common user data: $customers_query = new WP_User_Query( […]

Class or function wrapper for plugin code

When developing plugins, to avoid using a prefix for all functions and variables, it is common to use a wrapper for the plugin code. I have seen in many places the practice of using a class and I want to compare that to simply using a function as a wrapper. A. Class wrapper class Nice_Plugin […]

Order properties should not be accessed directly

This code: foreach ($order->meta_data as $row) { if ($row->key == ‘tid’) { $tid = $row->value; break; } } within the function function function_name($order_id, $checkout = null) { global $woocommerce; $order = new WC_Order($order_id); foreach ($order->meta_data as $row) { if ($row->key == ‘tid’) { $tid = $row->value; break; } } if (!empty($tid)) { … } } […]