Hi!
I have a website called: hidden link
I have different custom post types created. Some of this post types are parents of Woocommerce product.
My users can create posts and select product via front-end and product becomes a post type child.
My problem appears when I work as administrator and I want to change some text in user posts via backend.
When I save the post it will create two different post:
1) A post with username author whom has created it, but without product.
2) An strange post, empty of custom field values and with my administration author
Can you help me?
Dear oriolc,
The problem you mentioned above is abnormal, in case there is any compatibility problem, please try this:
1) deactivate other plugins and switch to wordpress default theme, and test again
2) If the problem still persists, please provide a database dump file (ZIP file) of your website in below private detail box, I need to test and debug it in my localhost, thanks
Thanks for the details, I don't think the custom codes you mentioned above are related with this issue: the first part of the custom codes if for a custom shortcode, the other part are for CRED form action hook cred_save_data, both of them work in the wordpress front-end, so should not take effect on admin side when you edit a post.
I am downloading the file, and trying to duplicate same problem, will feedback if there is anything found
I tried your database dump file in my localhost in a fresh wordpress installation + Woocommerce 3.2.4 + Types plugin version 2.2.20 + WordPress default theme 2017, Here are the steps I have tried, please correct me if there is anything missing:
1) I assume we are talking about the the custom post type "maestro-premium"
2) edit the post "Alain Tello Robledo" of post type "maestro-premium", ID 64571, and click button "Update", it works fine, I did not see similar problem as you mentioned above:
it will create two different post:
1) A post with username author whom has created it, but without product.
2) An strange post, empty of custom field values and with my administration author
See screenshot: woo1.JPG
3) Add the PHP codes you mentioned above:
https://toolset.com/forums/topic/post-and-product-woocommerce-relationship-and-user-change/#post-590496
/**** Create custom shortcode [current_user_parent_post_select] ****/
...
Same result as above step 2) , so it should be other compatibility problem of your website, please make sure you have already tried as I mentioned above:
https://toolset.com/forums/topic/post-and-product-woocommerce-relationship-and-user-change/#post-590064
1) deactivate other plugins and switch to wordpress default theme, and test again