Automattic / sensei

Sensei LMS - Online Courses, Quizzes, & Learning
https://senseilms.com
GNU General Public License v2.0
539 stars 198 forks source link

Learner: Single course ID returns string instead of array of string, causes WP_Query error #6422

Open jmalko opened 1 year ago

jmalko commented 1 year ago

Am submitting a PR, here's the issue:

Steps to Reproduce

  1. Attempt to view a certificate
  2. See type error within WP_Query

What I Expected

  1. Wordpress expects the ['post__in'] arg to be an array

What Happened Instead

  1. Sensei_Learner methods return a string in the case of looking at a single course

PHP / WordPress / Sensei LMS version

Wordpress 6.1 Sensei 4.10

Browser / OS version

Any

Screenshot / Video

image

jmalko commented 1 year ago

https://github.com/Automattic/sensei/pull/6423

donnapep commented 1 year ago

@jmalko Thanks for the report! Unfortunately, I haven't been able to reproduce this error by viewing a certificate from either WP admin or on the frontend. Are there any additional details you could provide to enable us to reproduce it? Thx!