%s', esc_url( admin_url( 'admin.php?page=' . self::PAGE ) ), esc_html__( 'Settings', 'storeloom' ) ); array_unshift( $links, $settings ); return $links; } public static function register_settings() { register_setting( self::PAGE, Storeloom_Batch::BATCH_SIZE_OPTION, array( 'type' => 'integer', 'default' => Storeloom_Batch::DEFAULT_BATCH_SIZE, 'sanitize_callback' => array( __CLASS__, 'sanitize_batch_size' ), ) ); } public static function sanitize_batch_size( $value ) { return min( 500, max( 1, absint( $value ) ) ); } /** Keys WooCommerce created when the store approved Storeloom ("Storeloom - API (date)"). */ private static function storeloom_keys() { global $wpdb; return $wpdb->get_results( // phpcs:ignore WordPress.DB.DirectDatabaseQuery -- WooCommerce has no API to list keys. $wpdb->prepare( "SELECT key_id, description, permissions, truncated_key, last_access FROM {$wpdb->prefix}woocommerce_api_keys WHERE description LIKE %s ORDER BY key_id", $wpdb->esc_like( 'Storeloom' ) . '%' ) ); } /** What Storeloom is, and the way in: sign up while the store isn't connected yet, open the app once it is. */ private static function render_intro( $connected ) { ?>

description ); ?> …truncated_key ); ?> permissions ); ?> last_access ? mysql2date( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), $key->last_access ) : __( 'Never', 'storeloom' ) ); ?>