Repository › Forums › Support › WooCommerce Pricing Rules PRO › short codes
It seems that if I put a shortcode (for another plugin) in the long description of the product, when I add some pricing rules the resulting html from that shortcode is duplicated just above the pricing table.
The ‘unselect all’ button appearing in 2 places is the result of a shortcode in the main description only.
If the pricing rules are removed then the button is no longer duplicated.
Is this something you’re aware of? Also is there a workaround?
No, I’m not aware if this issue.
Maybe this happens because the shortcode is automatically displayed instead of the ‘excerpt’?
Try entering an excerpt for the product.
The Excerpt for the product in the image is “Photo Selection” which appears under the pricing table
The extra button is being rendered inside the DIV with the class “soft79-single-product-discount-wrap”
What plugin generates the shortcode? What is the contents of the
The product URL is: http://nicdim.dscloud.me/wordpress/product/photo-purchase/
It’s an incredibly slow test server, but hopefully it loads for you.
It’s a very simple home written plugin.
The complete shortcode in the product description (in case there’s some conflict) is
[flickr-woo textbox=”photo_ids” showunselectall=true ]
the code behind rendering the button is very simple and just doing an echo
$WOO_SHOW_UNSELECTALL = true;
echo ‘<button class=”btn btn-sm btn-primary image-unselectall”>Unselect all</button>’;
What is the post-type of the product? Is it possible that it is not a normal WooCommerce ‘product’?
You can run this query to find out the post type:
SELECT post_type FROM wp_posts WHERE post_id = 57;
The post_type of ID 57 is: product
There is nothing unusual about this product. Another plugin is inserting a text field but that’s rendered within the form element and stored in the db separately.
What happens if you replace the shortcode by another shortcode, like this:
[recent_products per_page="4" columns="4"]
I’ll do some more tests tomorrow,
Thanks for your help and suggestions.
Thanks for your help. the recent_products shortcode worked without a problem which helped me narrow it down to some badly written plugins.
Thanks again for your help.