Skip to content

Commit

Permalink
Merge pull request #48 from wuunder/Support-multi-site-wordpress-fix-…
Browse files Browse the repository at this point in the history
…parcelshop-error

Support multi site wordpress fix parcelshop error
  • Loading branch information
TimD90 authored Jul 2, 2020
2 parents 932f2a7 + ad7d6b3 commit e9bd343
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 7 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).

## Released

## [2.7.19](https://github.com/wuunder/wuunder-webshopplugin-woocommerce/tag/2.7.19) - 2020-07-02

### Added
- Support multi-site wordpress

### Fixed

- Parcelshop shipping method error when disabled


## [2.7.18](https://github.com/wuunder/wuunder-webshopplugin-woocommerce/tag/2.7.18) - 2020-06-02

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ We make shipping any parcel, pallet and document easy, personal and efficient. A
More info regarding the installation: https://wearewuunder.com/woocommerce-info-documents/

## Before you start ##
* You need to create a free Wuunder account: https://app.wearewuunder.com and request an API-key to use the module: https://wearewuunder.com/en/contact/
* You need to create a free Wuunder account: https://my.wearewuunder.com/account/login and request an API-key to use the module: https://wearewuunder.com/en/contact/
* You can download and install the latest release before you sign-up: https://github.com/wuunder/wuunder-webshopplugin-woocommerce/releases/latest
* With this module you connect your WooCommerce store to your Wuunder account.

## Install ##
* Download the .zip from this repository and unpack.
* Download the latest __composer-installed__ [release](https://github.com/wuunder/wuunder-webshopplugin-woocommerce/releases/latest) from this repository and unpack.
* Use FTP to transfer the folder with the plugin to the `/wp-content/plugins/` folder.
* When the transfer is finished go to your admin area __Plugins__ page.
* Locate the __WooCommerce Wuunder__ plugin and activate it.
Expand Down
2 changes: 1 addition & 1 deletion assets/js/parcelshop.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function initParcelshopLocator(url, apiUrl, carrierList, chooseParcelshopTxt, ch
}

function _onShippingMethodChange() {
if (document.getElementById('shipping_method_0_wuunder_parcelshop').checked) {
if (document.getElementById('shipping_method_0_wuunder_parcelshop') && document.getElementById('shipping_method_0_wuunder_parcelshop').checked) {
if (window.parent.document.getElementsByClassName('chooseParcelshop').length < 1) {
var container = document.createElement('tr');
container.className += "chooseParcelshop";
Expand Down
4 changes: 2 additions & 2 deletions includes/wcwuunder-shipping-method.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
die;
}

if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) {

if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins'))) || (is_multisite() && is_plugin_active_for_network('woocommerce/woocommerce.php'))) {
function wc_wuunder_parcelshop_method()
{
if (!class_exists('WC_wuunder_parcelshop')) {
Expand Down
3 changes: 3 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ You can best contact us via [email protected]
7. Eenvoudig labels printen

== Changelog ==
= 2.7.19 =
* Fix rparcelshop error
* Added support for multi-site Wordpress
= 2.7.18 =
* Fix remembering parcelshop id
= 2.7.17 =
Expand Down
4 changes: 2 additions & 2 deletions woocommerce-wuunder.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Wuunder for-woocommerce
* Plugin URI: https://wearewuunder.com/wuunder-voor-webshops/
* Description: Wuunder shipping plugin
* Version: 2.7.18
* Version: 2.7.19
* Author: Wuunder
* Author URI: http://wearewuunder.com
*/
Expand Down Expand Up @@ -57,7 +57,7 @@ class Woocommerce_Wuunder {
public static $plugin_path;
public static $plugin_basename;

const VERSION = '2.7.18';
const VERSION = '2.7.19';

public function __construct() {

Expand Down

0 comments on commit e9bd343

Please sign in to comment.