Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #50 #51

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* Donate link: https://github.com/evgrezanov
* Tags: bonus, woocommerce, sync, integration
* Requires at least: 4.0
* Tested up to: 6.1.1
* Stable tag: 2.6
* Requires PHP: 7.1
* Tested up to: 6.4.2
* Stable tag: 2.7
* Requires PHP: 8.1
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -75,8 +75,8 @@ Manual installation method requires downloading the wp-bonus-plus plugin and upl

## Какие минимальные требования?

WordPress 5.0
PHP 7.1 (Рекомендуем 8.0 и выше)
WordPress 6.0
PHP Рекомендуем 8.0 и выше

## Будет работать без WooCommerce?

Expand All @@ -92,6 +92,9 @@ PHP 7.1 (Рекомендуем 8.0 и выше)

# Changelog

## 2.7
- устранение бага с экспортом товаров и категорий https://github.com/evgrezanov/bonus-plus-wp/issues/50

## 2.6
- настройки виджета перенесены на отдельную вкладку в админке https://github.com/evgrezanov/bonus-plus-wp/issues/32
- исправлены предупреджения https://github.com/evgrezanov/bonus-plus-wp/issues/31
Expand Down
10 changes: 5 additions & 5 deletions bonus-plus-wp.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
* Domain Path: /languages
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
* PHP requires at least: 7.0
* WP requires at least: 5.0
* Tested up to: 6.1.1
* Version: 2.6
* PHP requires at least: 8.1
* WP requires at least: 6.0
* Tested up to: 6.4.2
* Version: 2.7
*/
namespace BPWP;

Expand All @@ -27,7 +27,7 @@ class BPWPBonusPlus_Core
*/
public static function init()
{
define('BPWP_PLUGIN_VERSION', '2.6');
define('BPWP_PLUGIN_VERSION', '2.7');

require_once __DIR__ . '/functions.php';

Expand Down
14 changes: 8 additions & 6 deletions inc/WooProductCatExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ public static function bpwp_api_products_data_prepare()
}
}

// TODO добавить обработку остальных типов товаров
}
}
wp_reset_postdata();
Expand Down Expand Up @@ -283,17 +284,18 @@ public static function bpwp_api_products_cats_export($product = [])
$product_cat = apply_filters('bpwp_filter_export_product_cat', self::bpwp_api_product_cat_data_prepare());
$products = apply_filters('bpwp_filter_export_products', self::bpwp_api_products_data_prepare());
$product = array_merge($product_cat, $products);
/*
usort($product, function ($a, $b) {
return $a['id'] - $b['id'];
});
*/
}

$store = !empty(get_option('bpwp_shop_name')) ? esc_html(get_option('bpwp_shop_name')) : '';

if (empty($store) || empty($product)) {
self::$lastExport['message'] = __('Экспорт невозможен, параметры переданы неверно', 'bonus-plus-wp');
do_action(
'bpwp_logger_error',
$type = __CLASS__,
$title = __('Экспорт товаров в Бонус+, невозможен', 'bonus-plus-wp'),
$desc = __('Параметры название магазина или список продуктовпереданы неверно', 'bonus-plus-wp'),
);
}

/**
Expand Down Expand Up @@ -339,7 +341,7 @@ public static function bpwp_export_ui_btns()
{
printf('<h2>%s</h2>', __('Экспорт товаров и категорий', 'bonus-plus-wp'));

printf('<a href="%s" class="button button-primary">Экспортировать</a>', add_query_arg('a', 'products_cats_export', admin_url('admin.php?page=bpwp-settings')));
printf('<a href="%s" class="button button-primary">Экспортировать</a>', add_query_arg('a', 'products_cats_export', admin_url('admin.php?page=bpwp-connection')));
}

/**
Expand Down
13 changes: 8 additions & 5 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Contributors: redmonkey73
Donate link: https://github.com/evgrezanov
Tags: bonus, woocommerce, sync, integration
Requires at least: 4.0
Tested up to: 6.1.1
Stable tag: 2.6
Requires PHP: 7.1
Tested up to: 6.4.2
Stable tag: 2.7
Requires PHP: 8.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -75,8 +75,8 @@ Manual installation method requires downloading the wp-bonus-plus plugin and upl

= Какие минимальные требования? =

WordPress 5.0
PHP 7.1 (Рекомендуем 8.0 и выше)
WordPress 6.0
PHP Рекомендуем 8.0 и выше

= Будет работать без WooCommerce? =

Expand All @@ -92,6 +92,9 @@ PHP 7.1 (Рекомендуем 8.0 и выше)

== Changelog ==

= 2.7 =
- устранение бага с экспортом товаров и категорий https://github.com/evgrezanov/bonus-plus-wp/issues/50

= 2.6 =
- настройки виджета перенесены на отдельную вкладку в админке https://github.com/evgrezanov/bonus-plus-wp/issues/32
- исправлены предупреджения https://github.com/evgrezanov/bonus-plus-wp/issues/31
Expand Down