Skip to content

Commit

Permalink
Merge pull request #27 from wuunder/development
Browse files Browse the repository at this point in the history
fixed constant usage
  • Loading branch information
timoj authored Sep 25, 2019
2 parents 6706d1f + ab6e8a1 commit 853c3c9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 21 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).

## Released

## [2.7.3](https://github.com/kabisa/wuunder-webshopplugin-woocommerce/tag/2.7.3) - 2019-09-25

### Fix

- Fixed WC version constant usage

## [2.7.2](https://github.com/kabisa/wuunder-webshopplugin-woocommerce/tag/2.7.2) - 2019-09-19

### Fix
Expand Down
2 changes: 1 addition & 1 deletion includes/wcwuunder-create.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function __construct() {
$this->version_obj = array(
'product' => 'Woocommerce extension',
'version' => array(
'build' => '2.7.2',
'build' => '2.7.3',
'plugin' => '2.0' ),
'platform' => array(
'name' => 'Woocommerce',
Expand Down
2 changes: 1 addition & 1 deletion includes/wcwuunder-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public function __construct() {
// Add setting tab "Reatiler" on woocommerce settings page
add_filter( 'woocommerce_settings_tabs_array', array( &$this, 'wcwp_add_settings_tab' ), 50 );
add_action( 'woocommerce_settings_tabs_wuunder', array( &$this, 'wcwp_settings_tab' ) );
if ( version_compare( WC_VERSION, '3.7', '<' )) {
if ( version_compare( WOOCOMMERCE_VERSION, '3.7', '<' )) {
add_action('woocommerce_update_options_wuunder', array(&$this, 'wcwp_update_settings'));
}
}
Expand Down
22 changes: 3 additions & 19 deletions woocommerce-wuunder.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: WooCommerce Wuunder
* Plugin URI: https://wearewuunder.com/wuunder-voor-webshops/
* Description: Wuunder shipping plugin
* Version: 2.7.2
* Version: 2.7.3
* Author: Wuunder
* Author URI: http://wearewuunder.com
*/
Expand Down Expand Up @@ -57,24 +57,21 @@ class Woocommerce_Wuunder {
public static $plugin_path;
public static $plugin_basename;

const VERSION = '2.7.2';
const VERSION = '2.7.3';

public function __construct() {

self::$plugin_basename = plugin_basename( __FILE__ );
self::$plugin_url = plugin_dir_url( self::$plugin_basename );
self::$plugin_path = trailingslashit( dirname( __FILE__ ) );

add_action( 'admin_enqueue_scripts', array( &$this, 'wcwp_add_admin_styles_scripts' ) );

require_once( WCWP_PLUGIN_ADMIN_DIR . '/wcwuunder-admin.php' );
include_once( 'includes/parcelshop.php' );
include_once( 'includes/wcwuunder-settings.php' );
include_once( 'includes/wcwuunder-shipping-method.php' );
include_once( 'includes/checkout.php' );
include_once( 'includes/wcwuunder-DPD-standard-shipping.php' );


add_action('wp_ajax_wuunder_parcelshoplocator_get_parcelshop_address', 'wcwp_getParcelshopAddress');
add_action('wp_ajax_nopriv_wuunder_parcelshoplocator_get_parcelshop_address', 'wcwp_getParcelshopAddress');
add_action('wp_ajax_wuunder_parcelshoplocator_get_address', 'wcwp_getAddress');
Expand All @@ -86,30 +83,17 @@ public function __construct() {
exit;
}
} );
if ( version_compare( WC_VERSION, '3.7', '>=' )) {
if ( version_compare( WOOCOMMERCE_VERSION, '3.7', '>=' )) {
add_action( 'wp_loaded', array(WC_Wuunder_Settings::class, 'wcwp_save_action_for_update_settings' ) );
}
add_action('plugins_loaded', array( &$this, 'wcwp_load_textdomain' ) );
}

public function wcwp_load_textdomain() {
$plugin_rel_path = basename( dirname( __FILE__ ) ) . '/languages/'; /* Relative to WP_PLUGIN_DIR */

$domain = 'woocommerce-wuunder';
load_plugin_textdomain( $domain, FALSE, basename( dirname( __FILE__ ) ) . '/languages/' );
}

public function wcwp_add_admin_styles_scripts() {
global $post_type;
if ( 'shop_order' == $post_type ) {
// wp_enqueue_script( 'thickbox' );
// wp_enqueue_style( 'thickbox' );
//
// wp_register_style( 'bootstrap-admin-styles', plugins_url( '/assets/css/bootstrap-simplex.min.css', __FILE__ ), array(), '', 'all' );
// wp_enqueue_style( 'bootstrap-admin-styles' );
}
}

public function wcwp_webhook() {
wcwp_log( 'info', 'Test webhook' );
wcwp_log( 'info', $_REQUEST['order'] );
Expand Down

0 comments on commit 853c3c9

Please sign in to comment.