Hi Greg. I hope you enjoyed your Independence Day. I took my son on a 2 week trip and am finally starting to catch up on work.
So I did a query logger and found more info for you. I haven’t tested every situation you listed in #1 but it definitely happened on the first test I did, which was a new user checking the ‘create account’ box. I think you’ll see what is happening in the queries I captured.
INSERT INTO wp_postmeta
(post_id
, meta_key
, meta_value
) VALUES (39754, ‘adverts_person’, ‘Test Person’) – (0.00095415115356445 s)
[Stack]: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/x/woocommerce.php’), x_get_view, X_View_Router::render, include(‘/themes/x/framework/views/integrity/woocommerce.php’), woocommerce_content, wc_get_template_part, load_template, require(‘/plugins/woocommerce/templates/content-single-product.php’), do_action(‘woocommerce_single_product_summary’), WP_Hook->do_action, WP_Hook->apply_filters, WC_Structured_Data->generate_product_data, do_shortcode, preg_replace_callback, do_shortcode_tag, shortcode_adverts_add, Adverts_Shortcode_Adverts_Add->main, Adverts_Shortcode_Adverts_Add->action_preview, Adverts_Post::save, adverts_save_single, update_post_meta, update_metadata, add_metadata
INSERT INTO wp_postmeta
(post_id
, meta_key
, meta_value
) VALUES (39755, ‘adverts_person’, ‘Test Person’) – (0.0013630390167236 s)
[Stack]: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/x/woocommerce.php’), x_get_view, X_View_Router::render, include(‘/themes/x/framework/views/integrity/woocommerce.php’), woocommerce_content, wc_get_template_part, load_template, require(‘/plugins/woocommerce/templates/content-single-product.php’), do_action(‘woocommerce_after_single_product_summary’), WP_Hook->do_action, WP_Hook->apply_filters, woocommerce_output_product_data_tabs, wc_get_template, include(‘/themes/x/woocommerce/single-product/tabs/tabs.php’), woocommerce_product_description_tab, wc_get_template, include(‘/plugins/woocommerce/templates/single-product/tabs/description.php’), the_content, apply_filters(‘the_content’), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, shortcode_adverts_add, Adverts_Shortcode_Adverts_Add->main, Adverts_Shortcode_Adverts_Add->action_preview, Adverts_Post::save, adverts_save_single, update_post_meta, update_metadata, add_metadata
UPDATE wp_users
SET user_pass
= ‘##REMOVED##’, user_nicename
= ‘admin’, user_email
= ‘[email protected]’, user_url
= ”, user_registered
= ‘2015-11-23 08:09:29’, user_activation_key
= ”, display_name
= ‘Test Person’ WHERE ID
= 1 – (0.00020790100097656 s)
[Stack]: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters, adext_wc_payments_cart_redirect, adverts_create_user_from_post_id, apply_filters(‘adverts_create_user_from_post_id’), WP_Hook->apply_filters, _adverts_create_user_from_post_id, wp_update_user, wp_insert_user
UPDATE wp_usermeta
SET meta_value
= ‘Test Person’ WHERE user_id
= 1 AND meta_key
= ‘nickname’ – (0.0012691020965576 s)
[Stack]: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters, adext_wc_payments_cart_redirect, adverts_create_user_from_post_id, apply_filters(‘adverts_create_user_from_post_id’), WP_Hook->apply_filters, _adverts_create_user_from_post_id, wp_update_user, wp_insert_user, update_user_meta, update_metadata
There are a number of UPDATE wp_usermeta’s after this which include ‘Test Person’ but they are massive and I believe the issue is already shown in the above queries.
I hope this is enough info for you to figure out where the issue is. Thanks!
John M Powell
Digipark.com