schero86
Forum Replies Created
-
I solved the issue using following code in functions.php.
Also no need to push generate new sku, it is automaticaly generated on duplication.function clear_sku_on_duplicate( $new_id, $post ) {
// Delete SKU of duplicated product
update_post_meta( $new_id, '_sku', '' );
// Check if product has variatioms
if ( 'product_variation' === get_post_type( $new_id ) ) {
return;
}
// Get variations of duplicated product
$children = get_children( array(
'post_parent' => $new_id,
'post_type' => 'product_variation',
'post_status' => 'publish'
) );
// Delete SKU for all variations of duplicated product
foreach ( $children as $child ) {
update_post_meta( $child->ID, '_sku', '' );
}
}
add_action( 'woocommerce_duplicate_product', 'clear_sku_on_duplicate', 10, 2 );- This reply was modified 2 weeks, 2 days ago by schero86.
I solved the issue using following code in functions.php.
Also no need to push generate new sku, it is automaticaly generated on duplication.function clear_sku_on_duplicate( $new_id, $post ) {
// Delete SKU of duplicated product
update_post_meta( $new_id, '_sku', '' );
// Check if product has variatioms
if ( 'product_variation' === get_post_type( $new_id ) ) {
return;
}
// Get variations of duplicated product
$children = get_children( array(
'post_parent' => $new_id,
'post_type' => 'product_variation',
'post_status' => 'publish'
) );
// Delete SKU for all variations of duplicated product
foreach ( $children as $child ) {
update_post_meta( $child->ID, '_sku', '' );
}
}
add_action( 'woocommerce_duplicate_product', 'clear_sku_on_duplicate', 10, 2 );- This reply was modified 2 weeks, 2 days ago by schero86.
Forum: Plugins
In reply to: [Customer Reviews for WooCommerce] FATAL ERROR AFTER LAST UPDATEyes, working ok now.
Thanks for the quick fix.Forum: Plugins
In reply to: [Facebook for WooCommerce] Product Sets not updatingHello,
The problem is with the filter condition that is created through woocommerce on facebook catalog for a product set.
Instead of creating it with filter “product_category contains xxx ” it is created with the product ids that are at that moment in the woocommerce category.
And so if the product is removed on woocommerce from the category, it will not also update on facebook product set.
I solved the problem by creating the set directly on facebook instead of woocommerce, and using the filter “product_category”.- This reply was modified 4 months ago by schero86.
Forum: Plugins
In reply to: [Facebook for WooCommerce] Product Sets not updatingSo to be more clear, first I sync for ex. 20 products to facebook catalog through this set.
Next day I send only 18 products.
The 2 products that are not sent, should be deleted from the previously created set in facebook catalog.Forum: Plugins
In reply to: [WooCommerce] Product restock errorlates woocommerce updates seem to have fixed my issues
Forum: Plugins
In reply to: [Google for WooCommerce] error log – CRITICok, thanks!
Forum: Plugins
In reply to: [WooCommerce] Product restock errorThere is no error log about this.
I also use BEAR?– WooCommerce Bulk?Edit?And?Products?Manager Professional
Payment method is Cash on deliver, manual refund.Forum: Plugins
In reply to: [Google for WooCommerce] error log – CRITICNo issue, just the error in the log.
Forum: Plugins
In reply to: [WooCommerce] Product restock errorForum: Plugins
In reply to: [WooCommerce] Product restock errorHello,
Problem occurs randomly, I don’t know how many times.
Woocomerce version 9.0.2Forum: Plugins
In reply to: [WooCommerce] Product restock errorHello,
Problem still persists and I found one order where this happened.
There were 2 products, one got restocked from 0 to 1 and stock status changed to “in stock”.
The other product remained with stock “0” and only the stock status changed to “in stock”.
In order notes I see following messages:
– The stock of item #64684 has been increased from to 1 – here the problem
– The stock of item #72436 has been increased from 0 to 1 – here ok
So at first item, it doesn’t say that “from 0 to 1”, it says “from to 1”Having same problem
Forum: Plugins
In reply to: [WooCommerce] Product restock errorThis happens only with some of the refunded orders maybe 1 from 100.
I have no explanation why this is happening, as “restock refunded products” is always checked.
In order notes I always get the message ex. “Stock levels have increased: Hania Dress, with floral print and collar bow – XL (ZRU92-04) 0→1”
But it is strange that the product gets “In stock” value, while quantity remains “0”
System report: https://paste.mozilla.org/As0GYAqFForum: Plugins
In reply to: [WooCommerce] Order seach extremely slowYes, used it only with compatibility mode enabled and it was slow.
- This reply was modified 1 year ago by schero86.