File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 11= 1.3.1 =
22- Added support for using `--version=beta` with the `wp gf install` and `wp gf update` commands. Add-On beta releases are not currently supported.
3+ - Fixed a fatal error which can occur when using the `wp gf version` command with an add-on slug when Gravity Forms is not active or not installed.
34
45= 1.3 =
56- Fixed an error occurring when using the `wp gf form notification create` command.
Original file line number Diff line number Diff line change @@ -29,14 +29,14 @@ class GF_CLI_Root extends WP_CLI_Command {
2929 * wp gf version gravityformspolls
3030 */
3131 public function version ( $ args , $ assoc_args ) {
32+ if ( ! class_exists ( 'GFForms ' ) ) {
33+ WP_CLI ::error ( 'Gravity Forms is not installed. Use the wp gf install command. ' );
34+ }
35+
3236 $ slug = $ this ->get_slug ( $ args );
3337
3438 if ( $ slug == 'gravityforms ' ) {
35- if ( class_exists ( 'GFForms ' ) ) {
36- WP_CLI ::log ( GFForms::$ version );
37- } else {
38- WP_CLI ::error ( 'Gravity Forms is not installed. Use the wp gf install command. ' );
39- }
39+ WP_CLI ::log ( GFForms::$ version );
4040 } else {
4141 $ addon_class_names = GFAddOn::get_registered_addons ();
4242 $ addon_found = false ;
Original file line number Diff line number Diff line change @@ -187,6 +187,7 @@ If you have any ideas for improvements please submit your idea at https://www.gr
187187
188188= 1.3.1 =
189189- Added support for using `--version=beta` with the `wp gf install` and `wp gf update` commands. Add-On beta releases are not currently supported.
190+ - Fixed a fatal error which can occur when using the `wp gf version` command with an add-on slug when Gravity Forms is not active or not installed.
190191
191192= 1.3 =
192193- Fixed an error occurring when using the `wp gf form notification create` command.
You can’t perform that action at this time.
0 commit comments