{"slug":"cart-rest-api-for-woocommerce","name":"CoCart – Headless REST API for WooCommerce","description":"A developer-first REST API to decouple WooCommerce on the frontend to help build modern and scalable storefronts. Fast, secure, customizable, easy.","author":"CoCart Headless","active_installs":1000,"version":"4.8.4","wp_org_url":"https://wordpress.org/plugins/cart-rest-api-for-woocommerce/","is_closed":false,"cleanup":{"has_uninstall_hook":true,"drops_tables_on_uninstall":false,"deletes_options_on_uninstall":false},"tables":[{"table_name":"cocart_carts","full_table_name":"wp_cocart_carts","description":"Stores cocart carts data created by this plugin.","detection_method":"static","confidence":"high","columns":[{"name":"cart_id","type":"bigint(20) unsigned","nullable":false,"primary_key":true},{"name":"cart_key","type":"char(42)","nullable":false,"primary_key":false},{"name":"cart_value","type":"longtext","nullable":false,"primary_key":false},{"name":"cart_created","type":"bigint(20) unsigned","nullable":false,"primary_key":false},{"name":"cart_expiry","type":"bigint(20) unsigned","nullable":false,"primary_key":false},{"name":"cart_source","type":"varchar(200)","nullable":false,"primary_key":false},{"name":"cart_hash","type":"varchar(200)","nullable":false,"primary_key":false}],"create_sql":"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 );"}],"table_count":1}