notifications_service = $notifications_service;
$this->merchant_center = $merchant_center;
}
/**
* Register the service
*/
public function register(): void {
add_action( 'woocommerce_system_status_report', [ $this, 'add_system_status_section' ] );
}
/**
* Add Google for WooCommerce section to System Status Report
*/
public function add_system_status_section(): void {
?>
|
|
render_sync_mode_rows(); ?>
notifications_service->get_current_sync_mode();
} catch ( Exception $exception ) {
?>
|
|
|
|
|
|
notifications_service->is_ready();
$is_push_ready = $this->merchant_center->is_ready_for_syncing();
foreach ( $sync_mode as $data_type => $modes ) {
if ( ! is_array( $modes ) ) {
continue;
}
$data_type_label = ucfirst( str_replace( '_', ' ', $data_type ) );
$pull_enabled = $is_pull_ready && isset( $modes['pull'] ) && $modes['pull'];
$push_enabled = $is_push_ready && isset( $modes['push'] ) && $modes['push'];
// API Pull row
?>
|
|
|
Enabled
Disabled
|
|
|
|
Enabled
Disabled
|