Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoladj77 committed Jan 16, 2025
1 parent aec42b3 commit 8860186
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export class EhpAddLibraryTab extends $e.modules.hookUI.Before {
filter: {
source: 'remote-ehp',
type: 'block',
subtype: elementor?.config?.document?.type,
},
}, 2 );

Expand Down
4 changes: 3 additions & 1 deletion modules/template-parts/classes/sources/source-remote-ehp.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class Source_Remote_Ehp extends \Elementor\TemplateLibrary\Source_Base {

const API_TEMPLATES_URL = 'https://ba-templates-api.platform-prod.elementor.red/v1/templates/';
const API_TEMPLATES_URL = 'https://ba-templates.stg.elementor.red/v1/templates/';

const TEMPLATES_DATA_TRANSIENT_KEY_PREFIX = 'elementor_remote_templates_ehp_data_';

Expand Down Expand Up @@ -184,6 +184,7 @@ protected function get_templates_remotely( string $editor_layout_type ) {
'headers' => apply_filters( 'stg-cf-headers', [] ),
] );

error_log( print_r( $response, true ) );

Check warning on line 187 in modules/template-parts/classes/sources/source-remote-ehp.php

View workflow job for this annotation

GitHub Actions / Lint PHP files

error_log() found. Debug code should not normally be used in production.

Check warning on line 187 in modules/template-parts/classes/sources/source-remote-ehp.php

View workflow job for this annotation

GitHub Actions / Lint PHP files

print_r() found. Debug code should not normally be used in production.
if ( is_wp_error( $response ) || 200 !== (int) wp_remote_retrieve_response_code( $response ) ) {
return false;
}
Expand All @@ -200,6 +201,7 @@ protected function get_templates_remotely( string $editor_layout_type ) {
protected function get_templates_body_args( string $editor_layout_type ): array {
return [];
}

protected function get_url_params( string $editor_layout_type ): array {
return [
'products' => 'ehp',
Expand Down

0 comments on commit 8860186

Please sign in to comment.