then connect the product with the serial using a custom field
Why not store serial itself in custom field, instead of connection information?
You don’t describe what serial number is in detail, but I think it’s likely merely a text string. Since it’s unique (as opposed to group-related) it sounds well suited to be just stored in custom field.
In my experience I had stored much more elaborate data in meta of WooCommerce orders (SVG customizations). I hit issues eventually with allowing multiple instances of same but differently customized product in same order, but I imagine with simpler use case the complexity would be accordingly lower.
Related Posts:
- Query for posts from any post type but only add instock products
- How to use custom post type APIs, but use a different db table
- Woocommerce query specific product from specific category
- wpdb custom post_type problem
- Woocommerce search pagination not working
- WP_Query orderby and tax_query
- Sort posts in loop by the WooCommerce Membership of the author
- Get all post from a post type
- How select query is generated in a Custom Post Type?
- Use Tags to Query Associated Multiple Posts and Get The Average Of Custom Field Values
- Create a WordPress Database query to find users who purchased specific product through WooCommerce [closed]
- Pre defined checkbox / radio button state based on value stored in ACF fields in checkout form WooCommerce
- How to connect two custom post types with nested loops
- Filter by custom taxonomy slug on a custom post type
- Custom Post type and Custom Field WP_Query
- Pagination on category page with custom post types
- Display multiple custom post types and sort them chronological by one of their fields
- Adding custom tables to WordPress
- Using DISTINCT in wp_query
- Using global $post; to get featured image for custom post via WP_Query
- Query custom post type in the loop
- How to add pagination to wp_query [duplicate]
- Related posts in all categories of current post (custom post types)
- Taxonomy Archive: Display only one post per term from separate custom taxonomy
- Loop through Custom Post Type, and then show children within each iteration
- Why does querying on post_tags (which has been applied to custom post types) only return posts?
- Sorting multiple custom post types without a meta key/value pair by sort order
- Including Custom Meta with posts_where query
- Very Slow Page – How to Optimize # of Queries?
- orderby in custom WP Query does not work
- Pagination : How to remove /page/x/ after a ‘POST’ action on a form returning to page 1
- Can I create a loop with multiple post types and specify different $args for each post type?
- How to show CPTs in term archive
- Query custom post type by category slug
- Combining sorted and random CPT
- WP All Import – Using Xpath to set a select value
- How to add post_type=value when editing that post type in the WordPress admin?
- Display CPT posts based on specific taxonomy
- how to get URL of media uploaded to WordPress via media_handle_sideload()
- Can’t query tag and post_type at the same time
- Setting proper query for multiple custom admin filters
- shortcode to show custom post types by category
- Unable to retrieve any posts of CPT in wp-admin
- WP_Query: include custom post type only with specific meta value
- Pagination on a custom post type loop
- How to display product subcategories into my custom post type single page
- showing custom post types of a certain category only
- WP_Query orderby modified to include custom meta changes
- WordPress custom loop filter by meta_key and value with serialize data
- Returning a list of custom post types excluding those without a specific meta_value
- query private custom post type
- Display custom post type from dynamic custom field
- Query/list all terms and their custom post count
- Linking to the most recent post in a Custom Post Type
- How to make sure content doesn’t display if selection is empty
- Filtering WP_Query Dynamically on the Front-End
- Show one item per category of a custom post type
- Sorting custom post type columns with external data and without meta values
- Why get_posts() not returning only selected category posts from Custom Post Type?
- Storing posts from query and accessing later via AJAX call
- Two near-identical custom field types – one works, the other doesn’t . What can cause this?
- Archive for custom taxonomy lists all posts instead of current taxonomy
- Genesis filterable portfolio isotope [closed]
- Get post from custom post type order by two taxonomies
- Query custom post type with tags
- wp_query check if integer exists in custom field’s array
- convert custom query to wp_query
- Wrong request query on cpt and tax
- Previous/Next Link by Meta Value in CPT
- Show custom post type filtered by category
- Randomize Posts. Skip the first post in ascending order
- Creating a navigation menu of all posts of a custom post type and their children posts?
- Get custom taxonomies from multiple posts
- Pagination for Custom Taxonomy Page [duplicate]
- Filtering WP_Query
- Search / Filter posts on Title/Content OR Tags
- Pagination on with query_posts in custom post type template
- Wp_query: sort by PHP variable
- WP_Query most viewed posts, in multiple Post Types, last 30 days, excluding a specific taxonomy term
- Custom-Posttype & Custom Taxonomy WP_Query
- Crafting WP_Query array, sort by date
- Custom loop with multiple taxonomy queries
- How to use custom taxonomies to reference complex relationships?
- Return one unique custom post type result when it shares a custom taxonomy in WP_QUERY?
- Converting the_content string to an array?
- Create a clone from one WordPress site to another in a few minutes
- forming WP_Query for posts of all post types but from specific categories
- Get latest 3 posts from multiple CPT in one query
- Loop to fetch 3 post_thumbnail instances from 3 most recent custom post types named “portfolio”
- Display upcoming Events for next 7 Days
- Isotope Filtering with Bootstrap Tabs – Custom Post Type Query Loop in each Tab (Have to click twice to filter)
- Custom post ui plugin & WP_Query – Polylang
- changing meta value and meta key of price field
- How can I get the number of custom post type posts that have a specific attachment image set?
- How to use load more custom post type data normal or according to on click category tab In WP
- orderby rand is not working for a custom post types
- Problem querying Custom post type by custom fields
- Orderby CPT custom fields not working
- Custom taxonomy rewrite give pagination 404
- WP_Query order by custom field, then randomly order some of results