Excess dependencies

It looks it was some kind of internal malfunctioning of webpack. After deleting everything from plugin directory (saving src files aside) and again installing @wordpress/create-block, the problem was solved.

Can´t access child theme´s scripts dependencies found in parent

If the parent theme bundles all vendor scripts in one file, you can’t require/enqueue them separately. From WP’s point of view, they are one single resource/dependency. Look into any page’s source-code or use a plugin (such as “debug this”) to get the script’s register name so you could specify it as dependency. In your case … Read more

How to stop activating a plugin and show admin notice when dependent plugins minimum version is not met

You can add the following code in your plugin. I have used this in my ARB booking plugin and it worked perfectly. The full details of the code with explanation can be found here: class FT_AdminNotice { protected $min_wc=”5.0.0″; //replace ‘5.0.0’ with your dependent plugin version number /** * Register the activation hook */ public … Read more

How to provide a plugin which requires CMB2 (plugin dependencies)?

On your plugin activation hook method you can check if CMB plugin is installed and/or activated. You can check this using the following methods: is_plugin_active(): only available from within the admin pages function_exists() or class_exists(): available anywhere once they are PHP core methods If CMB is not installed, you can throw an error message in … Read more

JavaScript added as link/stylesheet

wp_enqueue_script is for… scripts. You want wp_enqueue_style (and wp_register_style) for stylesheets. Also note that you can enqueue as many things as you’d like in a single function, no need to create a separate function for each. You can also pass all the same arguments to enqueue as you do to register, no need to register … Read more

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