CalderaWP / Caldera-Forms

Drag and drop, responsive WordPress form builder.
https://CalderaForms.com
GNU General Public License v2.0
187 stars 163 forks source link

CalderaForms & Woocommerce - is_woocommerce_page() function returns true even outside woocommerce pages. #3305

Open marlonbrum opened 5 years ago

marlonbrum commented 5 years ago

Version Information : WordPress Version: 5.0.4PHP Version: 7.2.20MySQL Version: 5.5.62Caldera Forms Version: 1.8.6WP_DEBUG:

I'm having a problem with caldera forms in wich the "Form insert" button dissapeared from the toolbar when editing a page. After some investigation I discovered it only occurrs when Woocommerce plugin is active. I've done some searching and discover Issue #2527, wich removes the button from woocommerce admin page, but I'm in the "post Edit" page, not woocommerce, although Woocommerce probably has some code there too.

Analising the code the problem is the is_woocommerce_page() function on classes\admin\assets.php is returning true even outside woocommerce admin pages.

Shelob9 commented 5 years ago

@marlonbrum thanks for reporting this

@New0 Let's discuss tomorrow. I think it's best to remove the shortcode inserter and related scripts. Users can still use shortcodes, but I don't see a reason to fix this legacy UI that causes so many issues.