I am using the Pro Version of WooCommerce Serial Numbers and getting the Error “Could not create serial number”. The error occurred while I added serials manually. Automatic serial number generation also does not work. Is there an error log or other things that I can check? Thank you.
It appears like the database tables are not created for you. That is why WooCommerce Serial Numbers is failing to create serial numbers for you. What is the version of your database? Please connect with us from the live support section (find the message icon at the right bottom of this page).
Hi. Your CREATE TABLE query is wrong.
CREATE TABLE `wp->prefix_wcsn_serial_numbers` (
`id` bigint(20) NOT NULL,
`serial_key` longtext COLLATE utf8mb4_unicode_ci,
`serial_image` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`product_id` bigint(20) NOT NULL,
`activation_limit` int(9) DEFAULT NULL,
`order_id` bigint(20) NOT NULL DEFAULT ‘0’,
`activation_email` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`status` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT ‘available’,
`validity` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`expire_date` datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
`order_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created` datetime NOT NULL
I kept getting errors about cannot save serial number, and i figured out the table doesn’t exist.
Thank you for sharing this. In some minority of cases, our plugin fails to create the database as it expects a higher version of the database. Hope you have successfully solved the problem for you. Our development team will review our query. Thank you.
Hi, I tried previous SQL and returns this message:
#1064 - You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to
use near 'â€˜0â€™,
`activation_email` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT N' at line 7
You have a lower version of the database. WooCommerce Serial Numbers requires a minimum version of 5.6 to function properly. We highly recommend you to update your database version from the server. Once you update the database, everything will work smoothly for you. Thank you.
Hi Kibria, I manually created the table and now is working.
That is great but we really recommend you to update your database version. It will keep you on the safe side. Thanks a lot.