diff --git a/cost-of-goods-for-woocommerce.php b/cost-of-goods-for-woocommerce.php index 1e11559..6c88294 100644 --- a/cost-of-goods-for-woocommerce.php +++ b/cost-of-goods-for-woocommerce.php @@ -3,13 +3,13 @@ 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.2 +Version: 3.3.3 Author: WPFactory Author URI: https://wpfactory.com Text Domain: cost-of-goods-for-woocommerce Domain Path: /langs Copyright: © 2024 WPFactory -WC tested up to: 8.6 +WC tested up to: 8.7 License: GNU General Public License v3.0 License URI: http://www.gnu.org/licenses/gpl-3.0.html */ diff --git a/includes/alg-wc-cog-functions.php b/includes/alg-wc-cog-functions.php index 70677d1..bd000a1 100644 --- a/includes/alg-wc-cog-functions.php +++ b/includes/alg-wc-cog-functions.php @@ -2,7 +2,7 @@ /** * Cost of Goods for WooCommerce - Functions. * - * @version 3.2.1 + * @version 3.3.3 * @since 3.2.1 * @author WPFactory */ @@ -224,28 +224,93 @@ function alg_wc_cog_get_blocked_options_message() { /** * alg_wc_cog_sanitize_number. * - * @version 2.9.5 + * @version 3.3.3 * @since 2.9.5 * * @param $args * - * @return numeric + * @return float */ function alg_wc_cog_sanitize_number( $args = null ) { - $args = wp_parse_args( $args, array( - 'number' => 0, + $args = wp_parse_args( $args, array( + 'value' => 0, 'dots_and_commas_operation' => 'comma-to-dot', // comma-to-dot | dot-to-comma | none + 'typecasting' => 'smart', // float | int | smart | none ) ); - $args = apply_filters( 'alg_wc_cog_sanitize_number_args', $args ); - $number = $args['number']; + $args = apply_filters( 'alg_wc_cog_sanitize_number_args', $args ); + $value = sanitize_text_field( wc_clean( $args['value'] ) ); + $typecasting = $args['typecasting']; $dots_and_commas_operation = $args['dots_and_commas_operation']; if ( 'comma-to-dot' === $dots_and_commas_operation ) { - $number = str_replace( ',', '.', $number ); + $value = str_replace( ',', '.', $value ); } elseif ( 'dot-to-comma' === $dots_and_commas_operation ) { - $number = str_replace( '.', ',', (string) $number ); + $value = str_replace( '.', ',', (string) $value ); + } + + switch ( $typecasting ) { + case 'smart': + if ( strpos( $value, ',' ) === false ) { + $value = (float) $value; + } + break; + case 'float': + $value = (float) $value; + break; + case 'int': + $value = (int) $value; + break; + } - return $number; + return $value; + } +} + +if ( ! function_exists( 'alg_wc_cog_sanitize_cost' ) ) { + /** + * alg_wc_cog_sanitize_cost. + * + * @version 3.3.3 + * @since 3.3.3 + * + * @param $args + * + * @return float + */ + function alg_wc_cog_sanitize_cost( $args = null ) { + $args = wp_parse_args( $args, array( + 'value' => 0, + 'dots_and_commas_operation' => alg_wc_cog_need_to_replace_cog_comma_by_dots() ? 'comma-to-dot' : 'none' + ) ); + return alg_wc_cog_sanitize_number( $args ); + } +} + +if ( ! function_exists( 'alg_wc_cog_need_to_replace_cog_comma_by_dots' ) ) { + /** + * alg_wc_cog_replace_cog_comma_by_dots. + * + * @version 3.3.3 + * @since 3.3.3 + * + * @return bool + */ + function alg_wc_cog_need_to_replace_cog_comma_by_dots() { + return 'yes' === get_option( 'alg_wc_cog_replace_cog_comma_by_dots', alg_wc_cog_need_to_replace_cog_comma_by_dots_default() ); + } +} + +if ( ! function_exists( 'alg_wc_cog_need_to_replace_cog_comma_by_dots_default' ) ) { + /** + * alg_wc_cog_replace_cog_comma_by_dots_default. + * + * @version 3.3.3 + * @since 3.3.3 + * + * @return string + */ + function alg_wc_cog_need_to_replace_cog_comma_by_dots_default() { + return get_option( 'alg_wc_cog_products_sanitize_cog_meta', 'yes' ); } } diff --git a/includes/class-alg-wc-cog-cost-inputs.php b/includes/class-alg-wc-cog-cost-inputs.php index bc648a0..1bb219a 100644 --- a/includes/class-alg-wc-cog-cost-inputs.php +++ b/includes/class-alg-wc-cog-cost-inputs.php @@ -2,7 +2,7 @@ /** * Cost of Goods for WooCommerce - Costs input. * - * @version 3.1.9 + * @version 3.3.3 * @since 2.6.4 * @author WPFactory */ @@ -165,25 +165,37 @@ function add_cost_input_variation( $loop, $variation_data, $variation ) { /** * save_cost_input. * - * @version 1.7.0 + * @version 3.3.3 * @since 1.0.0 * @todo [next] maybe pre-calculate and save `_alg_wc_cog_profit` (same in `save_cost_input_variation()`) */ function save_cost_input( $product_id, $__post ) { if ( isset( $_POST['_alg_wc_cog_cost'] ) ) { - update_post_meta( $product_id, '_alg_wc_cog_cost', wc_clean( $_POST['_alg_wc_cog_cost'] ) ); + $new_cost = alg_wc_cog_sanitize_cost( array( + 'value' => $_POST['_alg_wc_cog_cost'] + ) + ); + if ( $new_cost !== (float) alg_wc_cog()->core->products->get_product_cost( $product_id ) ) { + update_post_meta( $product_id, '_alg_wc_cog_cost', $new_cost ); + } } } /** * save_cost_input_variation. * - * @version 1.1.0 + * @version 3.3.3 * @since 1.0.0 */ function save_cost_input_variation( $variation_id, $i ) { if ( isset( $_POST['variable_alg_wc_cog_cost'][ $i ] ) ) { - update_post_meta( $variation_id, '_alg_wc_cog_cost', wc_clean( $_POST['variable_alg_wc_cog_cost'][ $i ] ) ); + $new_cost = alg_wc_cog_sanitize_cost( array( + 'value' => $_POST['variable_alg_wc_cog_cost'][ $i ] + ) + ); + if ( $new_cost !== (float) alg_wc_cog()->core->products->get_product_cost( $variation_id ) ) { + update_post_meta( $variation_id, '_alg_wc_cog_cost', $new_cost ); + } } } diff --git a/includes/class-alg-wc-cog-orders.php b/includes/class-alg-wc-cog-orders.php index 57f4502..cbd9bc0 100644 --- a/includes/class-alg-wc-cog-orders.php +++ b/includes/class-alg-wc-cog-orders.php @@ -2,7 +2,7 @@ /** * Cost of Goods for WooCommerce - Orders Class. * - * @version 3.3.0 + * @version 3.3.3 * @since 2.1.0 * @author WPFactory */ @@ -1292,7 +1292,7 @@ function get_shipping_total_for_percentage_fees( $order ) { /** * update_order_items_costs. * - * @version 3.1.9 + * @version 3.3.3 * @since 1.1.0 * @todo [maybe] filters: add more? * @todo [maybe] `$total_price`: customizable calculation method (e.g. `$order->get_subtotal()`) (this will affect `_alg_wc_cog_order_profit_margin`) @@ -1425,7 +1425,7 @@ function update_order_items_costs( $args ) { $quantity = $calculate_qty_excluding_refunds ? $item->get_quantity() + $order->get_qty_refunded_for_item( $item_id ) : $item->get_quantity(); if ( '' !== $cost || '' !== $handling_fee ) { $cost = alg_wc_cog_sanitize_number( array( - 'number' => $cost, + 'value' => $cost, 'dots_and_commas_operation' => 'comma-to-dot' ) ); $cost = (float) $cost; @@ -1440,7 +1440,7 @@ function update_order_items_costs( $args ) { $total_price += $line_total; // handling fee. $handling_fee = alg_wc_cog_sanitize_number( array( - 'number' => $handling_fee, + 'value' => $handling_fee, 'dots_and_commas_operation' => 'comma-to-dot' ) ); $handling_fee = (float) $handling_fee; diff --git a/includes/class-alg-wc-cog-products-add-stock.php b/includes/class-alg-wc-cog-products-add-stock.php index 09e95e1..3f8741d 100644 --- a/includes/class-alg-wc-cog-products-add-stock.php +++ b/includes/class-alg-wc-cog-products-add-stock.php @@ -2,7 +2,7 @@ /** * Cost of Goods for WooCommerce - Products - Add Stock. * - * @version 3.2.5 + * @version 3.3.3 * @since 2.8.2 * @author WPFactory */ @@ -81,7 +81,7 @@ function add_product_add_stock_meta_box( $post_type, $post ) { /** * save_product_add_stock. * - * @version 3.1.7 + * @version 3.3.3 * @since 1.7.0 * @todo [next] handle variable products (also unset `$_POST['variable_stock']`) * @todo [maybe] remove `$this->is_add_stock` @@ -118,8 +118,8 @@ function save_product_add_stock( $product_id, $post ) { 'product_id' => (int) $product_id, 'stock' => floatval( $_POST['alg_wc_cog_add_stock'] ), 'stock_prev' => isset( $_POST['_stock'] ) ? (int) $_POST['_stock'] : '', - 'cost_prev' => isset( $_POST['_alg_wc_cog_cost'] ) ? (int) $_POST['_alg_wc_cog_cost'] : '', - 'cost' => floatval( $_POST['alg_wc_cog_add_stock_cost'] ), + 'cost_prev' => isset( $_POST['_alg_wc_cog_cost'] ) ? alg_wc_cog_sanitize_cost( array( 'number' => $_POST['_alg_wc_cog_cost'] ) ) : '', + 'cost' => alg_wc_cog_sanitize_cost( array( 'value' => $_POST['alg_wc_cog_add_stock_cost'] ) ), ) ); if ( isset( $_POST['_stock'] ) ) { unset( $_POST['_stock'] ); @@ -155,7 +155,7 @@ function get_variation_stock_prev_from_post( $variation_id ) { /** * get_variation_cost_prev_from_post. * - * @version 3.1.7 + * @version 3.3.3 * @since 3.1.7 * * @param $variation_id @@ -172,7 +172,7 @@ function get_variation_cost_prev_from_post( $variation_id ) { $variation_cost_prev = $_POST['variable_alg_wc_cog_cost'][ $variation_key ]; } - return $variation_cost_prev; + return alg_wc_cog_sanitize_cost( array( 'value' => $variation_cost_prev ) ); } /** @@ -573,7 +573,7 @@ function get_variations_to_update_html( $parent_product ) { /** * calculate_add_stock_cost. * - * @version 2.4.2 + * @version 3.3.3 * @since 2.4.2 * * @param null $args @@ -596,14 +596,14 @@ function calculate_add_stock_cost( $args = null ) { $cost_calculation_template = $args['calculation_template']; $cost_calculation_template = $this->sanitize_math_expression( str_replace( array_keys( $template_variables ), $template_variables, $cost_calculation_template ) ); include_once WC()->plugin_path() . '/includes/libraries/class-wc-eval-math.php'; - $cost_now = WC_Eval_Math::evaluate( $cost_calculation_template ); + $cost_now = (float) WC_Eval_Math::evaluate( $cost_calculation_template ); return $cost_now; } /** * product_add_stock. * - * @version 3.1.7 + * @version 3.3.3 * @since 1.7.0 * @todo [next] maybe use `$product = wc_get_product( $product_id )`, i.e. `$product->get_stock_quantity()`, `$product->set_stock_quantity( $stock_now )` and `$product->save()`? * @todo [maybe] `$cost_now`: round? @@ -636,7 +636,7 @@ function product_add_stock( $args = null ) { if ( ! $cost_prev ) { $cost_prev = 0; } - $cost_now = @$this->calculate_add_stock_cost( array( + $cost_now = (float) @$this->calculate_add_stock_cost( array( 'product_id' => $product_id, 'template_variables' => array( '%stock_prev%' => $stock_prev, diff --git a/includes/class-alg-wc-cog-products-cost-archive.php b/includes/class-alg-wc-cog-products-cost-archive.php index cd1c348..308380f 100644 --- a/includes/class-alg-wc-cog-products-cost-archive.php +++ b/includes/class-alg-wc-cog-products-cost-archive.php @@ -2,7 +2,7 @@ /** * Cost of Goods for WooCommerce - Products - Cost archive. * - * @version 3.1.7 + * @version 3.3.3 * @since 2.8.2 * @author WPFactory */ @@ -161,7 +161,7 @@ function get_cost_archive_table_ajax() { /** * get_product_cost_archive_table. * - * @version 3.1.7 + * @version 3.3.3 * @since 3.1.7 * * @param $product @@ -187,11 +187,11 @@ function get_product_cost_archive_table( $product ) { $dots_and_commas_operation = 'comma-to-dot'; foreach ( $product_cost_archive as $cost_info ) { $prev_cost = alg_wc_cog_sanitize_number( array( - 'number' => $cost_info['prev_cost_value'], + 'value' => $cost_info['prev_cost_value'], 'dots_and_commas_operation' => $dots_and_commas_operation ) ); $new_cost_value = alg_wc_cog_sanitize_number( array( - 'number' => $cost_info['new_cost_value'], + 'value' => $cost_info['new_cost_value'], 'dots_and_commas_operation' => $dots_and_commas_operation ) ); $table_rows[] = array( diff --git a/includes/class-alg-wc-cog-products.php b/includes/class-alg-wc-cog-products.php index e66651c..63529b6 100644 --- a/includes/class-alg-wc-cog-products.php +++ b/includes/class-alg-wc-cog-products.php @@ -2,7 +2,7 @@ /** * Cost of Goods for WooCommerce - Products Class. * - * @version 3.3.0 + * @version 3.3.3 * @since 2.1.0 * @author WPFactory */ @@ -236,7 +236,7 @@ function handle_product_columns_style() { * * @see https://stackoverflow.com/a/4325608/1193038 * - * @version 2.9.5 + * @version 3.3.3 * @since 2.3.5 * * @param $value @@ -244,14 +244,10 @@ function handle_product_columns_style() { * @return mixed */ function sanitize_cog_meta( $value ) { - if ( 'yes' === get_option( 'alg_wc_cog_products_sanitize_cog_meta', 'no' ) ) { - $value = alg_wc_cog_sanitize_number( array( - 'number' => $value, - 'dots_and_commas_operation' => 'comma-to-dot' - ) ); - } - - return $value; + remove_filter( 'sanitize_post_meta_' . '_alg_wc_cog_cost', array( $this, 'sanitize_cog_meta' ) ); + return alg_wc_cog_sanitize_cost( array( + 'value' => $value, + ) ); } /** @@ -406,7 +402,7 @@ function render_product_columns( $column, $product_id ) { /** * get_product_cost. * - * @version 2.9.5 + * @version 3.3.3 * @since 1.0.0 */ function get_product_cost( $product_id, $args = null ) { @@ -427,7 +423,7 @@ function get_product_cost( $product_id, $args = null ) { $cost = get_post_meta( $parent_id, '_alg_wc_cog_cost', true ); } $cost = alg_wc_cog_sanitize_number( array( - 'number' => $cost, + 'value' => $cost, 'dots_and_commas_operation' => $dots_and_commas_operation ) ); $cost = $convert_to_number ? (float) $cost : $cost; diff --git a/includes/class-alg-wc-cog.php b/includes/class-alg-wc-cog.php index 1bb39f4..9c55669 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.2'; + public $version = '3.3.3'; /** * @since 1.0.0 diff --git a/includes/settings/class-alg-wc-cog-settings-compatibility.php b/includes/settings/class-alg-wc-cog-settings-compatibility.php index f1300fe..17b778e 100644 --- a/includes/settings/class-alg-wc-cog-settings-compatibility.php +++ b/includes/settings/class-alg-wc-cog-settings-compatibility.php @@ -2,7 +2,7 @@ /** * Cost of Goods for WooCommerce - Compatibility Settings. * - * @version 3.2.4 + * @version 3.3.3 * @since 2.4.6 * @author WPFactory */ @@ -36,7 +36,7 @@ function __construct() { /** * get_settings. * - * @version 3.2.4 + * @version 3.3.3 * @since 2.4.6 */ function get_settings() { @@ -234,6 +234,20 @@ function get_settings() { 'type' => 'checkbox', 'custom_attributes' => apply_filters( 'alg_wc_cog_settings', array( 'disabled' => 'disabled' ) ), ), + array( + 'title' => __( 'Add Stock sync', 'cost-of-goods-for-woocommerce' ), + 'desc' => __( 'Update Add Stock feature when the stock is changed from ATUM.', 'cost-of-goods-for-woocommerce' ), + 'desc_tip' => sprintf( + __( 'The %s option should probably be set as %s or %s.', 'cost-of-goods-for-woocommerce' ), + '' . __( 'Products > Add Stock > Empty cost field', 'cost-of-goods-for-woocommerce' ) . '', + '' . __( 'Uses corrent cost', 'cost-of-goods-for-woocommerce' ) . '', + '' . __( 'Uses last cost value from "Add stock history"', 'cost-of-goods-for-woocommerce' ) . '' + ), + 'id' => 'alg_wc_cog_comp_atum_sync_add_stock', + 'default' => 'no', + 'type' => 'checkbox', + 'custom_attributes' => apply_filters( 'alg_wc_cog_settings', array( 'disabled' => 'disabled' ) ), + ), array( 'title' => __( 'Taxes', 'cost-of-goods-for-woocommerce' ), 'desc' => __( 'Subtract taxes from ATUM cost while using the "Import" or "Cost sync" options', 'cost-of-goods-for-woocommerce' ), diff --git a/includes/settings/class-alg-wc-cog-settings-products.php b/includes/settings/class-alg-wc-cog-settings-products.php index a294ea7..a8208fb 100644 --- a/includes/settings/class-alg-wc-cog-settings-products.php +++ b/includes/settings/class-alg-wc-cog-settings-products.php @@ -2,7 +2,7 @@ /** * Cost of Goods for WooCommerce - Products Section Settings. * - * @version 3.1.9 + * @version 3.3.3 * @since 1.7.0 * @author WPFactory */ @@ -28,7 +28,7 @@ function __construct() { /** * get_settings. * - * @version 3.1.9 + * @version 3.3.3 * @since 1.7.0 * @todo [later] Cost field label: use in quick and bulk edit * @todo [later] `alg_wc_cog_products_add_stock`: better description @@ -389,8 +389,8 @@ function get_settings() { array( 'title' => __( 'Cost update', 'cost-of-goods-for-woocommerce' ), 'desc' => __( 'Replace comma by dots when updating cost meta', 'cost-of-goods-for-woocommerce' ), - 'id' => 'alg_wc_cog_products_sanitize_cog_meta', - 'default' => 'no', + 'id' => 'alg_wc_cog_replace_cog_comma_by_dots', + 'default' => alg_wc_cog_need_to_replace_cog_comma_by_dots_default(), 'type' => 'checkbox', ), array( diff --git a/langs/cost-of-goods-for-woocommerce.pot b/langs/cost-of-goods-for-woocommerce.pot index 04b943e..8fae24c 100644 --- a/langs/cost-of-goods-for-woocommerce.pot +++ b/langs/cost-of-goods-for-woocommerce.pot @@ -2,14 +2,14 @@ # This file is distributed under the GNU General Public License v3.0. msgid "" msgstr "" -"Project-Id-Version: cost-of-goods-for-woocommerce 3.2.8\n" +"Project-Id-Version: cost-of-goods-for-woocommerce 3.3.3\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/cost-of-goods-for-woocommerce\n" "Last-Translator: FULL NAME \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-02-14T18:53:16+01:00\n" +"POT-Creation-Date: 2024-04-03T23:06:38+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" @@ -75,21 +75,21 @@ msgstr "" #: includes/analytics/class-alg-wc-cog-analytics-revenue.php:47 #: includes/analytics/class-alg-wc-cog-analytics-stock.php:281 #: includes/class-alg-wc-cog-orders-meta-boxes.php:151 -#: includes/class-alg-wc-cog-orders.php:741 -#: includes/class-alg-wc-cog-orders.php:851 +#: includes/class-alg-wc-cog-orders.php:750 +#: includes/class-alg-wc-cog-orders.php:860 #: includes/class-alg-wc-cog-products-add-stock.php:351 #: includes/class-alg-wc-cog-products-add-stock.php:407 -#: includes/class-alg-wc-cog-products.php:305 -#: includes/class-alg-wc-cog-products.php:316 -#: includes/class-alg-wc-cog-products.php:327 -#: includes/class-alg-wc-cog-products.php:384 +#: includes/class-alg-wc-cog-products.php:301 +#: includes/class-alg-wc-cog-products.php:312 +#: includes/class-alg-wc-cog-products.php:323 +#: includes/class-alg-wc-cog-products.php:380 #: includes/pro/class-alg-wc-cog-pro-compatibility-wpsyncsheets.php:49 #: includes/pro/class-alg-wc-cog-pro-quick-and-bulk-edit.php:111 -#: includes/pro/class-alg-wc-cog-pro-quick-and-bulk-edit.php:189 +#: includes/pro/class-alg-wc-cog-pro-quick-and-bulk-edit.php:190 #: includes/pro/reports/class-wc-report-alg-cog-stock.php:121 #: includes/settings/class-alg-wc-cog-settings-compatibility.php:54 -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:283 -#: includes/tools/class-alg-wc-cog-wplist-bulk-edit-tool.php:368 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:297 +#: includes/tools/class-alg-wc-cog-wplist-bulk-edit-tool.php:373 #: includes/analytics/build/index.js:1 #: includes/analytics/src/modules/categories.js:32 #: includes/analytics/src/modules/orders.js:20 @@ -104,13 +104,12 @@ msgstr "" #: includes/analytics/class-alg-wc-cog-analytics-revenue.php:48 #: includes/analytics/class-alg-wc-cog-analytics-stock.php:282 #: includes/class-alg-wc-cog-orders-meta-boxes.php:152 -#: includes/class-alg-wc-cog-orders.php:742 -#: includes/class-alg-wc-cog-orders.php:861 -#: includes/class-alg-wc-cog-products.php:387 +#: includes/class-alg-wc-cog-orders.php:751 +#: includes/class-alg-wc-cog-orders.php:870 +#: includes/class-alg-wc-cog-products.php:383 #: includes/pro/class-alg-wc-cog-pro-compatibility-wpsyncsheets.php:53 #: includes/pro/reports/class-wc-report-alg-cog-stock.php:123 #: includes/settings/class-alg-wc-cog-settings-compatibility.php:64 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:391 #: includes/analytics/build/index.js:1 #: includes/analytics/src/modules/categories.js:38 #: includes/analytics/src/modules/orders.js:26 @@ -142,10 +141,6 @@ msgstr "" msgid "Cost of Goods for WooCommerce - Bulk update prices" msgstr "" -#: includes/background-process/class-alg-wc-cog-update-variation-costs-bkg-process.php:30 -msgid "Cost of Goods for WooCommerce - Bulk update variation costs" -msgstr "" - #: includes/class-alg-wc-cog-cost-inputs.php:47 #: includes/settings/class-alg-wc-cog-settings-products.php:101 msgid "Cost (excl. tax) (%s)" @@ -153,13 +148,13 @@ msgstr "" #: includes/class-alg-wc-cog-cost-inputs.php:87 #: includes/class-alg-wc-cog-cost-inputs.php:158 -#: includes/tools/class-alg-wc-cog-wplist-bulk-edit-tool.php:308 +#: includes/tools/class-alg-wc-cog-wplist-bulk-edit-tool.php:313 msgid "Profit: %s" msgstr "" #: includes/class-alg-wc-cog-cost-inputs.php:88 #: includes/class-alg-wc-cog-cost-inputs.php:159 -#: includes/tools/class-alg-wc-cog-wplist-bulk-edit-tool.php:308 +#: includes/tools/class-alg-wc-cog-wplist-bulk-edit-tool.php:313 msgid "N/A" msgstr "" @@ -250,59 +245,59 @@ msgstr "" msgid "fee" msgstr "" -#: includes/class-alg-wc-cog-orders.php:322 +#: includes/class-alg-wc-cog-orders.php:331 #: includes/settings/class-alg-wc-cog-settings-orders.php:180 msgid "You are selling below the cost of goods." msgstr "" -#: includes/class-alg-wc-cog-orders.php:540 +#: includes/class-alg-wc-cog-orders.php:549 #: includes/settings/class-alg-wc-cog-settings-orders.php:302 #: includes/settings/class-alg-wc-cog-settings-tools.php:360 msgid "Taxes to profit" msgstr "" -#: includes/class-alg-wc-cog-orders.php:542 +#: includes/class-alg-wc-cog-orders.php:551 msgid "Taxes to profit (%s)" msgstr "" -#: includes/class-alg-wc-cog-orders.php:584 +#: includes/class-alg-wc-cog-orders.php:593 #: includes/settings/class-alg-wc-cog-settings-orders.php:288 #: includes/settings/class-alg-wc-cog-settings-tools.php:359 msgid "Fees to profit" msgstr "" -#: includes/class-alg-wc-cog-orders.php:586 +#: includes/class-alg-wc-cog-orders.php:595 msgid "Fees to profit (%s)" msgstr "" -#: includes/class-alg-wc-cog-orders.php:628 +#: includes/class-alg-wc-cog-orders.php:637 #: includes/settings/class-alg-wc-cog-settings-orders.php:274 #: includes/settings/class-alg-wc-cog-settings-tools.php:358 msgid "Shipping to profit" msgstr "" -#: includes/class-alg-wc-cog-orders.php:630 +#: includes/class-alg-wc-cog-orders.php:639 msgid "Shipping to profit (%s)" msgstr "" -#: includes/class-alg-wc-cog-orders.php:745 -#: includes/class-alg-wc-cog-orders.php:1200 +#: includes/class-alg-wc-cog-orders.php:754 +#: includes/class-alg-wc-cog-orders.php:1209 #: includes/pro/class-alg-wc-cog-pro.php:452 #: includes/pro/class-alg-wc-cog-pro.php:471 msgid "Cost of goods" msgstr "" -#: includes/class-alg-wc-cog-orders.php:864 +#: includes/class-alg-wc-cog-orders.php:873 #: includes/settings/class-alg-wc-cog-settings-orders.php:48 msgid "Profit percent" msgstr "" -#: includes/class-alg-wc-cog-orders.php:867 +#: includes/class-alg-wc-cog-orders.php:876 #: includes/settings/class-alg-wc-cog-settings-orders.php:48 msgid "Profit margin" msgstr "" -#: includes/class-alg-wc-cog-orders.php:1236 +#: includes/class-alg-wc-cog-orders.php:1245 msgid "Handling Fee" msgstr "" @@ -328,7 +323,7 @@ msgstr "" #: includes/pro/class-alg-wc-cog-pro-quick-and-bulk-edit.php:105 #: includes/pro/reports/class-wc-report-alg-cog-stock.php:120 #: includes/settings/class-alg-wc-cog-settings-tools.php:133 -#: includes/tools/class-alg-wc-cog-wplist-bulk-edit-tool.php:369 +#: includes/tools/class-alg-wc-cog-wplist-bulk-edit-tool.php:374 msgid "Stock" msgstr "" @@ -397,7 +392,7 @@ msgid "Go Pro" msgstr "" #: includes/pro/class-alg-wc-cog-pro-compatibility-wc-food.php:74 -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:260 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:274 msgid "Food costs" msgstr "" @@ -410,7 +405,7 @@ msgstr "" msgid "Currencies costs" msgstr "" -#: includes/pro/class-alg-wc-cog-pro-quick-and-bulk-edit.php:192 +#: includes/pro/class-alg-wc-cog-pro-quick-and-bulk-edit.php:193 msgid "- No change -" msgstr "" @@ -447,23 +442,23 @@ msgid "export" msgstr "" #: includes/pro/reports/class-wc-report-alg-cog-stock.php:117 -#: includes/tools/class-alg-wc-cog-import-tool.php:247 -#: includes/tools/class-alg-wc-cog-wplist-bulk-edit-tool.php:365 +#: includes/tools/class-alg-wc-cog-import-tool.php:246 +#: includes/tools/class-alg-wc-cog-wplist-bulk-edit-tool.php:370 msgid "Product ID" msgstr "" #: includes/pro/reports/class-wc-report-alg-cog-stock.php:118 -#: includes/tools/class-alg-wc-cog-wplist-bulk-edit-tool.php:366 +#: includes/tools/class-alg-wc-cog-wplist-bulk-edit-tool.php:371 msgid "SKU" msgstr "" #: includes/pro/reports/class-wc-report-alg-cog-stock.php:119 -#: includes/tools/class-alg-wc-cog-wplist-bulk-edit-tool.php:367 +#: includes/tools/class-alg-wc-cog-wplist-bulk-edit-tool.php:372 msgid "Title" msgstr "" #: includes/pro/reports/class-wc-report-alg-cog-stock.php:122 -#: includes/tools/class-alg-wc-cog-wplist-bulk-edit-tool.php:376 +#: includes/tools/class-alg-wc-cog-wplist-bulk-edit-tool.php:381 msgid "Price" msgstr "" @@ -1030,115 +1025,139 @@ msgid "purchase_price" msgstr "" #: includes/settings/class-alg-wc-cog-settings-compatibility.php:238 -msgid "Taxes" +msgid "Add Stock sync" msgstr "" #: includes/settings/class-alg-wc-cog-settings-compatibility.php:239 +msgid "Update Add Stock feature when the stock is changed from ATUM." +msgstr "" + +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:241 +msgid "The %s option should probably be set as %s or %s." +msgstr "" + +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:242 +msgid "Products > Add Stock > Empty cost field" +msgstr "" + +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:243 +msgid "Uses corrent cost" +msgstr "" + +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:244 +msgid "Uses last cost value from \"Add stock history\"" +msgstr "" + +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:252 +msgid "Taxes" +msgstr "" + +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:253 msgid "Subtract taxes from ATUM cost while using the \"Import\" or \"Cost sync\" options" msgstr "" -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:240 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:254 msgid "The highest priority tax rate will be used, and only on taxable products." msgstr "" -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:254 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:268 msgid "WooCommerce Food" msgstr "" -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:261 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:275 msgid "Add fixed costs to food options" msgstr "" -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:262 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:276 msgid "A metabox is going to be created on the admin products page and on the global food options." msgstr "" -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:263 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:277 msgid "For now, all the options costs will be \"quantity based\" calculated." msgstr "" -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:277 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:291 msgid "WooCommerce Measurement Price Calculator" msgstr "" -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:284 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:298 msgid "Adjust the cost of goods sold according to the product measurement" msgstr "" -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:291 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:305 msgid "Cost field label placeholder" msgstr "" -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:292 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:306 msgid "Add the placeholder %s to the %s option" msgstr "" -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:306 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:320 msgid "Openpos - WooCommerce Point Of Sale(POS)" msgstr "" -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:312 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:326 msgid "Order types" msgstr "" -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:313 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:327 msgid "Order types in reports." msgstr "" -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:314 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:328 msgid "If empty will show common and openpos orders combined." msgstr "" -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:319 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:333 msgid "Common orders" msgstr "" -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:320 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:334 msgid "Openpos orders" msgstr "" -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:332 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:346 msgid "Product Addons" msgstr "" -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:338 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:352 msgid "Addons" msgstr "" -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:339 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:353 msgid "Add costs fields for the addons and create an order meta with addons costs." msgstr "" -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:340 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:354 msgid "It's necessary to add %s on %s option." msgstr "" -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:340 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:354 msgid "Orders > Extra Costs: From Meta" msgstr "" -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:341 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:355 msgid "It's also necessary that addons do not change names once purchased." msgstr "" -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:386 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:400 msgid "plugin" msgstr "" -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:386 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:400 msgid "theme" msgstr "" -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:392 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:406 msgid "Compatibility with %s %s." msgstr "" -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:416 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:430 #: includes/settings/class-alg-wc-cog-settings-tools.php:54 msgid "Please, reload the page to see the next scheduled event info." msgstr "" -#: includes/settings/class-alg-wc-cog-settings-compatibility.php:420 +#: includes/settings/class-alg-wc-cog-settings-compatibility.php:434 #: includes/settings/class-alg-wc-cog-settings-tools.php:59 msgid "Next event scheduled to %s" msgstr "" @@ -2282,7 +2301,7 @@ msgid "Edit prices" msgstr "" #: includes/settings/class-alg-wc-cog-settings-tools.php:119 -#: includes/tools/class-alg-wc-cog-wplist-bulk-edit-tool.php:370 +#: includes/tools/class-alg-wc-cog-wplist-bulk-edit-tool.php:375 msgid "Tags" msgstr "" @@ -2768,339 +2787,364 @@ msgstr "" msgid "Your settings have been reset." msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:166 -msgid "Something went wrong! Please try again." +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:430 +msgid "cost" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:177 -msgid "Some error has occurred. Please, try again." +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:587 +msgid "The %s of %d products are being updated via background processing." msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:181 -msgid "Invalid percentage." +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:588 +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:188 -msgid "It's necessary to set the profit percentage or the absolute profit." +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:590 +msgid "Successfully updated the %s of %d products." msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:261 -msgid "Product costs are being updated via background processing." +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:594 +msgid "There are no products to be updated." msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:262 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:271 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:283 -msgid "An email is going to be sent to %s when the task is completed." +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:713 +msgid "Edit costs by price percentage" +msgstr "" + +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:714 +msgid "Product costs will be defined from a percentage of product prices." +msgstr "" + +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:718 +msgid "Edit costs by profit percentage" +msgstr "" + +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:719 +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:723 +msgid "Increase costs by percentage" +msgstr "" + +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:724 +msgid "Product costs will be increased by %s." +msgstr "" + +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:728 +msgid "Decrease costs by percentage" +msgstr "" + +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:729 +msgid "Product costs will be decreased by %s." +msgstr "" + +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:733 +msgid "Set variation costs from parents" +msgstr "" + +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:734 +msgid "Update variations to match the cost value of their parent products." +msgstr "" + +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:736 +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:756 +msgid "Edit prices by profit percentage" +msgstr "" + +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:757 +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:265 -msgid "Successfully updated product costs." +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:761 +msgid "Edit prices by absolute profit" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:270 -msgid "Variation costs are being updated via background processing." +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:762 +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:274 -msgid "Successfully updated variation costs." +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:779 +msgid "Update products regardless of their current cost" +msgstr "" + +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:784 +msgid "Only update products with no costs set, including zero or empty" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:282 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:316 -msgid "Product prices are being updated via background processing." +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:789 +msgid "Only update products with costs already set" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:286 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:315 -msgid "Successfully updated product prices." +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:808 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:928 +msgid "Update method" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:341 -msgid "It is not necessary to update any products." +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:822 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:958 +msgid "Profit percentage (%)" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:358 -msgid "Affected field" +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:827 +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:361 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:838 +msgid "Absolute profit" +msgstr "" + +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:843 +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:854 +msgid "Price type" +msgstr "" + +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:857 msgid "Regular Price" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:362 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:858 msgid "Sale Price" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:365 -msgid "The selected field will be updated on all the products." +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:862 +msgid "Type of price affected by the update." +msgstr "" + +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:864 +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:370 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:870 msgid "Rounding" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:373 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:873 msgid "Do not round" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:374 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:874 msgid "Round" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:375 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:875 msgid "Round up" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:376 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:876 msgid "Round down" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:381 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:468 -msgid "Profit percentage (%)" -msgstr "" - -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:385 -msgid "Products prices will be set according to the profit percentage you'd like to achieve based on the current product costs." +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:879 +msgid "Price rounding after the calculation." msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:395 -msgid "Products prices will be set according to the absolute profit you'd like to achieve based on the current product costs." +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:885 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1004 +msgid "Filters" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:401 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:477 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:540 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:889 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1008 msgid "Filter by category" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:403 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:479 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:542 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:891 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1010 msgid "Search for a category…" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:406 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:485 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:545 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:894 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1013 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:412 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:491 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:551 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:900 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1019 msgid "Filter by tag(s)" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:414 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:493 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:553 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:902 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1021 msgid "Search for a tag…" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:417 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:496 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:556 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:905 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1024 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:440 -msgid "Undefined costs" -msgstr "" - -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:445 -msgid "Only update variations with empty costs or set as zero" -msgstr "" - -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:448 -msgid "If disabled, will update all variations, including the ones with costs already set." +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:942 +msgid "Price percentage (%)" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:472 -msgid "Products costs will be set according to the profit percentage you'd like to achieve based on the current product prices." +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:946 +msgid "Most probably you should use a number between 0 and 100." msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:502 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:562 -msgid "Filter by cost" +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:948 +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:505 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:565 -msgid "Update products regardless of their current cost" +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:963 +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:506 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:566 -msgid "Update products with no costs set, including zero or empty" +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:973 +msgid "Percentage increase (%)" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:507 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:567 -msgid "Update products with costs already set" +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:978 +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:530 -msgid "Price percentage (%)" +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:988 +msgid "Percentage decrease (%)" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:534 -msgid "Product costs will be defined from a percentage of product prices." +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:993 +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:535 -msgid "Most probably you should use a number between 0 and 100." +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1030 +msgid "Filter by cost" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:587 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1057 msgid "Search" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:626 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:825 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:826 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1098 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1285 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1286 msgid "Bulk Edit Costs" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:631 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:835 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:836 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1103 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1295 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1296 msgid "Bulk Edit Prices" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:718 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1192 msgid "Manually" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:721 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1195 msgid "Save" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:723 -msgid "Bulk edit products costs/prices/stock. Tools options can be set in \"Cost of Goods for WooCommerce\" plugin settings" +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1197 +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:730 -msgid "By Price" +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1204 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1212 +msgid "Automatically" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:731 -msgid "Set the product costs from the product prices." +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1205 +msgid "Set the product costs automatically." msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:732 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:740 -msgid "Variations costs will also be updated accordingly." +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1206 +msgid "Variation costs will also be updated accordingly." msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:733 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:741 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:748 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1207 msgid "Update Costs" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:738 -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:753 -msgid "By Profit" -msgstr "" - -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:739 -msgid "Set the product costs according to the profit you want to achieve." -msgstr "" - -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:746 -msgid "Variations" -msgstr "" - -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:747 -msgid "Set or update the variations to have the same cost value as their parent products." -msgstr "" - -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:756 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1215 msgid "Update prices" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:758 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1217 msgid "Set the product prices according to the cost." msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:759 -msgid "Variations prices will also be updated accordingly." +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1218 +msgid "Variation prices will also be updated accordingly." msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:804 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1264 msgid "Items per page" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:863 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1323 msgid "Are you really want to update?" msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:975 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1430 msgid "Data have been saved." msgstr "" -#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:995 +#: includes/tools/class-alg-wc-cog-bulk-edit-tool.php:1450 msgid "Sale price is higher than regular price: %s." msgstr "" +#: includes/tools/class-alg-wc-cog-import-tool.php:147 #: includes/tools/class-alg-wc-cog-import-tool.php:148 -#: includes/tools/class-alg-wc-cog-import-tool.php:149 msgid "Import Costs" msgstr "" -#: includes/tools/class-alg-wc-cog-import-tool.php:248 +#: includes/tools/class-alg-wc-cog-import-tool.php:247 msgid "Product Title" msgstr "" -#: includes/tools/class-alg-wc-cog-import-tool.php:249 +#: includes/tools/class-alg-wc-cog-import-tool.php:248 msgid "Source %s" msgstr "" -#: includes/tools/class-alg-wc-cog-import-tool.php:250 +#: includes/tools/class-alg-wc-cog-import-tool.php:249 msgid "Destination %s" msgstr "" -#: includes/tools/class-alg-wc-cog-import-tool.php:304 +#: includes/tools/class-alg-wc-cog-import-tool.php:303 msgid "Import" msgstr "" -#: includes/tools/class-alg-wc-cog-import-tool.php:305 +#: includes/tools/class-alg-wc-cog-import-tool.php:304 msgid "Are you sure?" msgstr "" -#: includes/tools/class-alg-wc-cog-import-tool.php:308 +#: includes/tools/class-alg-wc-cog-import-tool.php:307 msgid "Costs Import" msgstr "" -#: includes/tools/class-alg-wc-cog-import-tool.php:309 +#: includes/tools/class-alg-wc-cog-import-tool.php:308 msgid "Import products costs to \"Cost of Goods for WooCommerce\" plugin by copying the meta from %s to %s." msgstr "" -#: includes/tools/class-alg-wc-cog-import-tool.php:310 +#: includes/tools/class-alg-wc-cog-import-tool.php:309 msgid "Tool's options can be set in %s." msgstr "" -#: includes/tools/class-alg-wc-cog-import-tool.php:311 +#: includes/tools/class-alg-wc-cog-import-tool.php:310 msgid "plugin settings" msgstr "" -#: includes/tools/class-alg-wc-cog-wplist-bulk-edit-tool.php:344 +#: includes/tools/class-alg-wc-cog-wplist-bulk-edit-tool.php:349 msgid "Stock status: %s" msgstr "" -#: includes/tools/class-alg-wc-cog-wplist-bulk-edit-tool.php:373 +#: includes/tools/class-alg-wc-cog-wplist-bulk-edit-tool.php:378 msgid "Regular price" msgstr "" -#: includes/tools/class-alg-wc-cog-wplist-bulk-edit-tool.php:374 +#: includes/tools/class-alg-wc-cog-wplist-bulk-edit-tool.php:379 msgid "Sale price" msgstr "" #: includes/analytics/build/index.js:1 #: includes/analytics/src/modules/categories.js:86 -#: includes/analytics/src/modules/orders.js:163 +#: includes/analytics/src/modules/orders.js:162 #: includes/analytics/src/modules/products.js:88 #: includes/analytics/src/modules/revenue.js:86 msgid "Costs total" @@ -3108,7 +3152,7 @@ msgstr "" #: includes/analytics/build/index.js:1 #: includes/analytics/src/modules/categories.js:91 -#: includes/analytics/src/modules/orders.js:168 +#: includes/analytics/src/modules/orders.js:167 #: includes/analytics/src/modules/products.js:93 #: includes/analytics/src/modules/revenue.js:91 msgid "Profit total" diff --git a/readme.txt b/readme.txt index db3c5e2..7b80388 100644 --- a/readme.txt +++ b/readme.txt @@ -2,7 +2,7 @@ Contributors: wpcodefactory, omardabbas, karzin, anbinder, algoritmika, kousikmukherjeeli Tags: woocommerce, cost, cost of goods, profit, profit calculator Requires at least: 6.1 -Tested up to: 6.4 +Tested up to: 6.5 Stable tag: 3.3.2 License: GNU General Public License v3.0 License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -365,6 +365,14 @@ Once activated, access the plugin's settings by navigating to “WooCommerce > S == Changelog == += 3.3.3 - 03/04/2024 = +* Fix - Add Stock feature is not considering float values from COG. +* Fix - Add Stock feature might conflict with the COG input. +* Dev - Compatibility - ATUM - Add option to update Add Stock feature when the stock is changed from ATUM. +* Products - Cost sanitization - "Replace comma by dots when updating cost meta" is now enabled by default. +* Tested up to: 6.5. +* WC tested up to: 8.7. + = 3.3.2 - 08/03/2024 = * Fix - Tools - Session starts unnecessarily.