-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e21142
commit f830826
Showing
11 changed files
with
564 additions
and
236 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
includes/background-process/class-alg-wc-cog-update-variation-costs-bkg-process.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
/** | ||
* Cost of Goods for WooCommerce - Background Process - Update variation costs. | ||
* | ||
* @version 2.9.5 | ||
* @since 2.9.5 | ||
* @author WPFactory | ||
*/ | ||
|
||
defined( 'ABSPATH' ) || exit; | ||
|
||
if ( ! class_exists( 'Alg_WC_Cost_of_Goods_Update_Variation_Costs_Bkg_Process' ) ) : | ||
|
||
class Alg_WC_Cost_of_Goods_Update_Variation_Costs_Bkg_Process extends Alg_WC_Cost_of_Goods_Bkg_Process { | ||
|
||
/** | ||
* @var string | ||
*/ | ||
protected $action = 'alg_wc_cog_update_variation_costs_bkg_process'; | ||
|
||
/** | ||
* get_action_label. | ||
* | ||
* @since 2.9.5 | ||
* @version 2.9.5 | ||
* | ||
* @return string | ||
*/ | ||
protected function get_action_label() { | ||
return __( 'Cost of Goods for WooCommerce - Bulk update variation costs', 'cost-of-goods-for-woocommerce' ); | ||
} | ||
|
||
/** | ||
* task. | ||
* | ||
* @version 2.9.5 | ||
* @since 2.9.5 | ||
* | ||
* @param mixed $item | ||
* @return bool|mixed | ||
*/ | ||
protected function task( $item ) { | ||
parent::task( $item ); | ||
alg_wc_cog()->core->products->update_variation_cost_from_parent( $item ); | ||
return false; | ||
} | ||
} | ||
endif; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.