Hi anatoliy06,
Can you provide us with the image and pages are you have errors?
Thanks.
-
This reply was modified 3 years, 8 months ago by
ThimPress.
link to my site: http://pakhomov.beget.tech/
Screenshot of the main page: http://pakhomov.beget.tech/wp-content/uploads/2022/09/2022-09-22_10-51-19.png – this happens when I add a function the_field(‘some_tag’); (Advanced Custom fields plugin) to the template learnpress
Hi anatoliy06,
With LP v4.1.7.1 you can’t do that, LP will not load another plugin except some plugins accept load.
You can read function getPluginsMustLoadInUrl on LP. We defined list plugin load on Request get list courses like:
'wp-json/lp/v1/courses/archive-course' => [
'learnpress/learnpress.php' => [],
'learnpress-woo-payment/learnpress-woo-payment.php' => [
'woocommerce/woocommerce.php',
],
],
We must do that, because, other plugins make get courses very slow, like plugins: Woo, PMS, Elementor,… Although no need to load when calling on that.
So if you still want to load ACF plugin, you must add that plugin to ‘wp-json/lp/v1/courses/archive-course’. And up version, but when update new version LP it can lose.
In the future, we’ll add the option for managers easy choose plugins can load on a request.
Thanks.
Help me how to do this correctly. I don’t understand how to add a dependency correctly.
To a file learnpress/mu-plugin/class-lp-mu-plugin.php I add the code to the function getPluginsMustLoadInUrl(). But I don’t understand what needs to be written in the third line:
'wp-json/lp/v1/courses/archive-course' => [
'learnpress/learnpress.php' => [],
'learnpress/learnpress.php' => [
'advanced-custom-fields-pro/acf.php',
],
],
And up version of LP to 4.1.7.2.
Hi,
You need to add ‘advanced-custom-fields/acf.php’ (a slug of plugin ACF) to that.
Thanks.