Home › Forums › WooCommerce Google Sync Plugin › Pro version metadata fields
Tagged: Template metadata
- This topic has 7 replies, 4 voices, and was last updated 2 years, 1 month ago by Muhammad Subhan.
-
AuthorPosts
-
January 9, 2022 at 4:33 pm #128580peter petterssonParticipant
Hi,
1. Do you have a spredsheet template with all metafields that can be exported? (Ie I guessed “SKU” would be a field and added it to the sheet and it worked)
2. I need to sync meta from a booking plugin mvvwb_product_meta, _mvvwb_bookable. Added these fields but wo nothing returningBest
/PeterJanuary 10, 2022 at 1:17 pm #128593nmediaKeymasterHi there,
here are some videos about the Google sync feature:
1. Adding meta columns
2. Auto Sync & Sync Back
January 11, 2022 at 12:11 am #128724mehrdad nikroParticipantHi,
This works with wholesale plug in but why doesnt it work other metadata. I have tried a manual meta data, ACF metadata and crocoblock plugin that creates a meta data and none of them get the fields updated.January 11, 2022 at 1:06 pm #128759nmediaKeymasterHi,
Well, make sure the returned value in meta data should be string or number, not the object or array.
January 11, 2022 at 5:44 pm #128776mehrdad nikroParticipantvar_dump(get_metadata(‘post’,12897,’wholesale_customer_wholesale_price’));
var_dump(get_metadata(‘post’,12897,’commission’));
var_dump(get_post_meta(‘12897’));output:
array(1) { [0]=> string(2) “80” } array(1) { [0]=> string(13) “default_value” }array(42) { [“_regular_price”]=> array(1) { [0]=> string(3) “299” } [“_sale_price”]=> array(1) { [0]=> string(3) “249” } [“total_sales”]=> array(1) { [0]=> string(1) “0” } [“_tax_status”]=> array(1) { [0]=> string(7) “taxable” } [“_tax_class”]=> array(1) { [0]=> string(0) “” } [“_manage_stock”]=> array(1) { [0]=> string(2) “no” } [“_backorders”]=> array(1) { [0]=> string(2) “no” } [“_sold_individually”]=> array(1) { [0]=> string(2) “no” } [“_virtual”]=> array(1) { [0]=> string(2) “no” } [“_downloadable”]=> array(1) { [0]=> string(2) “no” } [“_download_limit”]=> array(1) { [0]=> string(2) “-1” } [“_download_expiry”]=> array(1) { [0]=> string(2) “-1” } [“_thumbnail_id”]=> array(1) { [0]=> string(5) “11726” } [“_stock”]=> array(1) { [0]=> NULL } [“_stock_status”]=> array(1) { [0]=> string(7) “instock” } [“_wc_average_rating”]=> array(1) { [0]=> string(1) “0” } [“_wc_review_count”]=> array(1) { [0]=> string(1) “0” } [“_product_version”]=> array(1) { [0]=> string(5) “6.0.0” } [“_price”]=> array(1) { [0]=> string(3) “249” } [“wcgs_row_id”]=> array(1) { [0]=> string(1) “9” } [“wholesale_customer_wholesale_price”]=> array(1) { [0]=> string(2) “80” } [“_edit_lock”]=> array(1) { [0]=> string(12) “1641922775:4” } [“_last_editor_used_jetpack”]=> array(1) { [0]=> string(14) “classic-editor” } [“_edit_last”]=> array(1) { [0]=> string(1) “4” } [“_wp_page_template”]=> array(1) { [0]=> string(7) “default” } [“commission”]=> array(1) { [0]=> string(13) “default_value” } [“_yoast_wpseo_content_score”]=> array(1) { [0]=> string(2) “60” } [“_yoast_wpseo_estimated-reading-time-minutes”]=> array(1) { [0]=> string(0) “” } [“wholesale_customer_have_wholesale_price”]=> array(1) { [0]=> string(2) “no” } [“my_commission”]=> array(1) { [0]=> string(1) “0” } [“_my_commission”]=> array(1) { [0]=> string(19) “field_61dcc0b54fcef” } [“this_com”]=> array(1) { [0]=> string(0) “” } [“_this_com”]=> array(1) { [0]=> string(19) “field_61dcc7c50b366” } [“zero_discount”]=> array(1) { [0]=> string(1) “0” } [“5_discount”]=> array(1) { [0]=> string(1) “0” } [“_jet_woo_template”]=> array(1) { [0]=> string(0) “” } [“_template_type”]=> array(1) { [0]=> string(7) “default” } [“_jet_woo_product_video_type”]=> array(1) { [0]=> string(7) “youtube” } [“_jet_woo_product_video_placeholder”]=> array(1) { [0]=> string(0) “” } [“_jet_woo_product_vimeo_video_url”]=> array(1) { [0]=> string(0) “” } [“_jet_woo_product_youtube_video_url”]=> array(1) { [0]=> string(0) “” } [“_jet_woo_product_self_hosted_video”]=> array(1) { [0]=> string(0) “” } }
your plugging works with wholesale_customer_have_wholesale_price but I do not get the “commission” or “zero_discount” or “my_commission” working using the sheets. How is your plugging accessing the “wholesale_customer_have_wholesale_price” thats different from other meta data?
Thank you,January 11, 2022 at 6:34 pm #128777mehrdad nikroParticipantalso what does the plugging use to update meta data? does it use something like this ?
update_post_meta(12943,”commission”,”test”);
or something else?
Please answer the above 2 posts.Thank you,
January 13, 2022 at 12:35 pm #128891nmediaKeymasterHi there,
yes post meta should return a single value, not the array. And we use meta_data property for WC Product API:
https://woocommerce.github.io/woocommerce-rest-api-docs/#product-meta-data-propertiesAugust 16, 2022 at 10:53 pm #143840Muhammad SubhanParticipantHi, I would like to add SKU value in the column. I tried inserting a new column and writing SKU in it but apparently it did not generate any sku data in the fields.
-
AuthorPosts
- You must be logged in to reply to this topic.