You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi, i found this action that fires after the user is deleted from a course. I found a problem though, even if I use it without any function inside it, such as this:
function llms_user_enrollment_deleted_function($user_id, $product_id, $enrollment_trigger) {
}
load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,jquery-ui-core,utils,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.0.2:2 POST https://academyblu1stg.wpengine.com/wp-admin/admin-ajax.php 500
System and Environment Information
System Report
Wordpress
-------------------------------------------
Home Url: https://academyblu1stg.wpengine.com
Site Url: https://academyblu1stg.wpengine.com
Login Url: https://academyblu1stg.wpengine.com/wp-login.php
Version: 6.0.2
Debug Mode: Yes
Debug Log: No
Debug Display: Yes
Locale: it_IT
Multisite: No
Page For Posts: Not Set
Page On Front: Home page (#322) [https://academyblu1stg.wpengine.com/]
Permalink Structure: /%postname%/
Show On Front: page
Wp Cron: Yes
Settings
-------------------------------------------
Version: 6.11.0
Db Version: 6.11.0
Course Catalog: Catalogo Corsi (#16) [https://academyblu1stg.wpengine.com/?page_id=16]
Membership Catalog: Catalogo Membership (#17) [https://academyblu1stg.wpengine.com/?page_id=17]
Student Dashboard: Bacheca (#19) [https://academyblu1stg.wpengine.com/dashboard/]
Checkout Page: Acquista (#18) [https://academyblu1stg.wpengine.com/purchase/]
Course Catalog Per Page: 9
Course Catalog Sorting: menu_order
Membership Catalog Per Page: 9
Membership Catalog Sorting: menu_order
Site Membership: Not Set
Courses Endpoint: my-courses
Edit Endpoint: modifica-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: no
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: IT
Currency: EUR
Currency Position: left
Thousand Separator: ,
Decimal Separator: .
Decimals: 2
Trim Zero Decimals: no
Recurring Payments: no
Email From Address: formazione@bluenext.it
Email From Name: Bluenext Academy
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
Manuale: Disabled
Manuale Logging: no
Manuale Order: 1
Server
-------------------------------------------
Mysql Version: 5.7.39
Php Curl: Yes
Php Default Timezone: UTC
Php Fsockopen: Yes
Php Max Input Vars: 10000
Php Max Upload Size: 50 MB
Php Memory Limit: 512M
Php Post Max Size: 100M
Php Soap: Yes
Php Suhosin: No
Php Time Limt: 3600
Php Version: 7.4.28
Software: Apache
Wp Memory Limit: 40M
Browser
-------------------------------------------
HTTP USER AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
Theme
-------------------------------------------
Name: LifterLMS LaunchPad Child
Version: 1.1.0
Themeuri: https://lifterlms.com/product/launchpad/
Authoruri: https://lifterlms.com
Template: lifterlms-launchpad
Child Theme: Yes
Llms Support: No
Plugins
-------------------------------------------
Elementor: 3.7.7
Elementor Pro: 3.7.7
Events Widgets For Elementor And The Events Calendar: 1.6
FluentCRM - Marketing Automation For WordPress: 2.5.95
Genesis Blocks: 1.5.1
Import Users from CSV: 1.1
LifterLMS: 6.11.0
LifterLMS Blocks: 2.4.0
LifterLMS Custom Fields: 2.0.2
LifterLMS Labs: 1.6.0
LifterLMS Stripe Payment Gateway: 5.4.0
LifterLMS WPForms: 1.1.1
Login as User: 1.4.4
OTGS Installer: 3.0.3
Simple Custom CSS and JS: 3.40
The Events Calendar: 6.0.1
Toolset Blocks: 1.6.3
Toolset Module Manager: 1.8.8
Toolset Types: 3.4.16
Users Insights: 4.2.1
WP All Export: 1.3.7
WP Engine Smart Plugin Manager: 5.10.4
WPForms: 1.7.7
WPForms Geolocation: 2.3.1
WPForms Post Submissions: 1.4.0
WPForms User Registration: 2.1.0
WP Mail Logging: 1.10.4
Yoast Duplicate Post: 4.5
Integrations
-------------------------------------------
BbPress: No
BuddyPress: No
LifterLMS WPForms: No
Template Overrides
-------------------------------------------
content-certificate.php (ver: 6.0.0): /nas/content/live/academyblu1stg/wp-content/themes/lifterlms-launchpad-child-trunk//lifterlms/ (ver: 4.21.0)
checkout/form-checkout.php (ver: 5.0.0): /nas/content/live/academyblu1stg/wp-content/themes/lifterlms-launchpad-child-trunk//lifterlms/ (ver: 5.0.0)
emails/header.php (ver: 3.16.15): /nas/content/live/academyblu1stg/wp-content/themes/lifterlms-launchpad-child-trunk//lifterlms/ (ver: 3.16.15)
This issue has be recreated:
Locally
On a staging site
On a production website
With only LifterLMS and a default theme
The text was updated successfully, but these errors were encountered:
Looks like you're using add_action() the wrong way.
You defined a callback that requires 3 parameters: function llms_user_enrollment_deleted_function($user_id, $product_id, $enrollment_trigger) {
But you're passing only one parameter: add_action ('llms_user_enrollment_deleted', 'llms_user_enrollment_deleted_function');
The latter should be: add_action ('llms_user_enrollment_deleted', 'llms_user_enrollment_deleted_function', 10, 3);
Where 10 is the default priority, and 3 the number of parameters passed to the callback.
See: https://developer.wordpress.org/plugins/hooks/actions/
Reproduction Steps
hi, i found this action that fires after the user is deleted from a course. I found a problem though, even if I use it without any function inside it, such as this:
function llms_user_enrollment_deleted_function($user_id, $product_id, $enrollment_trigger) {
}
add_action ('llms_user_enrollment_deleted', 'llms_user_enrollment_deleted_function');
In the course settings when I try to remove a user it remains pending like this:
When I refresh the page the user is deleted, but he shouldn't do that
Expected Behavior
user removals without infinite pending and function starting correctly
Actual Behavior
Infinite loading and internal functions are not performed
complete function
function llms_user_enrollment_deleted_function($user_id, $product_id, $enrollment_trigger) {
$contactApi = FluentCrmApi('contacts');
$user_info = get_userdata($user_id);
$emailAddress = $user_info->user_email;
$post_type = get_post_type( $product_id );
if($post_type == 'course' && metadata_exists( 'post', $product_id, 'wpcf-id_lista' )) {
$id_lista = get_post_meta($product_id, 'wpcf-id_lista', true);
if(!empty($id_lista)){
$contact = $contactApi->getContact($emailAddress);
$listIds = [$id_lista]; // 5 is the list ID
$contact->detachLists($listIds);
//return true;
}
}
return true;
}
add_action( 'llms_user_enrollment_deleted', 'llms_user_enrollment_deleted_function' );
Error Messages / Logs
System and Environment Information
System Report
This issue has be recreated:
The text was updated successfully, but these errors were encountered: