wp_cocart_carts

Static

Stores cocart carts data created by this plugin.

Column Definitions

ColumnTypeNullable
🔑cart_idbigint(20) unsignedNO
cart_keychar(42)NO
cart_valuelongtextNO
cart_createdbigint(20) unsignedNO
cart_expirybigint(20) unsignedNO
cart_sourcevarchar(200)NO
cart_hashvarchar(200)NO

CREATE TABLE Statement

CREATE TABLE wp_cocart_carts ( cart_id bigint(20) unsigned NOT NULL AUTO_INCREMENT, cart_key char(42) NOT NULL, cart_value longtext NOT NULL, cart_created bigint(20) unsigned NOT NULL, cart_expiry bigint(20) unsigned NOT NULL, cart_source varchar(200) NOT NULL, cart_hash varchar(200) NOT NULL, PRIMARY KEY (cart_id), UNIQUE KEY cart_key (cart_key) ) $collate;"; return $table; } // END get_schema() /** * Create database table, if it doesn't already exist. * * Based on admin/install-helper.php maybe_create_table function. * * @source https://developer.wordpress.org/reference/functions/maybe_create_table/ * * @access protected * * @since 3.1.0 Introduced. * * @param string $table_name Database table name. * @param string $create_sql Create database table SQL. * * @global wpdb $wpdb WordPress database abstraction object. * * @return bool False on error, true if already exists or success. */ protected static function maybe_create_table( $table_name, $create_sql ) { global $wpdb; if ( in_array( $table_name, $wpdb->get_col( $wpdb->prepare( 'SHOW TABLES LIKE %s', $table_name ), 0 ), true ) ) { // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching return true; } require_once ABSPATH . 'wp-admin/includes/upgrade.php'; dbDelta( $create_sql );

Safe to delete?

If you have uninstalled CoCart – Headless REST API for WooCommerce, this table is generally safe to remove. However, always back up your database first.

Note: Some plugins share tables or are dependencies of other plugins. Verify nothing else depends on this table before dropping it.

How to remove this table

DROP TABLE IF EXISTS `wp_cocart_carts`;

Run this query using phpMyAdmin, Adminer, or your MySQL client. Back up first.