Merge branch 'includes'
This commit is contained in:
commit
36092cba54
|
@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Admin_Assets' ) ) :
|
if ( ! class_exists( 'WC_Admin_Assets', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WC_Admin_Assets Class.
|
* WC_Admin_Assets Class.
|
||||||
|
|
|
@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly
|
exit; // Exit if accessed directly
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Admin_Dashboard' ) ) :
|
if ( ! class_exists( 'WC_Admin_Dashboard', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WC_Admin_Dashboard Class.
|
* WC_Admin_Dashboard Class.
|
||||||
|
|
|
@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
* @version 2.7.0
|
* @version 2.7.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Admin_Duplicate_Product' ) ) :
|
if ( ! class_exists( 'WC_Admin_Duplicate_Product', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WC_Admin_Duplicate_Product Class.
|
* WC_Admin_Duplicate_Product Class.
|
||||||
|
|
|
@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly
|
exit; // Exit if accessed directly
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Admin_Help' ) ) :
|
if ( ! class_exists( 'WC_Admin_Help', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WC_Admin_Help Class.
|
* WC_Admin_Help Class.
|
||||||
|
|
|
@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Admin_Importers' ) ) :
|
if ( ! class_exists( 'WC_Admin_Importers', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WC_Admin_Importers Class.
|
* WC_Admin_Importers Class.
|
||||||
|
|
|
@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Admin_Menus' ) ) :
|
if ( ! class_exists( 'WC_Admin_Menus', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WC_Admin_Menus Class.
|
* WC_Admin_Menus Class.
|
||||||
|
|
|
@ -13,7 +13,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Admin_Permalink_Settings' ) ) :
|
if ( ! class_exists( 'WC_Admin_Permalink_Settings', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WC_Admin_Permalink_Settings Class.
|
* WC_Admin_Permalink_Settings Class.
|
||||||
|
|
|
@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Admin_Post_Types' ) ) :
|
if ( ! class_exists( 'WC_Admin_Post_Types', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WC_Admin_Post_Types Class.
|
* WC_Admin_Post_Types Class.
|
||||||
|
|
|
@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly
|
exit; // Exit if accessed directly
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Admin_Profile' ) ) :
|
if ( ! class_exists( 'WC_Admin_Profile', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WC_Admin_Profile Class.
|
* WC_Admin_Profile Class.
|
||||||
|
|
|
@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly
|
exit; // Exit if accessed directly
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Admin_Reports' ) ) :
|
if ( ! class_exists( 'WC_Admin_Reports', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WC_Admin_Reports Class.
|
* WC_Admin_Reports Class.
|
||||||
|
|
|
@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Admin_Settings' ) ) :
|
if ( ! class_exists( 'WC_Admin_Settings', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WC_Admin_Settings Class.
|
* WC_Admin_Settings Class.
|
||||||
|
|
|
@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly
|
exit; // Exit if accessed directly
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Settings_Accounts' ) ) :
|
if ( ! class_exists( 'WC_Settings_Accounts', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WC_Settings_Accounts.
|
* WC_Settings_Accounts.
|
||||||
|
|
|
@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly
|
exit; // Exit if accessed directly
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Settings_Rest_API' ) ) :
|
if ( ! class_exists( 'WC_Settings_Rest_API', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WC_Settings_Rest_API.
|
* WC_Settings_Rest_API.
|
||||||
|
|
|
@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Settings_Payment_Gateways' ) ) :
|
if ( ! class_exists( 'WC_Settings_Payment_Gateways', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WC_Settings_Payment_Gateways.
|
* WC_Settings_Payment_Gateways.
|
||||||
|
|
|
@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly
|
exit; // Exit if accessed directly
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Settings_Emails' ) ) :
|
if ( ! class_exists( 'WC_Settings_Emails', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WC_Settings_Emails.
|
* WC_Settings_Emails.
|
||||||
|
|
|
@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly
|
exit; // Exit if accessed directly
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Settings_General' ) ) :
|
if ( ! class_exists( 'WC_Settings_General', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WC_Admin_Settings_General.
|
* WC_Admin_Settings_General.
|
||||||
|
|
|
@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly
|
exit; // Exit if accessed directly
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Settings_Integrations' ) ) :
|
if ( ! class_exists( 'WC_Settings_Integrations', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WC_Settings_Integrations.
|
* WC_Settings_Integrations.
|
||||||
|
|
|
@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly
|
exit; // Exit if accessed directly
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Settings_Page' ) ) :
|
if ( ! class_exists( 'WC_Settings_Page', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WC_Settings_Page.
|
* WC_Settings_Page.
|
||||||
|
|
|
@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly
|
exit; // Exit if accessed directly
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Settings_Products' ) ) :
|
if ( ! class_exists( 'WC_Settings_Products', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WC_Settings_Products.
|
* WC_Settings_Products.
|
||||||
|
|
|
@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Settings_Shipping' ) ) :
|
if ( ! class_exists( 'WC_Settings_Shipping', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WC_Settings_Shipping.
|
* WC_Settings_Shipping.
|
||||||
|
|
|
@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Settings_Tax' ) ) :
|
if ( ! class_exists( 'WC_Settings_Tax', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WC_Settings_Tax.
|
* WC_Settings_Tax.
|
||||||
|
|
|
@ -132,7 +132,7 @@ function wc_create_page( $slug, $option = '', $page_title = '', $page_content =
|
||||||
*/
|
*/
|
||||||
function woocommerce_admin_fields( $options ) {
|
function woocommerce_admin_fields( $options ) {
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Admin_Settings' ) ) {
|
if ( ! class_exists( 'WC_Admin_Settings', false ) ) {
|
||||||
include( dirname( __FILE__ ) . '/class-wc-admin-settings.php' );
|
include( dirname( __FILE__ ) . '/class-wc-admin-settings.php' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ function woocommerce_admin_fields( $options ) {
|
||||||
*/
|
*/
|
||||||
function woocommerce_update_options( $options, $data = null ) {
|
function woocommerce_update_options( $options, $data = null ) {
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Admin_Settings' ) ) {
|
if ( ! class_exists( 'WC_Admin_Settings', false ) ) {
|
||||||
include( dirname( __FILE__ ) . '/class-wc-admin-settings.php' );
|
include( dirname( __FILE__ ) . '/class-wc-admin-settings.php' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ function woocommerce_update_options( $options, $data = null ) {
|
||||||
*/
|
*/
|
||||||
function woocommerce_settings_get_option( $option_name, $default = '' ) {
|
function woocommerce_settings_get_option( $option_name, $default = '' ) {
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Admin_Settings' ) ) {
|
if ( ! class_exists( 'WC_Admin_Settings', false ) ) {
|
||||||
include( dirname( __FILE__ ) . '/class-wc-admin-settings.php' );
|
include( dirname( __FILE__ ) . '/class-wc-admin-settings.php' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,10 +14,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Legacy_API' ) ) {
|
|
||||||
include_once( dirname( __FILE__ ) . '/class-wc-legacy-api.php' );
|
|
||||||
}
|
|
||||||
|
|
||||||
class WC_API extends WC_Legacy_API {
|
class WC_API extends WC_Legacy_API {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -9,13 +9,10 @@
|
||||||
* @package WooCommerce/API
|
* @package WooCommerce/API
|
||||||
* @since 2.4.0
|
* @since 2.4.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'ABSPATH' ) ) {
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Auth' ) ) :
|
|
||||||
|
|
||||||
class WC_Auth {
|
class WC_Auth {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -402,7 +399,4 @@ class WC_Auth {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
new WC_Auth();
|
||||||
endif;
|
|
||||||
|
|
||||||
return new WC_Auth();
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ( ! defined( 'ABSPATH' ) ) {
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
@ -66,6 +65,11 @@ class WC_Autoloader {
|
||||||
*/
|
*/
|
||||||
public function autoload( $class ) {
|
public function autoload( $class ) {
|
||||||
$class = strtolower( $class );
|
$class = strtolower( $class );
|
||||||
|
|
||||||
|
if ( 0 !== strpos( $class, 'wc_' ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$file = $this->get_file_name_from_class( $class );
|
$file = $this->get_file_name_from_class( $class );
|
||||||
$path = '';
|
$path = '';
|
||||||
|
|
||||||
|
@ -87,7 +91,7 @@ class WC_Autoloader {
|
||||||
$path = $this->include_path . 'log-handlers/';
|
$path = $this->include_path . 'log-handlers/';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( empty( $path ) || ( ! $this->load_file( $path . $file ) && strpos( $class, 'wc_' ) === 0 ) ) {
|
if ( empty( $path ) || ! $this->load_file( $path . $file ) ) {
|
||||||
$this->load_file( $this->include_path . $file );
|
$this->load_file( $this->include_path . $file );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,13 +11,17 @@
|
||||||
* @category Class
|
* @category Class
|
||||||
* @author WooThemes
|
* @author WooThemes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'ABSPATH' ) ) {
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
include_once( dirname( __FILE__ ) . '/libraries/wp-async-request.php' );
|
if ( ! class_exists( 'WP_Async_Request', false ) ) {
|
||||||
include_once( dirname( __FILE__ ) . '/libraries/wp-background-process.php' );
|
include_once( dirname( __FILE__ ) . '/libraries/wp-async-request.php' );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! class_exists( 'WP_Background_Process', false ) ) {
|
||||||
|
include_once( dirname( __FILE__ ) . '/libraries/wp-background-process.php' );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WC_Background_Updater Class.
|
* WC_Background_Updater Class.
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enables WooCommerce, via the the command line.
|
* Enables WooCommerce, via the the command line.
|
||||||
*
|
*
|
||||||
|
@ -34,3 +38,5 @@ class WC_CLI {
|
||||||
WP_CLI::add_hook( 'after_wp_load', 'WC_CLI_Update_Command::register_commands' );
|
WP_CLI::add_hook( 'after_wp_load', 'WC_CLI_Update_Command::register_commands' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
new WC_CLI;
|
||||||
|
|
|
@ -226,8 +226,8 @@ class WC_Geolocation {
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
private static function geolocate_via_db( $ip_address ) {
|
private static function geolocate_via_db( $ip_address ) {
|
||||||
if ( ! class_exists( 'WC_Geo_IP' ) ) {
|
if ( ! class_exists( 'WC_Geo_IP', false ) ) {
|
||||||
include_once( dirname( __FILE__ ) . '/class-wc-geo-ip.php' );
|
include_once( WC_ABSPATH . 'includes/class-wc-geo-ip.php' );
|
||||||
}
|
}
|
||||||
|
|
||||||
$gi = new WC_Geo_IP();
|
$gi = new WC_Geo_IP();
|
||||||
|
|
|
@ -3,10 +3,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Session' ) ) {
|
|
||||||
include_once( dirname( __FILE__ ) . '/abstracts/abstract-wc-session.php' );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle data for the current customers session.
|
* Handle data for the current customers session.
|
||||||
* Implements the WC_Session abstract class.
|
* Implements the WC_Session abstract class.
|
||||||
|
|
|
@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Email_Cancelled_Order' ) ) :
|
if ( ! class_exists( 'WC_Email_Cancelled_Order', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cancelled Order Email.
|
* Cancelled Order Email.
|
||||||
|
|
|
@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly
|
exit; // Exit if accessed directly
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Email_Customer_Completed_Order' ) ) :
|
if ( ! class_exists( 'WC_Email_Customer_Completed_Order', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Customer Completed Order Email.
|
* Customer Completed Order Email.
|
||||||
|
|
|
@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly
|
exit; // Exit if accessed directly
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Email_Customer_Invoice' ) ) :
|
if ( ! class_exists( 'WC_Email_Customer_Invoice', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Customer Invoice.
|
* Customer Invoice.
|
||||||
|
|
|
@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly
|
exit; // Exit if accessed directly
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Email_Customer_New_Account' ) ) :
|
if ( ! class_exists( 'WC_Email_Customer_New_Account', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Customer New Account.
|
* Customer New Account.
|
||||||
|
|
|
@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly
|
exit; // Exit if accessed directly
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Email_Customer_Note' ) ) :
|
if ( ! class_exists( 'WC_Email_Customer_Note', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Customer Note Order Email.
|
* Customer Note Order Email.
|
||||||
|
|
|
@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly
|
exit; // Exit if accessed directly
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Email_Customer_On_Hold_Order' ) ) :
|
if ( ! class_exists( 'WC_Email_Customer_On_Hold_Order', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Customer On-hold Order Email.
|
* Customer On-hold Order Email.
|
||||||
|
|
|
@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly
|
exit; // Exit if accessed directly
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Email_Customer_Processing_Order' ) ) :
|
if ( ! class_exists( 'WC_Email_Customer_Processing_Order', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Customer Processing Order Email.
|
* Customer Processing Order Email.
|
||||||
|
|
|
@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly
|
exit; // Exit if accessed directly
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Email_Customer_Refunded_Order' ) ) :
|
if ( ! class_exists( 'WC_Email_Customer_Refunded_Order', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Customer Refunded Order Email.
|
* Customer Refunded Order Email.
|
||||||
|
|
|
@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly
|
exit; // Exit if accessed directly
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Email_Customer_Reset_Password' ) ) :
|
if ( ! class_exists( 'WC_Email_Customer_Reset_Password', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Customer Reset Password.
|
* Customer Reset Password.
|
||||||
|
|
|
@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Email_Failed_Order' ) ) :
|
if ( ! class_exists( 'WC_Email_Failed_Order', false ) ) :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Failed Order Email.
|
* Failed Order Email.
|
||||||
|
|
|
@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( class_exists( 'WC_Email' ) ) {
|
if ( class_exists( 'WC_Email', false ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Eval_Math' ) ) {
|
if ( ! class_exists( 'WC_Eval_Math', false ) ) {
|
||||||
/**
|
/**
|
||||||
* Class WC_Eval_Math. Supports basic math only (removed eval function).
|
* Class WC_Eval_Math. Supports basic math only (removed eval function).
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,18 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WP Async Request
|
|
||||||
*
|
|
||||||
* @package WP-Background-Processing
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ( ! class_exists( 'WP_Async_Request' ) ) {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Abstract WP_Async_Request class.
|
* Abstract WP_Async_Request class.
|
||||||
*
|
*
|
||||||
|
* @package WP-Background-Processing
|
||||||
* @abstract
|
* @abstract
|
||||||
*/
|
*/
|
||||||
abstract class WP_Async_Request {
|
abstract class WP_Async_Request {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prefix
|
* Prefix
|
||||||
|
@ -158,6 +155,4 @@ if ( ! class_exists( 'WP_Async_Request' ) ) {
|
||||||
* during the async request.
|
* during the async request.
|
||||||
*/
|
*/
|
||||||
abstract protected function handle();
|
abstract protected function handle();
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WP Background Process
|
|
||||||
*
|
|
||||||
* @package WP-Background-Processing
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ( ! class_exists( 'WP_Background_Process' ) ) {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Abstract WP_Background_Process class.
|
* Abstract WP_Background_Process class.
|
||||||
*
|
*
|
||||||
* @abstract
|
* @abstract
|
||||||
|
* @package WP-Background-Processing
|
||||||
* @extends WP_Async_Request
|
* @extends WP_Async_Request
|
||||||
*/
|
*/
|
||||||
abstract class WP_Background_Process extends WP_Async_Request {
|
abstract class WP_Background_Process extends WP_Async_Request {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Action
|
* Action
|
||||||
|
@ -500,5 +497,4 @@ if ( ! class_exists( 'WP_Background_Process' ) ) {
|
||||||
*/
|
*/
|
||||||
abstract protected function task( $item );
|
abstract protected function task( $item );
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly
|
exit; // Exit if accessed directly
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Product_Cat_Dropdown_Walker' ) ) :
|
if ( ! class_exists( 'WC_Product_Cat_Dropdown_Walker', false ) ) :
|
||||||
|
|
||||||
class WC_Product_Cat_Dropdown_Walker extends Walker {
|
class WC_Product_Cat_Dropdown_Walker extends Walker {
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit; // Exit if accessed directly
|
exit; // Exit if accessed directly
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Product_Cat_List_Walker' ) ) :
|
if ( ! class_exists( 'WC_Product_Cat_List_Walker', false ) ) :
|
||||||
|
|
||||||
class WC_Product_Cat_List_Walker extends Walker {
|
class WC_Product_Cat_List_Walker extends Walker {
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,8 @@ include( 'wc-account-functions.php' );
|
||||||
include( 'wc-term-functions.php' );
|
include( 'wc-term-functions.php' );
|
||||||
include( 'wc-attribute-functions.php' );
|
include( 'wc-attribute-functions.php' );
|
||||||
include( 'wc-rest-functions.php' );
|
include( 'wc-rest-functions.php' );
|
||||||
|
include( 'wc-widget-functions.php' );
|
||||||
|
include( 'wc-webhook-functions.php' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters on data used in admin and frontend.
|
* Filters on data used in admin and frontend.
|
||||||
|
|
|
@ -14,16 +14,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
include_once( 'abstracts/abstract-wc-deprecated-hooks.php' );
|
|
||||||
include_once( 'class-wc-deprecated-action-hooks.php' );
|
|
||||||
include_once( 'class-wc-deprecated-filter-hooks.php' );
|
|
||||||
|
|
||||||
function wc_initialize_deprecated_hook_handlers() {
|
|
||||||
WC()->deprecated_hook_handlers['actions'] = new WC_Deprecated_Action_Hooks();
|
|
||||||
WC()->deprecated_hook_handlers['filters'] = new WC_Deprecated_Filter_Hooks();
|
|
||||||
}
|
|
||||||
add_action( 'woocommerce_init', 'wc_initialize_deprecated_hook_handlers' );
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs a deprecated action with notice only if used.
|
* Runs a deprecated action with notice only if used.
|
||||||
*
|
*
|
||||||
|
|
|
@ -234,7 +234,7 @@ function wc_product_dropdown_categories( $args = array(), $deprecated_hierarchic
|
||||||
function wc_walk_category_dropdown_tree() {
|
function wc_walk_category_dropdown_tree() {
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
|
|
||||||
if ( ! class_exists( 'WC_Product_Cat_Dropdown_Walker' ) ) {
|
if ( ! class_exists( 'WC_Product_Cat_Dropdown_Walker', false ) ) {
|
||||||
include_once( WC()->plugin_path() . '/includes/walkers/class-product-cat-dropdown-walker.php' );
|
include_once( WC()->plugin_path() . '/includes/walkers/class-product-cat-dropdown-walker.php' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -252,41 +252,14 @@ final class WooCommerce {
|
||||||
* Include required core files used in admin and on the frontend.
|
* Include required core files used in admin and on the frontend.
|
||||||
*/
|
*/
|
||||||
public function includes() {
|
public function includes() {
|
||||||
|
/**
|
||||||
|
* Class autoloader.
|
||||||
|
*/
|
||||||
include_once( WC_ABSPATH . 'includes/class-wc-autoloader.php' );
|
include_once( WC_ABSPATH . 'includes/class-wc-autoloader.php' );
|
||||||
include_once( WC_ABSPATH . 'includes/wc-core-functions.php' );
|
|
||||||
include_once( WC_ABSPATH . 'includes/class-wc-register-wp-admin-settings.php' );
|
|
||||||
include_once( WC_ABSPATH . 'includes/wc-widget-functions.php' );
|
|
||||||
include_once( WC_ABSPATH . 'includes/wc-webhook-functions.php' );
|
|
||||||
include_once( WC_ABSPATH . 'includes/class-wc-install.php' );
|
|
||||||
include_once( WC_ABSPATH . 'includes/class-wc-geolocation.php' );
|
|
||||||
include_once( WC_ABSPATH . 'includes/class-wc-download-handler.php' );
|
|
||||||
include_once( WC_ABSPATH . 'includes/class-wc-comments.php' );
|
|
||||||
include_once( WC_ABSPATH . 'includes/class-wc-post-data.php' );
|
|
||||||
include_once( WC_ABSPATH . 'includes/class-wc-ajax.php' );
|
|
||||||
|
|
||||||
include_once( WC_ABSPATH . 'includes/abstracts/abstract-wc-data.php' ); // WC_Data for CRUD
|
/**
|
||||||
include_once( WC_ABSPATH . 'includes/class-wc-data-exception.php' );
|
* Interfaces.
|
||||||
|
*/
|
||||||
if ( $this->is_request( 'admin' ) ) {
|
|
||||||
include_once( WC_ABSPATH . 'includes/admin/class-wc-admin.php' );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $this->is_request( 'frontend' ) ) {
|
|
||||||
$this->frontend_includes();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $this->is_request( 'frontend' ) || $this->is_request( 'cron' ) ) {
|
|
||||||
include_once( WC_ABSPATH . 'includes/class-wc-session-handler.php' );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $this->is_request( 'cron' ) && 'yes' === get_option( 'woocommerce_allow_tracking', 'no' ) ) {
|
|
||||||
include_once( WC_ABSPATH . 'includes/class-wc-tracker.php' );
|
|
||||||
}
|
|
||||||
|
|
||||||
include_once( WC_ABSPATH . 'includes/class-wc-query.php' ); // The main query class
|
|
||||||
include_once( WC_ABSPATH . 'includes/class-wc-api.php' ); // API Class
|
|
||||||
include_once( WC_ABSPATH . 'includes/class-wc-auth.php' ); // Auth Class
|
|
||||||
include_once( WC_ABSPATH . 'includes/class-wc-post-types.php' ); // Registers post types
|
|
||||||
include_once( WC_ABSPATH . 'includes/interfaces/class-wc-abstract-order-data-store-interface.php' );
|
include_once( WC_ABSPATH . 'includes/interfaces/class-wc-abstract-order-data-store-interface.php' );
|
||||||
include_once( WC_ABSPATH . 'includes/interfaces/class-wc-coupon-data-store-interface.php' );
|
include_once( WC_ABSPATH . 'includes/interfaces/class-wc-coupon-data-store-interface.php' );
|
||||||
include_once( WC_ABSPATH . 'includes/interfaces/class-wc-customer-data-store-interface.php' );
|
include_once( WC_ABSPATH . 'includes/interfaces/class-wc-customer-data-store-interface.php' );
|
||||||
|
@ -303,6 +276,11 @@ final class WooCommerce {
|
||||||
include_once( WC_ABSPATH . 'includes/interfaces/class-wc-shipping-zone-data-store-interface.php' );
|
include_once( WC_ABSPATH . 'includes/interfaces/class-wc-shipping-zone-data-store-interface.php' );
|
||||||
include_once( WC_ABSPATH . 'includes/interfaces/class-wc-logger-interface.php' );
|
include_once( WC_ABSPATH . 'includes/interfaces/class-wc-logger-interface.php' );
|
||||||
include_once( WC_ABSPATH . 'includes/interfaces/class-wc-log-handler-interface.php' );
|
include_once( WC_ABSPATH . 'includes/interfaces/class-wc-log-handler-interface.php' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Abstract classes.
|
||||||
|
*/
|
||||||
|
include_once( WC_ABSPATH . 'includes/abstracts/abstract-wc-data.php' ); // WC_Data for CRUD
|
||||||
include_once( WC_ABSPATH . 'includes/abstracts/abstract-wc-payment-token.php' ); // Payment Tokens
|
include_once( WC_ABSPATH . 'includes/abstracts/abstract-wc-payment-token.php' ); // Payment Tokens
|
||||||
include_once( WC_ABSPATH . 'includes/abstracts/abstract-wc-product.php' ); // Products
|
include_once( WC_ABSPATH . 'includes/abstracts/abstract-wc-product.php' ); // Products
|
||||||
include_once( WC_ABSPATH . 'includes/abstracts/abstract-wc-order.php' ); // Orders
|
include_once( WC_ABSPATH . 'includes/abstracts/abstract-wc-order.php' ); // Orders
|
||||||
|
@ -311,6 +289,24 @@ final class WooCommerce {
|
||||||
include_once( WC_ABSPATH . 'includes/abstracts/abstract-wc-payment-gateway.php' ); // A Payment gateway
|
include_once( WC_ABSPATH . 'includes/abstracts/abstract-wc-payment-gateway.php' ); // A Payment gateway
|
||||||
include_once( WC_ABSPATH . 'includes/abstracts/abstract-wc-integration.php' ); // An integration with a service
|
include_once( WC_ABSPATH . 'includes/abstracts/abstract-wc-integration.php' ); // An integration with a service
|
||||||
include_once( WC_ABSPATH . 'includes/abstracts/abstract-wc-log-handler.php' );
|
include_once( WC_ABSPATH . 'includes/abstracts/abstract-wc-log-handler.php' );
|
||||||
|
include_once( WC_ABSPATH . 'includes/abstracts/abstract-wc-deprecated-hooks.php' );
|
||||||
|
include_once( WC_ABSPATH . 'includes/abstracts/abstract-wc-session.php' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Core classes.
|
||||||
|
*/
|
||||||
|
include_once( WC_ABSPATH . 'includes/wc-core-functions.php' );
|
||||||
|
include_once( WC_ABSPATH . 'includes/class-wc-post-types.php' ); // Registers post types
|
||||||
|
include_once( WC_ABSPATH . 'includes/class-wc-install.php' );
|
||||||
|
include_once( WC_ABSPATH . 'includes/class-wc-geolocation.php' );
|
||||||
|
include_once( WC_ABSPATH . 'includes/class-wc-download-handler.php' );
|
||||||
|
include_once( WC_ABSPATH . 'includes/class-wc-comments.php' );
|
||||||
|
include_once( WC_ABSPATH . 'includes/class-wc-post-data.php' );
|
||||||
|
include_once( WC_ABSPATH . 'includes/class-wc-ajax.php' );
|
||||||
|
include_once( WC_ABSPATH . 'includes/class-wc-emails.php' );
|
||||||
|
include_once( WC_ABSPATH . 'includes/class-wc-data-exception.php' );
|
||||||
|
include_once( WC_ABSPATH . 'includes/class-wc-query.php' );
|
||||||
|
include_once( WC_ABSPATH . 'includes/class-wc-order-factory.php' ); // Order factory
|
||||||
include_once( WC_ABSPATH . 'includes/class-wc-product-factory.php' ); // Product factory
|
include_once( WC_ABSPATH . 'includes/class-wc-product-factory.php' ); // Product factory
|
||||||
include_once( WC_ABSPATH . 'includes/class-wc-payment-tokens.php' ); // Payment tokens controller
|
include_once( WC_ABSPATH . 'includes/class-wc-payment-tokens.php' ); // Payment tokens controller
|
||||||
include_once( WC_ABSPATH . 'includes/class-wc-shipping-zone.php' );
|
include_once( WC_ABSPATH . 'includes/class-wc-shipping-zone.php' );
|
||||||
|
@ -320,7 +316,13 @@ final class WooCommerce {
|
||||||
include_once( WC_ABSPATH . 'includes/class-wc-integrations.php' ); // Loads integrations
|
include_once( WC_ABSPATH . 'includes/class-wc-integrations.php' ); // Loads integrations
|
||||||
include_once( WC_ABSPATH . 'includes/class-wc-cache-helper.php' ); // Cache Helper
|
include_once( WC_ABSPATH . 'includes/class-wc-cache-helper.php' ); // Cache Helper
|
||||||
include_once( WC_ABSPATH . 'includes/class-wc-https.php' ); // https Helper
|
include_once( WC_ABSPATH . 'includes/class-wc-https.php' ); // https Helper
|
||||||
include_once( WC_ABSPATH . 'includes/class-wc-data-store.php' ); // WC_Data_Store for CRUD
|
include_once( WC_ABSPATH . 'includes/class-wc-deprecated-action-hooks.php' );
|
||||||
|
include_once( WC_ABSPATH . 'includes/class-wc-deprecated-filter-hooks.php' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Data stores - used to store and retrieve CRUD object data from the database.
|
||||||
|
*/
|
||||||
|
include_once( WC_ABSPATH . 'includes/class-wc-data-store.php' );
|
||||||
include_once( WC_ABSPATH . 'includes/data-stores/class-wc-data-store-wp.php' );
|
include_once( WC_ABSPATH . 'includes/data-stores/class-wc-data-store-wp.php' );
|
||||||
include_once( WC_ABSPATH . 'includes/data-stores/class-wc-coupon-data-store-cpt.php' );
|
include_once( WC_ABSPATH . 'includes/data-stores/class-wc-coupon-data-store-cpt.php' );
|
||||||
include_once( WC_ABSPATH . 'includes/data-stores/class-wc-product-data-store-cpt.php' );
|
include_once( WC_ABSPATH . 'includes/data-stores/class-wc-product-data-store-cpt.php' );
|
||||||
|
@ -343,9 +345,32 @@ final class WooCommerce {
|
||||||
include_once( WC_ABSPATH . 'includes/data-stores/class-wc-order-data-store-cpt.php' );
|
include_once( WC_ABSPATH . 'includes/data-stores/class-wc-order-data-store-cpt.php' );
|
||||||
include_once( WC_ABSPATH . 'includes/data-stores/class-wc-order-refund-data-store-cpt.php' );
|
include_once( WC_ABSPATH . 'includes/data-stores/class-wc-order-refund-data-store-cpt.php' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* REST API.
|
||||||
|
*/
|
||||||
|
include_once( WC_ABSPATH . 'includes/class-wc-legacy-api.php' );
|
||||||
|
include_once( WC_ABSPATH . 'includes/class-wc-api.php' ); // API Class
|
||||||
|
include_once( WC_ABSPATH . 'includes/class-wc-auth.php' ); // Auth Class
|
||||||
|
include_once( WC_ABSPATH . 'includes/class-wc-register-wp-admin-settings.php' );
|
||||||
|
|
||||||
if ( defined( 'WP_CLI' ) && WP_CLI ) {
|
if ( defined( 'WP_CLI' ) && WP_CLI ) {
|
||||||
include_once( WC_ABSPATH . 'includes/class-wc-cli.php' );
|
include_once( WC_ABSPATH . 'includes/class-wc-cli.php' );
|
||||||
new WC_CLI;
|
}
|
||||||
|
|
||||||
|
if ( $this->is_request( 'admin' ) ) {
|
||||||
|
include_once( WC_ABSPATH . 'includes/admin/class-wc-admin.php' );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $this->is_request( 'frontend' ) ) {
|
||||||
|
$this->frontend_includes();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $this->is_request( 'frontend' ) || $this->is_request( 'cron' ) ) {
|
||||||
|
include_once( WC_ABSPATH . 'includes/class-wc-session-handler.php' );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $this->is_request( 'cron' ) && 'yes' === get_option( 'woocommerce_allow_tracking', 'no' ) ) {
|
||||||
|
include_once( WC_ABSPATH . 'includes/class-wc-tracker.php' );
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->query = new WC_Query();
|
$this->query = new WC_Query();
|
||||||
|
@ -398,6 +423,8 @@ final class WooCommerce {
|
||||||
$this->countries = new WC_Countries(); // Countries class
|
$this->countries = new WC_Countries(); // Countries class
|
||||||
$this->integrations = new WC_Integrations(); // Integrations class
|
$this->integrations = new WC_Integrations(); // Integrations class
|
||||||
$this->structured_data = new WC_Structured_Data(); // Structured Data class, generates and handles structured data
|
$this->structured_data = new WC_Structured_Data(); // Structured Data class, generates and handles structured data
|
||||||
|
$this->deprecated_hook_handlers['actions'] = new WC_Deprecated_Action_Hooks();
|
||||||
|
$this->deprecated_hook_handlers['filters'] = new WC_Deprecated_Filter_Hooks();
|
||||||
|
|
||||||
// Session class, handles session data for users - can be overwritten if custom handler is needed.
|
// Session class, handles session data for users - can be overwritten if custom handler is needed.
|
||||||
if ( $this->is_request( 'frontend' ) || $this->is_request( 'cron' ) ) {
|
if ( $this->is_request( 'frontend' ) || $this->is_request( 'cron' ) ) {
|
||||||
|
|
Loading…
Reference in New Issue