Right approach for plugin output styling/template

Make it as simple as possible for theme developers. Most are not programmers. There are two very simple options: add_theme_support() and get_theme_support() Provide an identifier and some options. Let’s say your identifier is drtanz_plugin. A theme author could now add the following to her theme’s functions.php: add_action( ‘after_setup_theme’, ‘prefix_register_theme_support’ ); function prefix_register_theme_support() { add_theme_support( ‘drtanz_plugin’, … Read more

Filter Orders in Admin area, based on Custom meta

Solved it, using pre_get_posts filter and WP_Query->set() method function foo_filter_orders($query) { global $pagenow; $qv = &$query->query_vars; $currentUserRoles = wp_get_current_user()->roles; if (in_array(‘shop_manager’, $currentUserRoles)) { if ( $pagenow == ‘edit.php’ && isset($qv[‘post_type’]) && $qv[‘post_type’] == ‘shop_order’ ) { $query->set(‘meta_key’, ‘handle_by’); $query->set(‘meta_value’, ‘shopmanager1’); } } return $query; } add_filter(‘pre_get_posts’, ‘foo_filter_orders’);

How wordpress detects a plugin update

Every 12+ Hours WordPress automatically goes out and checks if a plugin needs to be updated via the WordPress Repository. There’s 3 cron jobs that WordPress runs to check on things: wp_version_check – Checks for Core Updates wp_update_plugins – Check for Plugin Updates wp_update_themes – Checks for Theme Updates A neat little plugin to view … Read more

Override plugin localization

From what you are saying you have translated your plugin and now you want to be sure the future update won’ be overwritten. So to avoid that happening you can always put your po/mo translation files (if provided) in global languages folder that is located on your server in wp-content/languages/plugins folder. If plugin have language … Read more

Can’t set proper WooCommerce language translation [closed]

After installing WordPress version 4.6.1 and WooCommerce version 2.6.6, both with the default enabled language, English (United States), I followed the steps below and had the translation successfully installed and working: Set a language for your WordPress installation Click on the General sub-menu item under Settings from the Dashboard of your WordPress installation, and scroll … Read more

Create plugin with 3rd party MIT license code

yes, you can include Expat (MIT) licensed libraries in your GPL plugin. WordPress plugin guidelines states, Although any GPL-compatible license is acceptable, using the same license as WordPress — “GPLv2 or later” — is strongly recommended. All code, data, and images — anything stored in the plugin directory hosted on WordPress.org — must comply with … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)