Skip to content

Commit

Permalink
Exclude hidden courses when toggled off in block (#2691)
Browse files Browse the repository at this point in the history
* Avoid showing hidden courses when toggled off in the Courses block. It's boolean false in this case but also adding explicit empty.

* Adding changelog.
  • Loading branch information
brianhogg committed Jul 18, 2024
1 parent 0b22a85 commit f1a2804
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
significance: patch
type: fixed
links:
- "#2690"
entry: Exclude hidden courses when toggled off in the Courses block.
2 changes: 1 addition & 1 deletion includes/shortcodes/class.llms.shortcode.courses.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ protected function get_tax_query() {
}

$hidden = $this->get_attribute( 'hidden' );
if ( 'no' === $hidden ) {
if ( 'no' === $hidden || false === $hidden || '' === $hidden ) {

$terms = wp_list_pluck(
get_terms(
Expand Down

0 comments on commit f1a2804

Please sign in to comment.