get_settings_handler()->is_system_of_record_square() ) : ?> get_settings_handler()->is_system_of_record_woocommerce() ) : ?>
HTML tag, %2$s, $4%s - closing HTML tag */ esc_html__( '%1$sSquare%2$s is the system of record set in the sync settings. The following data from Square will overwrite WooCommerce data for synced products: %3$sname, price, description, category, inventory%4$s.', 'woocommerce-square' ), '', '', '', '' ); ?>
HTML tag, %2$s closing HTML tag */ esc_html__( '%1$sProduct images%2$s will be imported from Square if no featured image is set in WooCommerce.', 'woocommerce-square' ), '', '' ); ?>
HTML tag, %2$s, %4$s - closing HTML tag */ esc_html__( '%1$sWooCommerce%2$s is the system of record set in the sync settings. The following data from WooCommerce will overwrite Square data for synced products: %3$sname, price, inventory, category, image%4$s.', 'woocommerce-square' ), '', '', '', '' ); ?>
HTML tag, %2$s closing HTML tag*/ esc_html__( '%1$sSync setting not chosen.%2$s Products will not be synced between Square and WooCommerce.', 'woocommerce-square' ), '', '' ); ?>
get_settings_handler()->is_connected(); $sync_in_progress = $is_connected ? wc_square()->get_sync_handler()->is_sync_in_progress() : false; $synced_products = wc_square()->get_settings_handler()->is_product_sync_enabled() ? Product::get_products_synced_with_square() : array(); $synced_count = count( $synced_products ); $is_product_import = false; if ( $sync_in_progress ) { $current_job = wc_square()->get_sync_handler()->get_job_in_progress(); $is_product_import = isset( $current_job->action ) && 'product_import' === $current_job->action; } if ( ! $is_connected ) { $disabled_reason = esc_html__( 'Please connect to Square to enable product sync.', 'woocommerce-square' ); } elseif ( ! wc_square()->get_settings_handler()->get_location_id() ) { $disabled_reason = esc_html__( 'Please set the business location to enable product sync.', 'woocommerce-square' ); } elseif ( 0 === $synced_count ) { $disabled_reason = esc_html__( 'There are currently no products marked to be synced with Square.', 'woocommerce-square' ); } elseif ( $sync_in_progress ) { $disabled_reason = esc_html__( 'A sync is currently in progress. Please try again later.', 'woocommerce-square' ); } if ( ! empty( $disabled_reason ) ) { /* translators: Placeholder: %s - reason text */ $disabled_reason = sprintf( esc_html__( 'Product sync between WooCommerce and Square is currently unavailable. %s', 'woocommerce-square' ), $disabled_reason ); } ?>

get_sync_handler()->get_last_synced_at(); ?> setTimestamp( $last_synced_at ); $last_synced_date->setTimezone( new \DateTimeZone( wc_timezone_string() ) ); echo esc_html( $last_synced_date->format( $date_time_format ) ); ?>

get_sync_handler()->get_next_sync_at(); ?> setTimestamp( $next_sync_at ); $next_sync_date->setTimezone( new \DateTimeZone( wc_timezone_string() ) ); echo esc_html( $next_sync_date->format( $date_time_format ) ); ?>

get_local_date() ); ?> get_label() ); ?> get_message() ); ?> get_actions() as $action ) : ?>