GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
WPUpgraderSkin.php
Go to the documentation of this file.
1 <?php
2 /**
3  * @license GPL-2.0-or-later
4  *
5  * Modified by gravityview on 13-January-2023 using Strauss.
6  * @see https://github.com/BrianHenryIE/strauss
7  */
8 
10 
12 use Exception;
13 
14 /**
15  * This is class is used to catch errors and suppress output during product installation/update.
16  *
17  *
18  * @since 1.0.0
19  *
20  * @see WP_Upgrader_Skin
21  */
23  /**
24  * @inheritDoc Silences header display.
25  *
26  * @since 1.0.0
27  *
28  * @return void
29  */
30  public function header() {
31  }
32 
33  /**
34  * @inheritDoc Silences footer display.
35  *
36  *
37  * @since 1.0.0
38  *
39  * @return void
40  */
41  public function footer() {
42  }
43 
44  /**
45  * @inheritDoc Silences results.
46  *
47  * @since 1.0.0
48  *
49  * @return void
50  */
51  public function feedback( $feedback, ...$args ) {
52  }
53 
54  /**
55  * Throws an error when one (or multiple) is encountered.
56  *
57  * @since 1.0.0
58  *
59  * @throws Exception
60  *
61  * @return void
62  */
63  public function error( $errors ) {
64  $output = $errors;
65 
66  if ( is_wp_error( $errors ) && $errors->has_errors() ) {
67  // One error is enough to get a sense of why the installation failed.
68  $output = $errors->get_error_messages()[0];
69  }
70 
71  throw new Exception( $output );
72  }
73 }
This is class is used to catch errors and suppress output during product installation/update.
error( $errors)
Throws an error when one (or multiple) is encountered.
feedback( $feedback,... $args)
Silences results.