\MainWP\ChildMainWP_Child_WooCommerce_Status

Class MainWP_Child_WooCommerce_Status

MainWP WooCommerce Status Extension handler.

Summary

Methods
Properties
Constants
instance()
__construct()
child_deactivation()
action()
is_version_220()
sync_data()
report_data()
sync_data_two()
report_data_two()
check_db_update()
get_top_seller()
get_woocom_reports()
get_woocom_data()
get_woocom_reports_old()
get_top_sellers_report()
get_total_sales()
get_woocom_analytics()
get_sales_data()
$instance
No constants found
No protected methods found
No protected properties found
N/A
update_wc_db()
No private properties found
N/A

Properties

$instance

$instance : mixed

Public static variable to hold the single instance of the class.

Type

mixed — Default null

Methods

instance()

instance() : mixed

Method instance()

Create a public static instance.

Returns

mixed —

Class instance.

__construct()

__construct() 

MainWP_Child_WooCommerce_Status constructor.

Run any time class is called.

child_deactivation()

child_deactivation() 

MainWP Child Plugin deactivation hooks.

action()

action() 

MainWP Child Woocommerce actions: sync_data, report_data, update_wc_db.

is_version_220()

is_version_220() : boolean|integer

Compare woocommerce versions.

By default, version_compare returns -1 if the first version is lower than the second, 0 if they are equal, and 1 if the second is lower. When using the optional operator argument, the function will return true if the relationship is the one specified by the operator, false otherwise.

Returns

boolean|integer —

Comparison response.

sync_data()

sync_data() : array

Sync Woocommerce data.

Returns

array —

$information Woocommerce data grabed.

report_data()

report_data() : array

Woocommerce report data.

Returns

array —

$information Woocommerce data grabed.

sync_data_two()

sync_data_two() 

Sync Woocommerce data for current month.

report_data_two()

report_data_two() 

Sync Woocomerce data for specific date range.

check_db_update()

check_db_update() : boolean

Check if woocomerce DB needs to be updated.

Returns

boolean —

true|false.

get_top_seller()

get_top_seller(string  $start_date, string  $end_date) : array

Get top seller.

Parameters

string $start_date

Start Date.

string $end_date

End Date.

Returns

array —

$information Woocommerce data grabed.

get_woocom_reports()

get_woocom_reports(string  $start_date, string  $end_date) : array

Get Woocommerce 8 reports.

Parameters

string $start_date

Start Date.

string $end_date

End Date.

Returns

array —

$information Woocommerce data grabed.

get_woocom_data()

get_woocom_data(string  $start_date, string  $end_date) : array

Get Woocommerce data.

Parameters

string $start_date

Start Date.

string $end_date

End Date.

Returns

array —

$information Woocommerce data grabed.

get_woocom_reports_old()

get_woocom_reports_old(string  $start_date, string  $end_date) : array

Get Woocommerce reports old.

Parameters

string $start_date

Start Date.

string $end_date

End Date.

Returns

array —

$information Woocommerce data grabed.

get_top_sellers_report()

get_top_sellers_report(string  $start_date, string  $end_date) : array

Get top seller.

Parameters

string $start_date

Start Date.

string $end_date

End Date.

Returns

array —

$information Woocommerce data grabed.

get_total_sales()

get_total_sales(string  $start_date, string  $end_date) : integer

Get total sales.

Parameters

string $start_date

Start Date.

string $end_date

End Date.

Returns

integer —

$total_sales Total sales.

get_woocom_analytics()

get_woocom_analytics(string  $start_date, string  $end_date) : array

Get Woocommerce 8 analytics.

Parameters

string $start_date

Start Date.

string $end_date

End Date.

Returns

array —

$information Woocommerce data grabed.

get_sales_data()

get_sales_data(string  $start_date, string  $end_date) : array

Get sales data.

Parameters

string $start_date

Start Date.

string $end_date

End Date.

Returns

array —

Sales data.

update_wc_db()

update_wc_db() : array<mixed,string>

Update Woocommerce Database.

Returns

array<mixed,string> —

Success.