Skip to content

Commit

Permalink
Конвертер валют если цена указана в евро, долларах и рублях #277
Browse files Browse the repository at this point in the history
  • Loading branch information
uptimizt committed Jun 15, 2020
1 parent 33cc995 commit 4d1dd9e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion inc/ProductsCategories.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public static function product_save($product, $value, $data)
do_action(
'wooms_logger',
__CLASS__,
'Выбор категории продукта',
printf('Выбор категории продукта %s (id %s)', $product->get_name(), $product->get_id()),
[
'$url' => $url,
'$term_id' => $term_id,
Expand Down
1 change: 1 addition & 0 deletions inc/ProductsPrices.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public static function product_chg_price($product, $data_api)
$price = apply_filters('wooms_product_price', $price, $data_api, $product_id, $price_meta);

$price = floatval($price) / 100;
$price = round($price, 2);
// $product->set_price($price);
$product->set_regular_price($price);

Expand Down
1 change: 1 addition & 0 deletions inc/ProductsWalker.php
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ public static function stop_manually()
{
as_unschedule_all_actions(self::$walker_hook_name);
self::set_state('stop_manual', 1);
self::set_state('timestamp', 0);
self::walker_finish();

/**
Expand Down

0 comments on commit 4d1dd9e

Please sign in to comment.