Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
picocodes committed Jul 9, 2024
1 parent db0333a commit 44a2de7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/Objects/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,11 @@ public function handle_list_shortcode( $atts, $template ) {
$items = $this->get_all( $query );
}

// Debug the query later.
if ( defined( 'NOPTIN_IS_TESTING' ) && NOPTIN_IS_TESTING ) {
noptin_error_log( $items, 'Item collection results' );
}

if ( ! is_array( $items ) || empty( $items ) ) {
if ( 'yes' === $atts['skiponempty'] ) {
$GLOBALS['noptin_email_force_skip'] = array(
Expand Down
2 changes: 1 addition & 1 deletion src/Objects/Generic_Post_Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public function get_all( $filters ) {
noptin_error_log( count( $posts ), 'Post collection posts' );
}

return get_posts( $posts );
return $posts;
}

/**
Expand Down

0 comments on commit 44a2de7

Please sign in to comment.