Skip to content

Commit

Permalink
fix: single page import issue
Browse files Browse the repository at this point in the history
  • Loading branch information
HeyMehedi committed Sep 9, 2024
1 parent 7262d20 commit 7ec7c2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
1 change: 1 addition & 0 deletions app/Integrations/Elementor/ImportAsPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public function __construct() {
}

public function import_as_page( $page_id, ImportAsPageDTO $DTO ) {

if ( 'elementor' !== $DTO->get_builder() ) {
return;
}
Expand Down
8 changes: 1 addition & 7 deletions app/Repositories/ImporterRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ public function import_as_page( ImportAsPageDTO $DTO ) {
);
}

error_log( '$template_data: ' . print_r( $template_data, true ) );

if ( isset( $template_data['message'] ) ) {
throw new \Exception(
esc_html( $template_data['message'] ),
Expand All @@ -41,11 +39,7 @@ public function import_as_page( ImportAsPageDTO $DTO ) {

$DTO->set_template_data( $template_data );

$inserted_id = apply_filters(
'templatiq_import_as_page_created_post_id',
0,
$DTO
);
$inserted_id = apply_filters( 'templatiq_import_as_page_created_post_id', 0, $DTO );

if ( is_wp_error( $inserted_id ) ) {
throw new \Exception(
Expand Down

0 comments on commit 7ec7c2c

Please sign in to comment.