How to remove the theme shortcodes appearing on the Lightbox Popup

The lightbox popup is a feature of the WooCommerce Wholesale Order Form, where the lightbox is generated when the product is clicked in the order form instead of redirecting it to the product page.

It copies the content of the product description and displays it in the lightbox. However, it is common for popular theme builders like Visual Composer, Divi, and others, to use shortcodes in the editor but they don’t provide support the content displayed in our lightbox pop-up. This is why shortcodes are not executed and only the styling shortcodes are displayed.

The best workaround for this is by modifying the lightbox pop-up to display the short description instead of the default product description.

To do this, you will have to modify the template file wwof-product-details.php line 55 on woocommerce-wholesale-order-form/templates/.  For reference on how to edit the order form templates, please click here.

You should find this line of code:

echo do_shortcode( wpautop( $product_post_data->post_content ) );

Please replace it with the following code:

echo nl2br("\n\n",false);
echo do_shortcode( $product_post_data->post_excerpt );

This way, you don’t have to worry about the extra shortcodes displaying on your lightbox popup!

in WooCommerce Wholesale Order Form

Solve The Big Three Problems With Wholesaling In WooCommerce

Add wholesale pricing to products   Streamline your ordering   Register & manage wholesale customer

Explore The Plugin Suite  

[data-image-id='gourmet_bg']
[data-image-id='gourmet_bg']
[data-image-id='gourmet_bg']
[data-image-id='gourmet_bg']
[data-image-id='gourmet_bg']
[data-image-id='gourmet_bg']
[data-image-id='gourmet']
[data-image-id='gourmet']
[data-image-id='gourmet']
[data-image-id='gourmet']
[data-image-id='gourmet']
[data-image-id='gourmet']
[data-image-id='gourmet']
[data-image-id='gourmet']
[data-image-id='gourmet']
[data-image-id='gourmet']