Removed unused vars
This commit is contained in:
parent
ffd512a55e
commit
b2e979640c
|
@ -339,8 +339,8 @@ class WC_Tracker {
|
|||
$override_data = array();
|
||||
$template_paths = apply_filters( 'woocommerce_template_overrides_scan_paths', array( 'WooCommerce' => WC()->plugin_path() . '/templates/' ) );
|
||||
$scanned_files = array();
|
||||
$found_files = array();
|
||||
$status = require_once( WC()->plugin_path() . '/includes/admin/class-wc-admin-status.php' );
|
||||
|
||||
require_once( WC()->plugin_path() . '/includes/admin/class-wc-admin-status.php' );
|
||||
|
||||
foreach ( $template_paths as $plugin_name => $template_path ) {
|
||||
$scanned_files[ $plugin_name ] = WC_Admin_Status::scan_template_files( $template_path );
|
||||
|
|
|
@ -71,11 +71,10 @@ class WC_Validation {
|
|||
* is_GB_postcode function.
|
||||
*
|
||||
* @author John Gardner
|
||||
* @access public
|
||||
* @param mixed $toCheck A postcode
|
||||
* @param string $to_check A postcode
|
||||
* @return bool
|
||||
*/
|
||||
public static function is_GB_postcode( $toCheck ) {
|
||||
public static function is_GB_postcode( $to_check ) {
|
||||
|
||||
// Permitted letters depend upon their position in the postcode.
|
||||
// http://en.wikipedia.org/wiki/Postcodes_in_the_United_Kingdom#Validation
|
||||
|
@ -106,23 +105,15 @@ class WC_Validation {
|
|||
$pcexp[5] = '/^(bfpo)(c\/o[0-9]{1,3})$/';
|
||||
|
||||
// Load up the string to check, converting into lowercase and removing spaces
|
||||
$postcode = strtolower( $toCheck );
|
||||
$postcode = str_replace (' ', '', $postcode);
|
||||
$postcode = strtolower( $to_check );
|
||||
$postcode = str_replace( ' ', '', $postcode );
|
||||
|
||||
// Assume we are not going to find a valid postcode
|
||||
$valid = false;
|
||||
|
||||
// Check the string against the six types of postcodes
|
||||
foreach ( $pcexp as $regexp ) {
|
||||
|
||||
if ( preg_match( $regexp, $postcode, $matches ) ) {
|
||||
|
||||
// Load new postcode back into the form element
|
||||
$toCheck = strtoupper ($matches[1] . ' ' . $matches [2]);
|
||||
|
||||
// Take account of the special BFPO c/o format
|
||||
$toCheck = str_replace( 'C/O', 'c/o ', $toCheck );
|
||||
|
||||
// Remember that we have found that the code is valid and break from loop
|
||||
$valid = true;
|
||||
break;
|
||||
|
|
|
@ -49,11 +49,11 @@ class WC_Gateway_Paypal extends WC_Payment_Gateway {
|
|||
$this->enabled = 'no';
|
||||
} else {
|
||||
include_once( 'includes/class-wc-gateway-paypal-ipn-handler.php' );
|
||||
$ipn_handler = new WC_Gateway_Paypal_IPN_Handler( $this->testmode, $this->receiver_email );
|
||||
new WC_Gateway_Paypal_IPN_Handler( $this->testmode, $this->receiver_email );
|
||||
|
||||
if ( $this->identity_token ) {
|
||||
include_once( 'includes/class-wc-gateway-paypal-pdt-handler.php' );
|
||||
$pdt_handler = new WC_Gateway_Paypal_PDT_Handler( $this->testmode, $this->identity_token );
|
||||
new WC_Gateway_Paypal_PDT_Handler( $this->testmode, $this->identity_token );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -355,7 +355,6 @@ function wc_price( $price, $args = array() ) {
|
|||
'price_format' => get_woocommerce_price_format()
|
||||
) ) ) );
|
||||
|
||||
$currency_symbol = get_woocommerce_currency_symbol( $currency );
|
||||
$negative = $price < 0;
|
||||
$price = apply_filters( 'raw_woocommerce_price', floatval( $negative ? $price * -1 : $price ) );
|
||||
$price = apply_filters( 'formatted_woocommerce_price', number_format( $price, $decimals, $decimal_separator, $thousand_separator ), $price, $decimals, $decimal_separator, $thousand_separator );
|
||||
|
|
Loading…
Reference in New Issue