fbpx
šŸ¤Ā  NEW YEAR SALE RETURNS - 50% OFF all plans! šŸ¤ Grab it Now

Duplicating variations that have tiered pricing in them

I have products that have variations, and I also have another plugin that deals with tiered pricing for users and distributors.
When I duplicate a variation in the product, the tiered pricing does not get duplicated….how can I get it so that when a variation is duplicated, it duplicates ALL of the information in the variation?

Please look at product LS.
You will see in the variation #815 that it has tiered pricing.
I duplicated this variation and it is #847 but the tiered pricing is not in the variation.

Ahmed Ehsaan

Hi Justin,

Which pricing you are using?

Thank You

Ahmed Ehsaan

HI Justin,

Could you give me plugin download link?

Thank You

Tanvirul Haque

HiĀ Justin,

Thanks for reaching out to us. Could you send us the latest version of the B2B Wholesale Suite plugin that you are using on your site? We’ll try to investigate your issue by installing your plugin on our local setup.

You can upload the plugin file in Dropbox or Google Drive and send the download link here directly.

Also, kindly share a reproduce video of how you are using and set up theĀ B2B Wholesale Suite plugin on your site because we have to do the same thing on our local setup. You may use this tool to record the video.

Looking forward to hearing from you soon.

Thank you

The website is currently in development, so please just go into the website and investigate.

Tanvirul Haque

Hello Justin Vandenberg,

Thanks for your patient. Could you put the following PHP code inside your child-theme functions.php file and let me know is your issue resolved or not?

add_action( 'woo_variation_duplicator_variation_save', function ( $new_variation_id, $variation_id ) {
$pricetiers_group_b2c = get_post_meta( $variation_id, 'b2bwhs_product_pricetiers_group_b2c', true );
$pricetiers_group_261 = get_post_meta( $variation_id, 'b2bwhs_product_pricetiers_group_261', true );
$b2bwhs_regular_price = get_post_meta( $variation_id, 'b2bwhs_regular_product_price_group_261', true );
$b2bwhs_sale_price = get_post_meta( $variation_id, 'b2bwhs_sale_product_price_group_261', true );
if ( $pricetiers_group_b2c ) {
update_post_meta( $new_variation_id, 'b2bwhs_product_pricetiers_group_b2c', $pricetiers_group_b2c );
}
if ( $pricetiers_group_261 ) {
update_post_meta( $new_variation_id, 'b2bwhs_product_pricetiers_group_261', $pricetiers_group_261 );
}
if ( $b2bwhs_regular_price ) {
update_post_meta( $new_variation_id, 'b2bwhs_regular_product_price_group_261', $b2bwhs_regular_price );
}
if ( $b2bwhs_sale_price ) {
update_post_meta( $new_variation_id, 'b2bwhs_sale_product_price_group_261', $b2bwhs_sale_price );
}
}, 10, 2 );

Thanks