Skip to content

Commit

Permalink
release 2.0.10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
kkasowski committed Mar 22, 2017
1 parent 5e41586 commit b6b0487
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 18 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Changelog

* 2.0.10.2 - 2017.03.22:
* Fix: Sanitized product title on product save in Wordpress panel.
* Fix: Post excerpt was saved as product description.
* Fix: Fatal error on Order page when DOMDocument is missing.
* Fix: Discounts not being removed.
* Disabled: Discount Summary report due to serious issue.
* 2.0.10.1 - 2017.03.21:
* Fix: Fatal error on product save.
* 2.0.10 - 2017.03.21:
Expand Down
2 changes: 1 addition & 1 deletion jigoshop.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* Description: Jigoshop, a WordPress eCommerce plugin that works.
* Author: Jigoshop
* Author URI: http://www.jigoshop.com
* Version: 2.0.10.1
* Version: 2.0.10.2
* Requires at least: 4.0
* Tested up to: 4.7.3
* Text Domain: jigoshop
Expand Down
6 changes: 6 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ However, if you want priority, dedicated support from Jigoshop staff, we dp offe

== Changelog ==

= 2.0.10.2 - 2017.03.22 =
* Fix: Sanitized product title on product save in Wordpress panel.
* Fix: Post excerpt was saved as product description.
* Fix: Fatal error on Order page when DOMDocument is missing.
* Fix: Discounts not being removed.
* Disabled: Discount Summary report due to serious issue.
= 2.0.10.1 - 2017.03.21 =
* Fix: Fatal error on product save.
= 2.0.10 - 2017.03.21 =
Expand Down
14 changes: 2 additions & 12 deletions src/Jigoshop/Admin/Page/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -648,18 +648,8 @@ public function actionsBox()

private function renderModifiedPublishBoxContent($post)
{
ob_start();
post_submit_meta_box($post);
$html = ob_get_clean();
$doc = new \DOMDocument();
$doc->loadHTML($html);
$element = $doc->getElementById('minor-publishing');
$element->removeChild($doc->getElementById('minor-publishing-actions'));
$doc->getElementById('minor-publishing')->parentNode->removeChild($doc->getElementById('major-publishing-actions'));
$element = $doc->getElementById('misc-publishing-actions');
$element->removeChild($doc->getElementById('visibility'));
$element->removeChild($element->getElementsByTagName('div')->item(0));

echo $doc->saveHTML();
//TODO: move it to CSS file.
echo '<style>#major-publishing-actions, #minor-publishing-actions, #misc-publishing-actions div:first-of-type, #misc-publishing-actions #visibility {display:none;}</style>';
}
}
11 changes: 10 additions & 1 deletion src/Jigoshop/Admin/Reports/SalesTab.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Jigoshop\Admin\Reports;
use Jigoshop\Core\Options;
use Jigoshop\Helper\Render;
use Jigoshop\Integration;
use WPAL\Wordpress;

class SalesTab implements TabInterface
Expand All @@ -25,6 +26,14 @@ public function __construct(Wordpress $wp, Options $options)
if (in_array($this->wp->getPageNow(), array('admin.php', 'options.php')) &&
isset($_GET['page']) && $_GET['page'] == Reports::NAME
) {
add_action( 'admin_notices', function(){
?>
<div class="notice notice-warning is-dismissible">
<p><?php _e('We have decided to disable the Discount Summary Report Tab until the next update due to an issue with coupon retrieval. We\'re terribly sorry for the inconvenience - our development team is doing their best to resolve this issue ASAP.', 'jigoshop'); ?></p>
</div>
<?php
});

$this->chart = $this->getChart();
}
}
Expand Down Expand Up @@ -63,7 +72,7 @@ private function getTypes()
'by_date' => __('By Date', 'jigoshop'),
'by_product' => __('By Product', 'jigoshop'),
'by_category' => __('By Category', 'jigoshop'),
'discount_summary' => __('Discount Summary', 'jigoshop')
//'discount_summary' => __('Discount Summary', 'jigoshop')
));
}

Expand Down
2 changes: 1 addition & 1 deletion src/Jigoshop/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class Core
{
const VERSION = '2.0.10.1';
const VERSION = '2.0.10.2';
const WIDGET_CACHE = 'jigoshop_widget_cache';
const TERMS = 'jigoshop_term';

Expand Down
15 changes: 15 additions & 0 deletions src/Jigoshop/Entity/Cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,28 @@ public function removeAllCouponsExcept($codes)
}
}

/**
* @return array
*/
public function getStateToSave()
{
$state = parent::getStateToSave();
$state['items'] = serialize($state['items']);
$state['coupon_data'] = serialize($this->couponData);
unset($state['update_messages'], $state['updated_at'], $state['completed_at'], $state['total'],
$state['subtotal']);

return $state;
}

/**
* @param array $state
*/
public function restoreState(array $state)
{
parent::restoreState($state);
if(isset($state['coupon_data'])) {
$this->couponData = maybe_unserialize($state['coupon_data']);
}
}
}
4 changes: 2 additions & 2 deletions src/Jigoshop/Factory/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ public function create($id)

if (!empty($_POST)) {
$helpers = $this->wp->getHelpers();
$product->setName($helpers->sanitizeTitle($_POST['post_title']));
$product->setDescription($helpers->parsePostBody($_POST['post_excerpt']));
$product->setName($_POST['post_title']);
$product->setDescription($helpers->parsePostBody($_POST['post_content']));
$_POST['product']['categories'] = $this->getTerms($id, Types::PRODUCT_CATEGORY, $this->wp->getTerms(Types::PRODUCT_CATEGORY, array(
'posts__in' => $_POST['tax_input']['product_category'],
)));
Expand Down

0 comments on commit b6b0487

Please sign in to comment.