diff --git a/cost-of-goods-for-woocommerce.php b/cost-of-goods-for-woocommerce.php
index 9b6c6d5..152850f 100644
--- a/cost-of-goods-for-woocommerce.php
+++ b/cost-of-goods-for-woocommerce.php
@@ -3,7 +3,7 @@
Plugin Name: Cost of Goods for WooCommerce
Plugin URI: https://wpfactory.com/item/cost-of-goods-for-woocommerce/
Description: Save product purchase costs (cost of goods) in WooCommerce. Beautifully.
-Version: 3.3.9
+Version: 3.4.0
Author: WPFactory
Author URI: https://wpfactory.com
Text Domain: cost-of-goods-for-woocommerce
diff --git a/includes/class-alg-wc-cog.php b/includes/class-alg-wc-cog.php
index c59d1a9..5305392 100644
--- a/includes/class-alg-wc-cog.php
+++ b/includes/class-alg-wc-cog.php
@@ -35,7 +35,7 @@ final class Alg_WC_Cost_of_Goods {
* @since 1.0.0
* @var string
*/
- public $version = '3.3.9';
+ public $version = '3.4.0';
/**
* @since 1.0.0
diff --git a/includes/tools/class-alg-wc-cog-bulk-edit-tool.php b/includes/tools/class-alg-wc-cog-bulk-edit-tool.php
index 1e03a8a..e65e23e 100644
--- a/includes/tools/class-alg-wc-cog-bulk-edit-tool.php
+++ b/includes/tools/class-alg-wc-cog-bulk-edit-tool.php
@@ -2,7 +2,7 @@
/**
* Cost of Goods for WooCommerce - Bulk Edit Tool Class.
*
- * @version 3.3.9
+ * @version 3.4.0
* @since 1.2.0
* @author WPFactory
*/
@@ -216,6 +216,31 @@ function handle_costs_filter_query( $query, $costs_filter ) {
return $query;
}
+ /**
+ * handle_stock_status_filter_query.
+ *
+ * @version 3.4.0
+ * @since 3.4.0
+ *
+ * @param $query
+ * @param $stock_status
+ *
+ * @return array
+ */
+ function handle_stock_status_filter_query( $query, $stock_status = '' ) {
+ if ( ! empty( $stock_status ) ) {
+ $query['meta_query'][] = array(
+ 'relation' => 'OR',
+ array(
+ 'key' => '_stock_status',
+ 'value' => $stock_status
+ ),
+ );
+ }
+
+ return $query;
+ }
+
/**
* filter_products_query_by_costs.
*
@@ -306,7 +331,7 @@ function init_bkg_process() {
/**
* get_products_to_be_updated.
*
- * @version 3.3.0
+ * @version 3.4.0
* @since 3.3.0
*
* @param $args
@@ -314,29 +339,33 @@ function init_bkg_process() {
* @return array|stdClass
*/
function get_products_to_be_updated( $args ) {
- $args = wp_parse_args( $args, array(
+ $args = wp_parse_args( $args, array(
'product_category' => array(),
'product_tag' => array(),
'cost_filter' => '',
'update_method' => '',
+ 'stock_status' => ''
) );
$product_categories = $args['product_category'];
- $update_method = $args['update_method'];
- $product_tags = $args['product_tag'];
- $cost_filter = $args['cost_filter'];
+ $update_method = $args['update_method'];
+ $product_tags = $args['product_tag'];
+ $cost_filter = $args['cost_filter'];
+ $stock_status_filter = $args['stock_status'];
// Product args.
- $products_args = array(
+ $products_args = array(
'type' => array_merge( array_keys( wc_get_product_types() ) ),
'status' => array( 'publish' ),
'limit' => '-1',
'return' => 'ids',
);
- $products_args = $this->handle_category_filter_wc_get_products_args( $product_categories, $products_args );
- $products_args = $this->handle_tags_filter_wc_get_products_args( $product_tags, $products_args );
+ $products_args = $this->handle_category_filter_wc_get_products_args( $product_categories, $products_args );
+ $products_args = $this->handle_tags_filter_wc_get_products_args( $product_tags, $products_args );
+ $products_from_taxes_args = $products_args;
if ( ! empty( $cost_filter ) ) {
$products_args = $this->handle_costs_filter_wc_get_products_args( $cost_filter, $products_args );
}
+ $products_args['stock_status'] = $stock_status_filter;
// Child products query args.
$child_products_query_args = array(
@@ -344,34 +373,35 @@ function get_products_to_be_updated( $args ) {
'posts_per_page' => - 1,
'fields' => 'ids',
'no_found_rows' => true,
+
);
if ( ! empty( $cost_filter ) ) {
$child_products_query_args = $this->handle_costs_filter_query( $child_products_query_args, $cost_filter );
}
+ if ( ! empty( $stock_status_filter ) ) {
+ $child_products_query_args = $this->handle_stock_status_filter_query( $child_products_query_args, $stock_status_filter );
+ }
// Get products.
+ $products_from_taxes = empty( $product_tags ) && empty( $product_categories ) ? array() : wc_get_products( $products_from_taxes_args );
+ $products = wc_get_products( $products_args );
+
switch ( $update_method ) {
case 'set_variation_costs_from_parents':
- $products = wc_get_products( $products_args );
- if ( ! empty( $products ) ) {
- $child_products_query_args['post_parent__in'] = $products;
- $child_products_query_args['post_parent__not_in'] = array( 0 );
- $child_products = new WP_Query( $child_products_query_args );
- if ( $child_products->have_posts() ) {
- $products = $child_products->posts;
- } else {
- $products = array();
- }
+ $child_products_query_args['post_parent__in'] = $products_from_taxes;
+ $child_products_query_args['post_parent__not_in'] = array( 0 );
+ $child_products = new WP_Query( $child_products_query_args );
+ if ( $child_products->have_posts() ) {
+ $products = $child_products->posts;
+ } else {
+ $products = array();
}
break;
default:
- $products = wc_get_products( $products_args );
- if ( ! empty( $products ) ) {
- $child_products_query_args['post_parent__in'] = $products;
- $child_products = new WP_Query( $child_products_query_args );
- if ( $child_products->have_posts() ) {
- $products = array_merge( $products, $child_products->posts );
- }
+ $child_products_query_args['post_parent__in'] = $products_from_taxes;
+ $child_products = new WP_Query( $child_products_query_args );
+ if ( $child_products->have_posts() ) {
+ $products = array_merge( $products, $child_products->posts );
}
break;
}
@@ -382,7 +412,7 @@ function get_products_to_be_updated( $args ) {
/**
* update_costs.
*
- * @version 3.3.0
+ * @version 3.4.0
* @since 3.3.0
*
* @return void
@@ -394,7 +424,8 @@ function update_costs() {
'costs_filter' => '',
'_nonce_costs_automatically_val' => '',
'product_category' => array(),
- 'product_tag' => array()
+ 'product_tag' => array(),
+ 'product_stock_status' => '',
) );
if (
@@ -406,17 +437,19 @@ function update_costs() {
}
// Sanitize args.
- $cost_edit_value = floatval( $args['cost_edit_value'] );
- $product_categories = empty( $args['product_category'] ) ? array() : array_map( 'intval', $args['product_category'] );
- $product_tags = empty( $args['product_tag'] ) ? array() : array_map( 'intval', $args['product_tag'] );
- $cost_filter = in_array( $filter = sanitize_text_field( $args['costs_filter'] ), wp_list_pluck( $this->get_cost_filter_options(), 'id' ) ) ? $filter : '';
+ $cost_edit_value = floatval( $args['cost_edit_value'] );
+ $product_categories = empty( $args['product_category'] ) ? array() : array_map( 'intval', $args['product_category'] );
+ $product_tags = empty( $args['product_tag'] ) ? array() : array_map( 'intval', $args['product_tag'] );
+ $cost_filter = in_array( $filter = sanitize_text_field( $args['costs_filter'] ), wp_list_pluck( $this->get_cost_filter_options(), 'id' ) ) ? $filter : '';
+ $stock_status_filter = sanitize_text_field( $args['product_stock_status'] );
// Get products to be updated.
$products = $this->get_products_to_be_updated( array(
- 'product_category' => $product_categories,
- 'product_tag' => $product_tags,
- 'cost_filter' => $cost_filter,
- 'update_method' => $bulk_edit_costs_method,
+ 'product_category' => $product_categories,
+ 'product_tag' => $product_tags,
+ 'cost_filter' => $cost_filter,
+ 'update_method' => $bulk_edit_costs_method,
+ 'stock_status' => $stock_status_filter
) );
// Check if background process is needed.
@@ -482,7 +515,7 @@ function update_costs() {
/**
* update_prices.
*
- * @version 3.3.9
+ * @version 3.4.0
* @since 3.3.0
*
* @return void
@@ -495,7 +528,8 @@ function update_prices() {
'price_rounding' => '',
'_nonce_prices_automatically_val' => '',
'product_category' => array(),
- 'product_tag' => array()
+ 'product_tag' => array(),
+ 'product_stock_status' => '',
) );
if (
@@ -507,17 +541,19 @@ function update_prices() {
}
// Sanitize args.
- $price_edit_value = floatval( $args['price_edit_value'] );
- $product_categories = empty( $args['product_category'] ) ? array() : array_map( 'intval', $args['product_category'] );
- $product_tags = empty( $args['product_tag'] ) ? array() : array_map( 'intval', $args['product_tag'] );
- $price_type = sanitize_text_field( $args['price_type'] );
- $price_rounding = sanitize_text_field( $args['price_rounding'] );
+ $price_edit_value = floatval( $args['price_edit_value'] );
+ $product_categories = empty( $args['product_category'] ) ? array() : array_map( 'intval', $args['product_category'] );
+ $product_tags = empty( $args['product_tag'] ) ? array() : array_map( 'intval', $args['product_tag'] );
+ $price_type = sanitize_text_field( $args['price_type'] );
+ $price_rounding = sanitize_text_field( $args['price_rounding'] );
+ $stock_status_filter = sanitize_text_field( $args['product_stock_status'] );
// Get products to be updated.
$products = $this->get_products_to_be_updated( array(
'product_category' => $product_categories,
'product_tag' => $product_tags,
'update_method' => $bulk_edit_prices_method,
+ 'stock_status' => $stock_status_filter
) );
// Check if background process is needed.
@@ -777,7 +813,7 @@ function get_cost_filter_options() {
return array(
array(
'id' => 'ignore_costs',
- 'label' => __( 'Update products regardless of their current cost', 'cost-of-goods-for-woocommerce' ),
+ 'label' => __( 'Ignore current cost', 'cost-of-goods-for-woocommerce' ),
'desc' => __( '', 'cost-of-goods-for-woocommerce' ),
),
array(
@@ -796,13 +832,14 @@ function get_cost_filter_options() {
/**
* display_bulk_edit_prices.
*
- * @version 3.3.0
+ * @version 3.4.0
* @since 2.6.1
*/
function display_bulk_edit_prices() {
$disabled = apply_filters( 'alg_wc_cog_settings', 'disabled' );
$blocked_text = apply_filters( 'alg_wc_cog_settings', alg_wc_cog_get_blocked_options_message() );
$methods = $this->get_bulk_edit_prices_methods();
+ $stock_statuses = wc_get_product_stock_status_options();
?>
get_bulk_edit_costs_methods();
$cost_filter_options = $this->get_cost_filter_options();
+ $stock_statuses = wc_get_product_stock_status_options();
?>
\n"
"Language-Team: LANGUAGE \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"POT-Creation-Date: 2024-05-07T19:29:49+02:00\n"
+"POT-Creation-Date: 2024-05-08T23:20:03+02:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.7.1\n"
"X-Domain: cost-of-goods-for-woocommerce\n"
@@ -2816,305 +2816,310 @@ msgstr ""
msgid "Your settings have been reset."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:430
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:463
msgid "cost"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:588
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:624
msgid "The %s of %d products are being updated via background processing."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:589
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:625
msgid "An email is going to be sent to %s when the task is completed."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:591
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:627
msgid "Successfully updated the %s of %d products."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:595
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:631
msgid "There are no products to be updated."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:714
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:750
msgid "Edit costs by price percentage"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:715
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:751
msgid "Product costs will be defined from a percentage of product prices."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:719
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:755
msgid "Edit costs by profit percentage"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:720
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:756
msgid "Products costs will be set according to the profit percentage you'd like to achieve based on the current product prices."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:724
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:760
msgid "Increase costs by percentage"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:725
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:761
msgid "Product costs will be increased by %s."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:729
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:765
msgid "Decrease costs by percentage"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:730
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:766
msgid "Product costs will be decreased by %s."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:734
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:770
msgid "Set variation costs from parents"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:735
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:771
msgid "Update variations to match the cost value of their parent products."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:737
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:773
msgid "Example: If a variable product is set with a cost of %s, all its variations will also cost %s."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:757
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:793
msgid "Edit prices by profit percentage"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:758
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:794
msgid "Products prices will be set according to the profit percentage you'd like to achieve based on the current product costs."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:762
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:798
msgid "Edit prices by absolute profit"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:763
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:799
msgid "Products prices will be set according to the absolute profit you'd like to achieve based on the current product costs."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:780
-msgid "Update products regardless of their current cost"
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:816
+msgid "Ignore current cost"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:785
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:821
msgid "Only update products with no costs set, including zero or empty"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:790
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:826
msgid "Only update products with costs already set"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:809
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:929
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:846
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:978
msgid "Update method"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:823
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:959
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:860
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1008
msgid "Profit percentage (%)"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:828
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:865
msgid "Example: If set as %s, a product costing %s will have its price changed to %s, resulting in a %s profit percentage."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:839
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:876
msgid "Absolute profit"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:844
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:881
msgid "Example: If set as %s, a product costing %s will have its price changed to %s, resulting in an absolute profit of %s."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:855
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:892
msgid "Price type"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:858
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:895
msgid "Regular Price"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:859
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:896
msgid "Sale Price"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:863
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:900
msgid "Type of price affected by the update."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:865
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:902
msgid "Note: If the update results in a regular price lower than the sale price, the product won't have its price changed."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:871
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:908
msgid "Rounding"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:874
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:911
msgid "Do not round"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:875
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:912
msgid "Round"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:876
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:913
msgid "Round up"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:877
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:914
msgid "Round down"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:880
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:917
msgid "Price rounding after the calculation."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:886
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1005
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:923
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1054
msgid "Filters"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:890
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1009
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:927
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1058
msgid "Filter by category"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:892
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1011
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:929
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1060
msgid "Search for a category…"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:895
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1014
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:932
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1063
msgid "Select only the categories you want to edit. Leave it empty to update all products."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:901
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1020
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:938
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1069
msgid "Filter by tag(s)"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:903
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1022
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:940
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1071
msgid "Search for a tag…"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:906
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1025
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:943
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1074
msgid "Select only the tag(s) you want to edit. Leave it empty to update all products."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:943
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:949
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1095
+msgid "Filter by stock status"
+msgstr ""
+
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:992
msgid "Price percentage (%)"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:947
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:996
msgid "Most probably you should use a number between 0 and 100."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:949
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:998
msgid "Example: If set as %s, a product priced at %s will have its cost set to %s, representing a %s margin based on the product's price."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:964
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1013
msgid "Example: If set as %s, a product priced at %s will have its cost set to %s, resulting in a %s profit percentage."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:974
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1023
msgid "Percentage increase (%)"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:979
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1028
msgid "Example: If set as %s, a product costing %s will have its cost set to %s, resulting in a %s cost percentage increase."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:989
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1038
msgid "Percentage decrease (%)"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:994
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1043
msgid "Example: If set as %s, a product costing %s will have its cost set to %s, resulting in a %s cost percentage decrease."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1031
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1080
msgid "Filter by cost"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1058
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1118
msgid "Search"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1099
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1286
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1287
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1159
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1346
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1347
msgid "Bulk Edit Costs"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1104
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1296
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1297
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1164
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1356
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1357
msgid "Bulk Edit Prices"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1193
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1253
msgid "Manually"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1196
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1256
msgid "Save"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1198
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1258
msgid "Bulk edit products costs/prices/stock manually. Tools options can be set in \"Cost of Goods for WooCommerce\" plugin settings."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1205
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1213
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1265
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1273
msgid "Automatically"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1206
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1266
msgid "Set the product costs automatically."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1207
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1267
msgid "Variation costs will also be updated accordingly."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1208
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1268
msgid "Update Costs"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1216
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1276
msgid "Update prices"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1218
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1278
msgid "Set the product prices according to the cost."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1219
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1279
msgid "Variation prices will also be updated accordingly."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1265
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1325
msgid "Items per page"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1324
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1384
msgid "Are you really want to update?"
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1431
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1491
msgid "Data have been saved."
msgstr ""
-#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1451
+#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1511
msgid "Sale price is higher than regular price: %s."
msgstr ""
diff --git a/readme.txt b/readme.txt
index 11c227d..b1caf3c 100644
--- a/readme.txt
+++ b/readme.txt
@@ -3,7 +3,7 @@ Contributors: wpcodefactory, omardabbas, karzin, anbinder, algoritmika, kousikmu
Tags: woocommerce, cost, cost of goods, profit, profit calculator
Requires at least: 6.1
Tested up to: 6.5
-Stable tag: 3.3.9
+Stable tag: 3.4.0
License: GNU General Public License v3.0
License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -344,6 +344,9 @@ Once activated, access the plugin's settings by navigating to “WooCommerce > S
== Changelog ==
+= 3.4.0 - 08/05/2024 =
+* Dev - Tools - Add a stock status filter to Bulk edit costs and prices.
+
= 3.3.9 - 07/05/2024 =
* Fix - Tools - Update product price by profit does not update Sale price.