September 4, 2017 at 1:17 pm #1880
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?
Nic,September 4, 2017 at 1:26 pm #1881
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.September 4, 2017 at 1:33 pm #1882
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”
https://www.dropbox.com/s/m381ui6cycfhz9q/Capture2.JPG?dl=0September 4, 2017 at 1:45 pm #1883
What plugin generates the shortcode? What is the contents of theSeptember 4, 2017 at 1:51 pm #1884
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>’;
}September 4, 2017 at 2:06 pm #1885
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;September 4, 2017 at 2:27 pm #1886
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.
NicSeptember 4, 2017 at 2:49 pm #1887
What happens if you replace the shortcode by another shortcode, like this:
[recent_products per_page="4" columns="4"]September 4, 2017 at 3:53 pm #1888
I’ll do some more tests tomorrow,
Thanks for your help and suggestions.
Nic,September 5, 2017 at 8:15 am #1890
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.
- You must be logged in to reply to this topic.