gocodebox / lifterlms

LifterLMS, a WordPress LMS Solution: Easily create, sell, and protect engaging online courses.
https://lifterlms.com
GNU General Public License v3.0
181 stars 135 forks source link

Manual Payments Bypass Trial #2305

Open nrherron92 opened 1 year ago

nrherron92 commented 1 year ago

Reproduction Steps

Expected Behavior

Actual Behavior

Error Messages / Logs


### System and Environment Information

<details>
<summary>System Report</summary>

<!-- Paste your System Report between the three backticks below this line -->

Wordpress

Home Url: https://natie.myliftersite.com Site Url: https://natie.myliftersite.com Login Url: https://natie.myliftersite.com/wp-login.php Version: 6.1.1 Debug Mode: No Debug Log: No Debug Display: Yes Locale: en_US Multisite: No Page For Posts: Not Set Page On Front: Not Set Permalink Structure: /%postname%/ Show On Front: posts Wp Cron: Yes

Settings

Version: 7.0.1 Db Version: 7.0.1 Course Catalog: Course Catalog (#120) [https://natie.myliftersite.com/courses/] Membership Catalog: Membership Catalog (#121) [https://natie.myliftersite.com/memberships/] Student Dashboard: Dashboard (#123) [https://natie.myliftersite.com/dashboard/] Checkout Page: Purchase (#122) [https://natie.myliftersite.com/purchase/] Course Catalog Per Page: 9 Course Catalog Sorting: menu_order,ASC Membership Catalog Per Page: 9 Membership Catalog Sorting: menu_order Site Membership: Not Set Courses Endpoint: my-courses Edit Endpoint: edit-account Lost Password Endpoint: lost-password Vouchers Endpoint: redeem-voucher Autogenerate Username: no Password Strength Meter: no Minimum Password Strength: Terms Required: no Terms Page: Not Set Checkout Names: Checkout Address: Checkout Phone: Checkout Email Confirmation: no Open Registration: yes Registration Names: Registration Address: Registration Phone: Registration Voucher: Registration Email Confirmation: no Account Names: Account Address: Account Phone: Account Email Confirmation: no Confirmation Endpoint: confirm-payment Force Ssl Checkout: no Country: US Currency: USD Currency Position: left Thousand Separator: , Decimal Separator: . Decimals: 2 Trim Zero Decimals: no Recurring Payments: yes Email From Address: team+trial@lifterlms.com Email From Name: My LifterLMS Trial Site Email Footer Text: Email Header Image: Cert Bg Width: Cert Bg Height: Cert Legacy Compat:

Constants

LLMS_REMOVE_ALL_DATA: undefined LLMS_REST_DISABLE: undefined LLMS_SITE_FEATURE_RECURRING_PAYMENTS: undefined LLMS_SITE_IS_CLONE: undefined

Gateways

Stripe: Enabled Stripe Test Mode: Enabled Stripe Logging: yes Stripe Order: 1 Manual: Enabled Manual Logging: no Manual Order: 1

Server

Mysql Version: 5.7.40 Php Curl: Yes Php Default Timezone: UTC Php Fsockopen: Yes Php Max Input Vars: 5000 Php Max Upload Size: 512 MB Php Memory Limit: 256M Php Post Max Size: 1024M Php Soap: Yes Php Suhosin: No Php Time Limt: 30 Php Version: 8.0.25 Software: Apache/2.4.54 (Unix) OpenSSL/1.1.1 Wp Memory Limit: 256M

Browser

HTTP USER AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:108.0) Gecko/20100101 Firefox/108.0

Theme

Name: Kadence Version: 1.1.31 Themeuri: https://www.kadencewp.com/kadence-theme/ Authoruri: https://www.kadencewp.com/ Template: Child Theme: No Llms Support: No

Plugins

LifterLMS: 7.0.1 LifterLMS Advanced Quizzes: 3.0.0 LifterLMS Advanced Videos: 1.0.0-beta.19 LifterLMS Groups: 1.0.0-beta.21 LifterLMS Labs: 1.6.0 LifterLMS Stripe Payment Gateway: 5.5.0 User Switching: 1.7.0 WP Mail Logging: 1.10.4

Integrations

BbPress: No BuddyPress: No LifterLMS Groups: Yes Videos: Vimeo: Yes Videos: Wistia: No Videos: YouTube: Yes

Template Overrides

course/lesson-preview.php (ver: 5.7.0): /srv/users/natie/apps/natie/public/wp-content/themes/kadence/lifterlms/ (ver: 4.4.0) course/syllabus.php (ver: 4.4.0): /srv/users/natie/apps/natie/public/wp-content/themes/kadence/lifterlms/ (ver: 4.4.0)



</details>

This issue has be recreated:
+ [x] Locally
+ [ ] On a staging site
+ [x] On a production website
+ [x] With only LifterLMS and a default theme

### Browser, Device, and Operating System Information

+ Browser name and version
+ Operating System name and version
+ Device name and version (if applicable)
eri-trabiccolo commented 1 year ago

@nrherron92 Thanks for reporting this. Bug confirmed, we're gonna look into this and keep you posted.

eri-trabiccolo commented 1 year ago

I think that the only problem that regards to the core is the fact that we display the wrong Due Now price. We show the next payment price rather than the trial one. Here, if the order has trial and the trial was not paid, we should display the trial price: https://github.com/gocodebox/lifterlms/blob/7.0.1/templates/checkout/form-switch-source.php#L69

The real bug is in the Stripe add-on (and I guess in the other payment gateway addons).