| @@ -72,9 +72,10 @@ | ||
| 72 | 72 | |
| 73 | 73 | if( is_wp_error( $response ) ) { |
| 74 | 74 | return $this->error( |
| 75 | 75 | 'invalid_response', $response->get_error_message(), |
| 76 | - 'clouds/usage', 404 | |
| 76 | + 'clouds/usage', 404, | |
| 77 | + $response->get_error_data() | |
| 77 | 78 | ); |
| 78 | 79 | } |
| 79 | 80 | |
| 80 | 81 | return $response; |
| @@ -106,8 +107,12 @@ | ||
| 106 | 107 | $name = $this->get_param( 'name' ); |
| 107 | 108 | $file_type = $this->get_param( 'platform', 'elementor' ); |
| 108 | 109 | $id = $this->get_param( 'id', 0, 'intval' ); |
| 109 | 110 | $workspace_id = $this->get_param( 'workspace_id', 0, 'intval' ); |
| 111 | + | |
| 112 | + if( $file_type === 'elementor' && ! class_exists('Elementor\TemplateLibrary\Source_Local') ) { | |
| 113 | + return $this->error( 'required_elementor', __("Missing required dependency Elementor, please install before trying again.", "templately"), 'clouds/upload', 400 ); | |
| 114 | + } | |
| 110 | 115 | |
| 111 | 116 | if( empty( $file_content ) ) { |
| 112 | 117 | /** |
| 113 | 118 | * @var Platform $platform |