I have a local MySQL with two tables (non-WP). On the remote host I have WP, where the database has corresponding tables, as locally.
Do you see a way to push these two tables from local MySQL to those in the hosted WP database ?
]]>Hi!
I am trying to implement the Snippet your provided on your website, however it doesn’t change Stock status by checking Qty. Is there something I need to add in your Snippet?
/**
* Filter WooCommerce Backorder Status Based on Stock Qty
*
* Set the backorder staus when the stock qty is less than 1.
*
* @package WPDataSync
*/
// WooCommerce _stock value filter
add_filter( 'wp_data_sync__stock_value', 'wp_data_sync_backorder_status_by_stock_qty', 10, 3 );
/**
* WP Data Sync Set Backorder Status by Stock Qty.
*
* @param string $price
* @param int $product_id
* @param WP_DataSync\App\DataSync $data_sync
*
* @return mixed
*/
function wp_data_sync_backorder_status_by_stock_qty( $qty, $product_id, $data_sync ) {
if ( empty( $qty ) ) {
return $qty;
}
if ( ! function_exists( 'wc_get_product' ) ) {
return $qty;
}
$product = wc_get_product( $product_id );
// Default status
$status = 'instock';
if ( intval( $qty ) < 1 ) {
$status = 'onbackorder';
}
$product->set_stock_status( $status );
$product->save();
return $qty;
}
]]>
Thanks for developing such a great plugin!
as I can see the plugin is free to install but needs to be connected to your third party website, if so I wanna ask can this plugin “WORK” free or I need to pay for account at your company?
thanks
If I’m not mistaken, data syncing goes through YOUR website, rather than directly between my sites?
thanks for clarifying
]]>Hello! I’m going to experiment Hands-On but I’m currently on my phone and I figure it might be helpful for others to understand your plugin a bit more before spending time on it.
If I have two separate WordPress websites with woocommerce can I synchronize products between stores? Is it a two-way synchronization or is there a master?
If I have one WordPress multisite and then separate single installs, can I synchronize products within the multisite as well as between the multisite and the single site installs?
Can I do these things without writing code?
Thank you!
]]>