Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Pim

Stock sync met Woocommerce WPML

Goede morgen!

In tegenstelling tot alle andere supporttopics, schrijf ik jullie in het Nederlands.

Laat ik beginnen met zeggen dat ik er van bewust ben dat jullie nog geen volledige WPML ondersteuning bieden en dar mee bezig zijn. Ik stuitte echter op een “soort van bug” die jullie wellicht gemakkelijk kunnen oplossen en mij enorm zou helpen. Ik verwacht namelijk dat dit voor WPML support toch op jullie to-do-lijst (zal komen) staan.

WPML heeft de stock sync zo gemaakt dat wanneer je op de update knop klikt op de edit page van een product, die warde ook gesynced wordt met de andere talen (hetgeen eigenlijk ook losse producten zijn).

Nu is het zo dat jullie inline edit tool deze waarde alleen opslaat voor het product dat je aan het editten bent en er wordt geen sync uitgevoerd. Waarschijnlijk omdat jullie een elegante lichtgewicht-oplossing hebben gemaakt om alleen het attribuut in kwestie up te daten.

Is het mogelijk om achter de knop die de stock aanpast, toch een “post-update functie” te hangen waardoor de sync wel wordt uitgevoerd?

Ik hoor graag van jullie, en nog een fijne dag!

Pim

7 years, 9 months ago
Stefan van den Dungen Gronovius
Developer

Hi Pim,

Please let me answer in English because other users on this forum also may find this answer interesting.
So basically you want a post update instead of just a post_meta update when you store a WooCommerce attribute. This is because WPML syncs their data on a post save, not on just a post meta save.

Although we think this should not be in our core to have dependencies on specific plugins, you can do this yourself. There is an action that you can use which is fired after the value is saved to the database. ( cac/inline-edit/after_ajax_column_save )

Look at the first example on this page:
https://www.admincolumns.com/documentation/action-reference/cacinline-editafter_ajax_column_save/

It just updates the post to set a modification date. But this action should also trigger the WPML sync that you mentioned. Just change the first example so that it will only run for WooCommerce products. Or you can just remove the check on post type if you always want to fire the update_post after an inline edit action in our plugin.

I hope this will help you fix your WPML problem.

7 years, 9 months ago
Pim

Sure, English is fine.
I was writing a long reply telling you about my finding and that it didn’t work properly and asking you for some other advice and then it hit me. OpCache was running so after clearing it’s cache, it was working perfectly.

Thanks for your help!

7 years, 9 months ago
Stefan van den Dungen Gronovius
Developer

Great that your problem is fixed and you’re welcome.

7 years, 9 months ago

You must be logged in to reply to this topic.