Skip to content
Snippets Groups Projects
Commit 98cad1ec authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Layout fixes

Move Settings link first in plugin config page
use different name for init function of advanced plugin (prevents name clashes with basic version)
Hide upgrade nag box in method/rulesets page
update plugin slug
parent 01472f6d
No related branches found
No related tags found
No related merge requests found
...@@ -156,10 +156,9 @@ class Shipping_Rules_post_type { ...@@ -156,10 +156,9 @@ class Shipping_Rules_post_type {
public function shipping_rules_post_type_meta_box($post) { public function shipping_rules_post_type_meta_box($post) {
// my_add_notice( "shipping_rules_post_type_meta_box called", 'info'); // my_add_notice( "shipping_rules_post_type_meta_box called", 'info');
if (!$this->helper->isAdvanced()) { if (!$this->helper->isAdvanced()) {
add_meta_box( 'shipping_rules_upgrade', $this->helper->__( 'Upgrade to the ADVANCED VERSION of the OpenTools Shipping by Rules plugin // add_meta_box( 'shipping_rules_upgrade', $this->helper->__( 'Upgrade to the ADVANCED VERSION of the OpenTools Shipping by Rules plugin' ), array( $this, 'render_shipping_upgrade' ), 'shipping_rules', 'normal' );
' ), array( $this, 'render_shipping_upgrade' ), 'shipping_rules', 'normal' );
} }
add_meta_box( 'shipping_rules_settings', $this->helper->__( 'Shipping settings' ), array( $this, 'render_shipping_rules_settings' ), 'shipping_rules', 'normal' ); // add_meta_box( 'shipping_rules_settings', $this->helper->__( 'Shipping settings' ), array( $this, 'render_shipping_rules_settings' ), 'shipping_rules', 'normal' );
add_meta_box( add_meta_box(
/* ID */ 'shipping_rules_rulesets', /* ID */ 'shipping_rules_rulesets',
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Version: 1.0.0 * Version: 1.0.0
* Author: Open Tools, Reinhold Kainhofer * Author: Open Tools, Reinhold Kainhofer
* Author URI: http://open-tools.net * Author URI: http://open-tools.net
* Text Domain: woocommerce-shipping-by-rules * Text Domain: woocommerce-advanced-shipping-by-rules
* Domain Path: * Domain Path:
* License: GPL2+ * License: GPL2+
* WC requires at least: 2.2 * WC requires at least: 2.2
...@@ -299,12 +299,12 @@ class WooCommerce_Shipping_By_Rules_Advanced { ...@@ -299,12 +299,12 @@ class WooCommerce_Shipping_By_Rules_Advanced {
* *
* @return object WooCommerce_Shipping_By_Rules_Advanced class object. * @return object WooCommerce_Shipping_By_Rules_Advanced class object.
*/ */
if ( ! function_exists( 'OpenTools_ShippingByRules' ) ) : if ( ! function_exists( 'OpenTools_ShippingByRules_Advanced' ) ) :
function OpenTools_ShippingByRules() { function OpenTools_ShippingByRules_Advanced() {
return WooCommerce_Shipping_By_Rules_Advanced::instance(); return WooCommerce_Shipping_By_Rules_Advanced::instance();
} }
endif; endif;
OpenTools_ShippingByRules(); OpenTools_ShippingByRules_Advanced();
...@@ -142,7 +142,7 @@ class WooCommerce_Shipping_By_Rules { ...@@ -142,7 +142,7 @@ class WooCommerce_Shipping_By_Rules {
*/ */
public function shippingbyrules_add_settings_link( $links ) { public function shippingbyrules_add_settings_link( $links ) {
$link = '<a href="admin.php?page=wc-settings&tab=shipping&section=shipping_by_rules">'. $this->helper->__( 'Settings' ) . '</a>'; $link = '<a href="admin.php?page=wc-settings&tab=shipping&section=shipping_by_rules">'. $this->helper->__( 'Settings' ) . '</a>';
array_push( $links, $link ); array_unshift( $links, $link );
return $links; return $links;
} }
...@@ -244,7 +244,7 @@ class WooCommerce_Shipping_By_Rules { ...@@ -244,7 +244,7 @@ class WooCommerce_Shipping_By_Rules {
/** /**
* Check if the advanced version is installed an activated * Check if the advanced version is installed an activated
*/ */
function ordernumbers_check_deactivate() { function check_advanced_deactivate() {
if (defined ('OPENTOOLS_ADVANCED_SHIPPINGRULES')) { if (defined ('OPENTOOLS_ADVANCED_SHIPPINGRULES')) {
$hook = is_multisite() ? 'network_' : ''; $hook = is_multisite() ? 'network_' : '';
add_action( "{$hook}admin_notices", array($this, 'print_basic_admin_notice')); add_action( "{$hook}admin_notices", array($this, 'print_basic_admin_notice'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment