class fixes
This commit is contained in:
parent
c18f533b39
commit
792ff81428
|
@ -18,7 +18,7 @@ class woocommerce_checkout {
|
|||
var $creating_account;
|
||||
|
||||
/** constructor */
|
||||
protected function __construct () {
|
||||
function __construct () {
|
||||
|
||||
add_action('woocommerce_checkout_billing',array(&$this,'checkout_form_billing'));
|
||||
add_action('woocommerce_checkout_shipping',array(&$this,'checkout_form_shipping'));
|
||||
|
@ -137,6 +137,7 @@ class woocommerce_checkout {
|
|||
* @param array args contains a list of args for showing the field, merged with defaults (below)
|
||||
*/
|
||||
function checkout_form_field( $args ) {
|
||||
global $woocommerce;
|
||||
|
||||
$defaults = array(
|
||||
'type' => 'input',
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
*/
|
||||
class flat_rate extends woocommerce_shipping_method {
|
||||
|
||||
public function __construct() {
|
||||
function __construct() {
|
||||
$this->id = 'flat_rate';
|
||||
$this->method_title = __('Flat rate', 'woothemes');
|
||||
$this->enabled = get_option('woocommerce_flat_rate_enabled');
|
||||
|
@ -29,7 +29,7 @@ class flat_rate extends woocommerce_shipping_method {
|
|||
add_option('woocommerce_flat_rate_tax_status', 'taxable');
|
||||
}
|
||||
|
||||
public function calculate_shipping() {
|
||||
function calculate_shipping() {
|
||||
global $woocommerce;
|
||||
|
||||
$_tax = &new woocommerce_tax();
|
||||
|
@ -84,7 +84,7 @@ class flat_rate extends woocommerce_shipping_method {
|
|||
endif;
|
||||
}
|
||||
|
||||
public function admin_options() {
|
||||
function admin_options() {
|
||||
global $woocommerce;
|
||||
?>
|
||||
<h3><?php _e('Flat Rates', 'woothemes'); ?></h3>
|
||||
|
@ -178,7 +178,7 @@ class flat_rate extends woocommerce_shipping_method {
|
|||
<?php
|
||||
}
|
||||
|
||||
public function process_admin_options() {
|
||||
function process_admin_options() {
|
||||
|
||||
if(isset($_POST['woocommerce_flat_rate_tax_status'])) update_option('woocommerce_flat_rate_tax_status', woocommerce_clean($_POST['woocommerce_flat_rate_tax_status'])); else delete_option('woocommerce_flat_rate_tax_status');
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
*/
|
||||
class free_shipping extends woocommerce_shipping_method {
|
||||
|
||||
public function __construct() {
|
||||
function __construct() {
|
||||
$this->id = 'free_shipping';
|
||||
$this->method_title = __('Free shipping', 'woothemes');
|
||||
$this->enabled = get_option('woocommerce_free_shipping_enabled');
|
||||
|
@ -25,13 +25,13 @@ class free_shipping extends woocommerce_shipping_method {
|
|||
add_option('woocommerce_free_shipping_title', 'Free Shipping');
|
||||
}
|
||||
|
||||
public function calculate_shipping() {
|
||||
function calculate_shipping() {
|
||||
$this->shipping_total = 0;
|
||||
$this->shipping_tax = 0;
|
||||
$this->shipping_label = $this->title;
|
||||
}
|
||||
|
||||
public function admin_options() {
|
||||
function admin_options() {
|
||||
global $woocommerce;
|
||||
?>
|
||||
<h3><?php _e('Free Shipping', 'woothemes'); ?></h3>
|
||||
|
@ -98,7 +98,7 @@ class free_shipping extends woocommerce_shipping_method {
|
|||
<?php
|
||||
}
|
||||
|
||||
public function process_admin_options() {
|
||||
function process_admin_options() {
|
||||
|
||||
if(isset($_POST['woocommerce_free_shipping_enabled'])) update_option('woocommerce_free_shipping_enabled', 'yes'); else update_option('woocommerce_free_shipping_enabled', 'no');
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ class woocommerce_shipping_method {
|
|||
var $multiple_rates = false;
|
||||
var $rates = array(); // When a method has more than one cost/choice it will be in this array of titles/costs
|
||||
|
||||
public function is_available() {
|
||||
function is_available() {
|
||||
global $woocommerce;
|
||||
|
||||
if ($this->enabled=="no") return false;
|
||||
|
@ -51,7 +51,7 @@ class woocommerce_shipping_method {
|
|||
|
||||
}
|
||||
|
||||
public function get_fee( $fee, $total ) {
|
||||
function get_fee( $fee, $total ) {
|
||||
if (strstr($fee, '%')) :
|
||||
return ($total/100) * str_replace('%', '', $fee);
|
||||
else :
|
||||
|
@ -59,8 +59,8 @@ class woocommerce_shipping_method {
|
|||
endif;
|
||||
}
|
||||
|
||||
public function admin_options() {}
|
||||
function admin_options() {}
|
||||
|
||||
public function process_admin_options() {}
|
||||
function process_admin_options() {}
|
||||
|
||||
}
|
|
@ -285,7 +285,7 @@ class woocommerce {
|
|||
/**
|
||||
* Shortcode cache
|
||||
*/
|
||||
static public function shortcode_wrapper($function, $atts=array()) {
|
||||
function shortcode_wrapper($function, $atts=array()) {
|
||||
if( $content = $this->cache_get( $function . '-shortcode', $atts ) ) return $content;
|
||||
|
||||
ob_start();
|
||||
|
|
Loading…
Reference in New Issue