Update Plugin of wordpress to specific version

If you have a backup of the site, zip up the plugin’s folder under wp-content/plugins/. Add plugins, then upload zip file. Otherwise you may have to reach out to the plugin’s author to ask if they have the version you need.

Why am I getting an error when requiring a file in my plugin?

As the names suggest, plugin_dir_path() will get the filesystem path, while plugin_dir_url gets the URL. A file path looks something like this /var/www/html/wp-content/plugins/my-plugin/ and can be used by PHP to find a file on the server. A URL will look like https://www.example.com/wp-contents/plugins/my-plugin/ and is intended to be accessed over the web. If you attempt to … Read more

Uncaught Error: Cannot use object of type stdClass while showing the list using WP_List_Table

$this->items = $this->get_table_data(); If this line is triggering the error, then the reason is probably that items should be an array of arrays, not an array of stdClass objects. But you don’t need to change much, as get_results() does support returning arrays instead of objects (which is the default). Instead of $get_bl_list = $wpdb->get_results(“SELECT * … Read more

Make plugin admin page visible to other roles

When the submenu is registered: add_submenu_page( ‘woocommerce’, __( ‘Betalingsmetoder’, ‘wcrb’ ), __( ‘Betalingsmetoder’, ‘wcrb’ ), ‘manage_options’, ‘payment-gateway-report’, ‘wcrb_report_page_callback’ ); You’ve specified that you only want it to be shown to users with the capability manage_options. So only administrators have that capability, so only administrators can see that page. It’s documented in the official WP docs … Read more

Plugin with Fatal error

Your class_exists(WikiLinksPlugin) call is calling WikiLinksPlugin as a constant, rather than as a value passed to class_exists(). It should be this (quotes around the class name): if (class_exists( “WikiLinksPlugin” ) && !isset($wikiLinks_plugin)) { $wikiLinks_plugin = new WikiLinksPlugin(); }