WooCommerce Serial Numbers getting error “Could not create serial number”

Support ForumCategory: WooCommerce Serial Numbers ProWooCommerce Serial Numbers getting error “Could not create serial number”
Christoph Eitelhuber asked 2 years ago

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.

Erekdiera replied 2 months ago

https://hcialischeapc.com/ – purchase cialis online cheap

3 Answers
Staff Writer Staff answered 2 years ago

Hi Christoph,
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).

Ken Plumb answered 2 years ago

Hi. Your CREATE TABLE query is wrong.
Should be

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.

kibria replied 2 years ago

Hi Ken,
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.

kim answered 2 years ago

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

kibria replied 2 years ago

Hi Kim,
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.

Kim replied 2 years ago

Hi Kibria, I manually created the table and now is working.


kibria replied 2 years ago

That is great but we really recommend you to update your database version. It will keep you on the safe side. Thanks a lot.

Your Answer

11 + 4 =