I have a multisite on different domains.
site-one.com
site-two.com
I am currently using Woocommerce Multistore plugin (https://woomultistore.com/) to sync products from one site to another as they are to be exactly the same. To be honest the plugin has many faults and bugs and I want to try something custom.
My thoughts were that instead of copying the products from one site to another that I could use a hook like pre_get_posts to get the products of site-one and display them on site-two.
I have had initial success in this by this simple function that gets products from the DB associated with site-on if its a product post type:
This has its limitations as it only works frontend for now but the other hurdle I am looking to fix is that on site-two the products are showing but I cant add them to the basket. Nothing happens when I try – page just reloads.
The add to cart ajax returns this error in console:
Firstly I would like to know whether this route I’m taking will eventually work or is it impossible and based on that – if it is possible where should I go from here? Im stumped as to how to add to basket?!
- Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
- Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
- Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.
Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com