bobbingwide / oik-clone

Clone content between sites
https://www.oik-plugins.com/oik-plugins/oik-clone-clone-your-wordpress-content/
GNU General Public License v2.0
5 stars 0 forks source link

Unexpected post replacement when cloning blocks.wp.a2z to woocommerce.wp.a2z #46

Open bobbingwide opened 4 years ago

bobbingwide commented 4 years ago

Here's an interesting/unexpected behaviour. This is a side effect which I realise I'm not too bothered about since it may have automatically achieved something I would have had to do manually.

A while back, WooCommerce did not provide its own blocks. In woocommerce.wp.a2z I started cataloguing the blocks provided by WooCommerce Blocks.

Now I'm creating blocks for WooCommerce in blocks.wp.a2z, and cloning them to both blocks.wp-a2z.org and woocommerce.wp.a2z.

Since the post titles are the same, the blocks in woocommerce.wp.a2z that were created for WooCommerce Blocks are being found and updated as blocks for WooCommerce. During the cloning the _plugin_ref is being changed, as we would expect it to.

When, in the future, I clone the blocks from woocommerce.wp.a2z to woocommerce.wp-a2z.org there'll only be the blocks for WooCommerce. I won't have to worry about deleting duplicate blocks for WooCommerce blocks.

Whether or not this produces a problem if I then re-add the extra/updated blocks from WooCommerce blocks to blocks.wp.a2z will be discovered in due course.