bigcommerce / bigcommerce-for-wordpress

A headless commerce integration for WordPress, powered by BigCommerce
https://www.bigcommerce.com/wordpress/
GNU General Public License v2.0
109 stars 49 forks source link

BC4WP shortcodes displaying twice on the page. Elementor plugin #382

Closed PepeBCPSE closed 1 year ago

PepeBCPSE commented 2 years ago

Expected behavior

When a shortcode is added, store front should only display once.

Actual behavior

Merchant https://satcomstore.com/ https://landmobile.satcomtest.com/(WP URL) has added shortcodes once, and seeing things appear twice on store front.

WP info: BC4WP version: 4.32.0 WordPress version: 6.0.1 PHP version: 7.4.30

Steps to reproduce behavior

  1. Merchant is adding shortcodes. https://support.bigcommerce.com/s/article/BigCommerce-for-WordPress-Products?language=en_US#shortcodes

  2. In this example code added once and duplicated.

Screenshot/Video (if applicable)

Here's an example: https://bit.ly/3dW8t7b

Workaround or possible solution

MT team took a look into the issue and determined the following:

"There is a conflict in the Elementor plugin. By default WordPress, processes page content as is. But if the Elementor plugin is installed then it will work first and it actually makes a full render of the page before the Bigcommerce plugin comes into the game. Since Cart, Account and other pages are required Bigcommerce plugin checks content on each of that page. And if it doesn't find the shortcode for example for the cart it pastes it forcefully. In our case content already has rendered shortcode and Bigcommerce plugin can't see the required construction so it pastes it again."

yuenvision commented 1 year ago

This issue was addressed in v4.35