From f6e55350bd07c4ba409e1cd19ac527da200682e0 Mon Sep 17 00:00:00 2001 From: Tim Carr Date: Thu, 13 Nov 2025 22:22:48 +0800 Subject: [PATCH] Member Content: Courses: Improve SQL query for 6.9 compat. --- includes/class-convertkit-output-restrict-content.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/class-convertkit-output-restrict-content.php b/includes/class-convertkit-output-restrict-content.php index c66817893..43a122c68 100644 --- a/includes/class-convertkit-output-restrict-content.php +++ b/includes/class-convertkit-output-restrict-content.php @@ -512,7 +512,7 @@ public function maybe_change_previous_post_where_clause( $where, $in_same_term, $new_where = 'p.post_parent = ' . $post->post_parent . ' AND p.menu_order < ' . $post->menu_order; // Replace existing where statement with new statement. - $where = 'WHERE ' . $new_where . ' ' . substr( $where, strpos( $where, 'AND' ) ); + $where = 'WHERE ' . $new_where . ' ' . substr( $where, strpos( $where, 'AND p.post_type = \'' . $post->post_type . '\' ' ) ); // Return. return $where; @@ -551,7 +551,7 @@ public function maybe_change_next_post_where_clause( $where, $in_same_term, $exc $new_where = 'p.post_parent = ' . $post->post_parent . ' AND p.menu_order > ' . $post->menu_order; // Replace existing where statement with new statement. - $where = 'WHERE ' . $new_where . ' ' . substr( $where, strpos( $where, 'AND' ) ); + $where = 'WHERE ' . $new_where . ' ' . substr( $where, strpos( $where, 'AND p.post_type = \'' . $post->post_type . '\' ' ) ); // Return. return $where;