-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow the description to be filtered by themes or plugins #1761
Comments
Hi @smarx80 Thanks for the issue - seems sensible - we'll need to investigate / double-check. At face value there might be some historic reasons this might not be happening if it is the case. |
Hi, |
Hello @haszari @jconroy, is there anyone on this topic?? Give me a feedback on this issue please. Now ~ 10 month have passed, without any progress, it seems to be quite long time to have an answer. An answer to decide if apply or not apply my patch, or another one that you want. Please answer. Thank you, Simone. |
Thanks for the patch @smarx80 and sorry for the delayed response. We have discussed the suggested solution and we prefer to handle this slightly differently. First of all we'd like to make use of the WC_Product::get_description function (like is done for the variable products). Instead of applying the filter The final description can then be passed through a filter so any plugins/themes can hook into this filter if the content needs to be changed. You can see a similar example of how this is done for one of our other extensions here. We don't have this solution ready, but we'll leave this issue open so it can be prioritized and a PR can be created. |
Until this has been resolved a temporary workaround is to use the facebook_for_woocommerce_integration_prepare_product filter to modify the description. Which will still allow you to call the appropriate filters for wpglobus to populate the correct content. |
Marking as low for now as there is a workaround available |
Hi,
using the plugin I noticed a problem in sending title, content and excerpt of products to Facebook.
In the file include/fbproduct.php it seems that are used directly $post->content , $post->title etc… which is almost fine, but it doesn’t apply all the filters that are needed and that are set by theme and plugins.
In a context where plugins like wpglobus are used for translations, incorrect data are sent, (will be sent also all amount of its placeholders for example, obviously).
I have therefore corrected it using the corresponding functions (get_the_title, get_the_excerpt) and applied the corresponding content filter, removing the wptexturize to avoid problems of incorrect rendering of some characters that are not then reconverted on Facebook.
Here the diff so you can push in next release if you want.
Thanks,
Simone.
patch.txt
The text was updated successfully, but these errors were encountered: