I am facing a critical "Siloed Enrollment" issue on my LMS website running Eduma Theme, LearnPress, and WPML.
The Issue: When a student purchases a course in the default language (English), they are successfully enrolled. However, when they switch to the secondary language (Arabic), the system does not recognize their enrollment. Instead, it shows the "Buy This Course" button again, requiring a second purchase.
Technical Analysis & Debug Logs: I have performed a deep audit of the site using WP_DEBUG_LOG and discovered a critical depreciation error coming from the theme/plugin integration that I believe is the root cause:
PHP Deprecated: Function LP_Template_Course::course_purchase_button is deprecated since version 4.3.2! Use SingleCourseTemplate::html_btn_purchase_course instead.
My Diagnosis: It appears that the Eduma Theme is using a legacy method (course_purchase_button) to render the enrollment/purchase button. This legacy method likely fails to check the wpml_object_id or the enrollment status of the translated course ID correctly. Therefore, even if the user is enrolled in the database, the frontend logic (View Layer) falsely determines they are "Guests" and shows the buy button.
Actions Taken (So Far):
WPML Troubleshooting: I have run "Clear Ghost Entries", "Set Language Information", "Fix Element Type Collation", and "Synchronize Post Taxonomies" multiple times.
Code Tracing: I attempted to manually patch the deprecated function in the theme files, but the file structure of Eduma seems non-standard, and I could not locate the specific file calling this deprecated method in learnpress-v4/single-course/.
Conflicting Plugins: I noticed MyFatoorah gateway throwing _load_textdomain_just_in_time notices, but disabling it did not resolve the sync issue.
What I Need From You: Since Eduma is listed as a WPML-compatible theme, I need your Compatibility Team to check:
Is the WPML LearnPress Add-on correctly filtering the enrollment check for legacy functions like course_purchase_button?
Can you provide a workaround snippet to force the has_enrolled_course check to return TRUE for translated course IDs if the user owns the original ID?
Or, can you pinpoint exactly where Eduma overrides this button so I can apply the fix?
I am ready to provide access to a staging environment if needed.
Best Regards,
Le sujet '[Fermé] Critical Issue: LearnPress Enrollment Not Syncing Across Languages (Eduma Theme & Deprecated Methods…' est fermé aux nouvelles réponses.