self::SLUG ), admin_url( 'admin.php' ) );
}
public function render(): void {
if ( ! current_user_can( 'manage_woocommerce' ) ) {
return;
}
echo '
';
ConnectPage::render_header();
$table = null;
if ( Options::is_connected() ) {
// WP_List_Table is not autoloaded by WordPress; EnrichedTable is only ever loaded from here.
require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
$table = new EnrichedTable( self::$hook_suffix );
$table->prepare_items();
}
self::render_title( null === $table ? null : $table->total() );
if ( null === $table ) {
printf(
'
',
esc_html__( 'Connect your store to see the products CortexCommerce has enriched.', 'cortexcommerce' ),
esc_url( ConnectPage::url() ),
esc_html__( 'Go to the CortexCommerce screen', 'cortexcommerce' )
);
echo '
';
return;
}
if ( $table->unavailable() ) {
printf( '