Skip to content

Commit

Permalink
Merge pull request #15 from wc1c/dev
Browse files Browse the repository at this point in the history
Dev 0.10.1
  • Loading branch information
frescoref authored Mar 5, 2023
2 parents 5f90fa1 + 19671a3 commit 9e8c7d7
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Core extends SchemaAbstract
public function __construct()
{
$this->setId('productscml');
$this->setVersion('0.10.0');
$this->setVersion('0.10.1');

$this->setName(__('Products data exchange via CommerceML', 'wc1c-main'));
$this->setDescription(__('Creation and updating of products (goods) in WooCommerce according to data from 1C using the CommerceML protocol of various versions.', 'wc1c-main'));
Expand Down Expand Up @@ -1732,7 +1732,7 @@ public function assignProductsItemCategories(ProductContract $internal_product,
('update' === $mode && $this->getOptions('products_update_categories_fill_parent', 'yes') === 'yes')
)
{
$this->fillParentCategories($product_categories);
$this->fillParentCategories($cats);
}

$internal_product->set_category_ids($cats);
Expand All @@ -1745,15 +1745,10 @@ public function assignProductsItemCategories(ProductContract $internal_product,
*
* @param $product_categories
*
* @return array
* @return array|mixed
*/
private function fillParentCategories(&$product_categories): array
private function fillParentCategories(&$product_categories)
{
if(empty($product_categories))
{
return $product_categories;
}

foreach($product_categories as $category_id)
{
$parents = $this->findParentCategories($category_id);
Expand Down

0 comments on commit 9e8c7d7

Please sign in to comment.