• Hello,
    sorry for the very “entry level” question, but with this plugin is it possible to synchronize a custom database and woocommerce products in real time?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Alex,

    You can add custom databases (remote as well as local) from the Data Explorer and mix them with your local WordPress database. Does that make sense?

    What is your use case?

    Thanks,
    Peter

    Thread Starter alexdalzovo

    (@alexdalzovo)

    Hello Peter,
    yes I connected the db externally but it is not clear to me how to “transport” the data in the various tables used by woocommerce.

    If you can explain to me I would be grateful 🙂

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Alex,

    If you are connected to your woocommerce database, there is no need to synchronize. The plugin allows you to access your woocommerce tables just like your WordPress tables. You can also use your woocommerce tables in a publication. You just need to select the woocommerce database before you select a table.

    Does this help?

    Best regards,
    Peter

    Thread Starter alexdalzovo

    (@alexdalzovo)

    I don’t think I’ve made myself clear.

    The products are in the “custom” remote database that I can explore thanks to your plugin.

    Now I have to interface that data with the tables used by woocommerce in order to have the products in the woocommerce backend updated in real time.

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Sorry Alex,

    Looks like I misunderstood your question. Are your woocommerce tables in your (default) WordPress database?

    What are your requirements? Are your woocommerce tables updated? Or the product tables? Or both? I have no experience with woocommerce. Can you explain what you are trying to achieve?

    Thanks,
    Peter

    Thread Starter alexdalzovo

    (@alexdalzovo)

    thank you so much for your kind assistance Peter.

    woocommerce stores the products in different tables as they write here:
    https://stackoverflow.com/questions/36965352/woocommerce-finding-the-products-in-database

    I have a database of a custom management system connected remotely and I should “synchronize” the data with these tables. it’s possible? populate part of the wp database with another non-wp database?

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Thanks for clarifying Alex,

    It looks like woocommerce stores products in custom post types. This means you will need to write code to convert products from your relation product table to custom post types. And if I understand your question correctly, you need to handle a way back as well?

    If you had two standard relational tables (on both sides) I would suggest to write database triggers to synchronize in real time. But with custom post types that will be a challenge! You need to know exactly how your custom post types are structured. But even then this sounds tricky. I would look for a more robust solution. Maybe in the user interfaces on both sides. Would that be an option?

    Does anyone else reading this have a better idea?

    Best regards,
    Peter

    WooCommerce has a documented interface to all of their processes. Perhaps, and I say perhaps as I don’t know the specifics of your requirements, the solution lies in writing a few woocommerce action or filter hooks.
    https://docs.woocommerce.com/document/introduction-to-hooks-actions-and-filters/

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘woocommerce sync custom database’ is closed to new replies.