Skip to content

Commit

Permalink
Fix "Failed to initialize plugin" error in Elementor
Browse files Browse the repository at this point in the history
  • Loading branch information
Ugoku committed Feb 20, 2024
1 parent 5a5dc43 commit d74b1aa
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 20 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 6.0.6 (2024-02-20)
* Fix "Failed to initialize plugin" error in Elementor

## 6.0.5 (2024-01-19)
* Fixed not being able to add a contact form in classic editor

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "recras-wordpress-plugin",
"version": "6.0.5",
"version": "6.0.6",
"description": "Recras WordPress plugin",
"main": "index.js",
"directories": {
Expand Down
23 changes: 7 additions & 16 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Contributors: zanderz
Tags: recras, recreation, reservation, booking, voucher
Tested up to: 6.4
Stable tag: 6.0.5
Stable tag: 6.0.6
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -80,6 +80,9 @@ No. "Must use" plugins don't appear in the update notifications nor show their u

== Changelog ==

= 6.0.6 =
* Fix "Failed to initialize plugin" error in Elementor

= 6.0.5 =
* Fixed not being able to add a contact form in classic editor

Expand All @@ -99,18 +102,10 @@ No. "Must use" plugins don't appear in the update notifications nor show their u
* Removed support for Composer Installers
* Updated "Tested up to" version to 6.4

= 5.5.2 =
* **No functional changes**
* Updated "Tested up to" version to 6.3
* **Deprecation notice**: we plan on removing support for Composer Installers in version 6.0 of the plugin. Please let us know if you use this to install our plugin!

= 5.5.1 =
* Fix "previous/next month" not being visible in a book process when using Elementor

= 5.5.0 =
= 5.5 (highlights) =
* Make online booking of packages look better on narrow pages on large screens (i.e. desktop)
* Gutenberg contact form widget: properly show allowed packages
* Add option to fix BP date picker styling
* Various fixes, mostly related to book processes
* Updated "Tested up to" version to 6.3
* Plugin now requires PHP 7.2 or higher

= 5.4 (highlights) =
Expand All @@ -120,10 +115,6 @@ No. "Must use" plugins don't appear in the update notifications nor show their u
* Allow initial value in first widget of a book process, when the first widget is "package selection".
* Bugfixes

= 5.2 (highlights) =
* It is now possible to integrate multiple book processes on one page
* Small bugfixes

= Older versions =
See [the full changelog](https://github.com/Recras/recras-wordpress-plugin/blob/master/changelog.md) for older versions.

Expand Down
2 changes: 1 addition & 1 deletion recras-wordpress-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
Plugin Name: Recras WordPress Plugin
Plugin URI: https://www.recras.nl/
Version: 6.0.5
Version: 6.0.6
Description: Easily integrate your Recras data into your own site
Requires at least: 6.2
Requires PHP: 7.2.0
Expand Down
2 changes: 2 additions & 0 deletions src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public function __construct()
// Load scripts
add_action('admin_enqueue_scripts', [$this, 'loadAdminScripts']);
add_action('wp_enqueue_scripts', [$this, 'loadScripts']);
// Editing a page with Elementor makes WP think it's not in admin mode
add_action('elementor/editor/before_enqueue_scripts', [$this, 'loadAdminScripts']);

// Clear caches
add_action('admin_post_clear_recras_cache', [$this, 'clearCache']);
Expand Down

0 comments on commit d74b1aa

Please sign in to comment.