I
I
Ib0bI2019-06-08 22:30:35
WordPress
Ib0bI, 2019-06-08 22:30:35

Custom product ID in wordpress?

Is it possible to specify a custom ID when creating a product?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pychev Anatoly, 2019-06-08
@Ib0bI

no, product id is generated automatically. In the wp_posts table, this is the ID (autoincrement) field.
If you need to save some unique number for a product, then use arbitrary (meta) fields. Also, the product has a sku field - an article that you can use at your discretion. It is notable for the fact that there is a built-in search function for this wc_get_product_by_sku field.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question