LLMS_PlayNice::divi_fb_wc_product_tabs_before()

Temporarily remove global LLMS_Product data when the Divi Frontend Page builder is loading.


Description Description

Resolves an issue encountered when running Divi, WooCommerce, and LifterLMS which prevents the frontend builder from loading on courses and memberships because LifterLMS (stupidly?) and WC both use the global $product variable to store data about our respective products and Divi assumes (understandably?) that $product is always a WC_Product causing fatal errors.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/class.llms.playnice.php

	/**
	 * Allow our dashboard endpoints sharing a query var with WC to function
	 *
	 * Inform WC that it should not force a 404 because we're on a valid endpoint.
	 *
	 * @since 3.37.17
	 *
	 * @link https://github.com/gocodebox/lifterlms/issues/849
	 *
	 * @param bool $is_page_not_found True from `woocommerce_account_endpoint_page_not_found` filter.
	 * @return bool
	 */
	public function wc_account_endpoint_page_not_found( $is_page_not_found ) {

		if ( is_llms_account_page() && is_wc_endpoint_url() ) {
			$is_page_not_found = false;

Top ↑

Changelog Changelog

Changelog
Version Description
3.37.18 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.