lifterlms icon indicating copy to clipboard operation
lifterlms copied to clipboard

Shortcodes Ultimate No Longer Works in Terms & Conditions on Checkout

Open nrherron92 opened this issue 3 years ago • 4 comments

Reproduction Steps

  • Install Shortcodes Ultimate and LifterLMS
  • In LifterLMS enable Terms and Conditions
  • In the Terms and Conditions Notice box add a Shortcodes Ultimate shortcode (in the user's case a 'label' shortcode)

Expected Behavior

  • The shortcode renders and shows the label on the checkout page for the terms and conditions notice
  • This worked up until version LifterLMS 4.17.

Actual Behavior

  • It shows the shortcode code not what it should be rendered as.

Error Messages / Logs

  • Include any relevant error messages or log files


System and Environment Information

System Report
Wordpress
-------------------------------------------

Home Url: https://.myliftersite.com
Site Url: https://myliftersite.com
Login Url: https://myliftersite.com/wp-login.php
Version: 5.7.2
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: 4.21.3
Db Version: 4.21.3
Course Catalog: Course Catalog (#6) [https://myliftersite.com/courses/]
Membership Catalog: Membership Catalog (#7) [https://.myliftersite.com/memberships/]
Student Dashboard: Dashboard (#9) [https://.myliftersite.com/dashboard/]
Checkout Page: Purchase (#8) [https://.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: yes
Password Strength Meter: yes
Minimum Password Strength: strong
Terms Required: yes
Terms Page: Sample Page (#2) [https://.myliftersite.com/sample-page/]
Checkout Names: required
Checkout Address: required
Checkout Phone: optional
Checkout Email Confirmation: yes
Open Registration: yes
Registration Names: required
Registration Address: optional
Registration Phone: hidden
Registration Voucher: optional
Registration Email Confirmation: no
Account Names: required
Account Address: required
Account Phone: optional
Account Email Confirmation: yes
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: [email protected]
Email From Name: A LifterLMS Sandbox
Email Footer Text: 
Email Header Image: 
Cert Bg Width: 800
Cert Bg Height: 616
Cert Legacy Compat: no


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: no
Stripe Order: 1
Manual: Enabled
Manual Logging: no
Manual Order: 1


Server
-------------------------------------------

Mysql Version: 5.7.34
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: 7.3.28
Software: Apache/2.4.46 (Unix) OpenSSL/1.1.1
Wp Memory Limit: 256M


Browser
-------------------------------------------

HTTP USER AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36


Theme
-------------------------------------------

Name: Twenty Nineteen
Version: 2.0
Themeuri: https://wordpress.org/themes/twentynineteen/
Authoruri: https://wordpress.org/
Template: 
Child Theme: No
Llms Support: No


Plugins
-------------------------------------------

LifterLMS: 4.21.3
LifterLMS Groups: 1.0.0-beta.10
LifterLMS Stripe Payment Gateway: 5.3.1
Shortcodes Ultimate: 5.10.0
User Switching: 1.5.7


Integrations
-------------------------------------------

BbPress: No
BuddyPress: No
LifterLMS Groups: Yes


Template Overrides
-------------------------------------------




This issue has be recreated:

  • [X] Locally
  • [X] 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)

HS-168178

nrherron92 avatar Jun 10 '21 18:06 nrherron92

@nrherron92 where'd we come up with 4.17 from? As far as I can tell this would have worked exactly the same from version 3.18.0.

It's possible shortcodes would have worked prior to that but I'm not positive and I'm not going to setup a test.

At the moment I have absolutely no capacity to address a core issue not related to 5.x release. Following 5.x I have improvements planned to move T&C and PP text into the block editor and at that point it'll be pretty trivial to add shortcodes and other kinds of content to the form and I'll address this then.

At the moment the best solution I can come up with would be some custom PHP to run the content of the text box through do_shortcode() -- do we feel this is an emergency that requires a custom solution or can this hang for a few weeks or a month?

thomasplevy avatar Jun 10 '21 18:06 thomasplevy

@thomasplevy I got 4.17 from testing it with rollbacks. the user was on 4.8 and I knew it wasn't working with the most recent releases so I backtracked.

But no, I think a custom solution will work for now!

nrherron92 avatar Jun 10 '21 18:06 nrherron92

This should work, I didn't test it can you test it?

add_filter( 'llms_get_terms_notice', 'do_shortcode' );

thomasplevy avatar Jun 10 '21 19:06 thomasplevy

Thanks! Yes I'll test it and get back to the user!

nrherron92 avatar Jun 11 '21 18:06 nrherron92