Custom Field hooks not working
-
Hi
Good day. I hope you guys doing well. We use Plugin add ons Ultimate to create different product options on the site (Example: Size, Quantity, Flavor, etc). The plugin is installed on rustitosdulces.com. And also we use shipstation plugin. We would like to add a data in custom field 2 and 3 so we used this hook https://woocommerce.com/document/shipstation-for-woocommerce/#export-custom-field-data-to-shipstation and but it didn’t work /it didn’t save the value to custom field 2 shipstation. I’ve already got the metakey(_Size) https://prnt.sc/YVC_ca7Z0HKX.function prefix_shipstation_custom_field_2() { return '_Size'; // Replace this with the key of your custom field } add_filter( 'woocommerce_shipstation_export_custom_field_2', 'prefix_shipstation_custom_field_2' );
Just FYI, I get and confirmed the metakey via metadata (order). I also checked in database https://prnt.sc/1WBeHj8E8gbr
You can check the data coming from metadata here: https://drive.google.com/file/d/1umGLqTvgs5fhM54eB0327toGH1_xWpis/view?usp=share_linkLooking forward of your response.
- This topic was modified 1 year, 9 months ago by Jam.
The page I need help with: [log in to see the link]
-
Hello,
...it didn’t work /it didn’t save the value to custom field 2 shipstation
I understand that the hook is not working as expected.
As a first step, please share a copy of your site’s System Status Report: You can get it via WooCommerce > Status. Select “Get system report” and then “Copy for support”.?
Then please share as well a copy of any fatal error log found under WooCommerce > System Status > Logs (if there is any error visible).
Hey @ihereira
Thanks for your response.
Here’s the wc system status` ### WordPress Environment ### WordPress address (URL): https://rustitosdulces.com Site address (URL): https://rustitosdulces.com WC Version: 7.3.0 REST API Version: ?</img> 7.3.0 WC Blocks Version: ?</img> 9.1.5 Action Scheduler Version: ?</img> 3.5.4 Log Directory Writable: ?</img> WP Version: 6.1.1 WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: – WP Cron: – Language: en_US External object cache: – ### Server Environment ### Server Info: Apache/2.4 PHP Version: 8.0.21 PHP Post Max Size: 50 MB PHP Time Limit: 120 PHP Max Input Vars: 1000 cURL Version: 7.82.0 OpenSSL/1.0.2k-fips SUHOSIN Installed: – MySQL Version: 10.5.17-MariaDB-log Max Upload Size: 50 MB Default Timezone is UTC: ?</img> fsockopen/cURL: ?</img> SoapClient: ?</img> DOMDocument: ?</img> GZip: ?</img> Multibyte String: ?</img> Remote Post: ?</img> Remote Get: ?</img> ### Database ### WC Database Version: 7.3.0 WC Database Prefix: wp_ Total Database Size: 89.54MB Database Data Size: 74.12MB Database Index Size: 15.42MB wp_woocommerce_sessions: Data: 5.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_order_items: Data: 0.06MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_order_itemmeta: Data: 1.52MB + Index: 0.28MB + Engine InnoDB wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_shipping_zone_locations: Data: 0.06MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_acfw_gift_cards: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_acfw_loyalprog_entries: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_acfw_store_credits: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_acfw_virtual_coupons: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_actionscheduler_actions: Data: 4.52MB + Index: 4.50MB + Engine InnoDB wp_actionscheduler_claims: Data: 0.27MB + Index: 0.17MB + Engine InnoDB wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_logs: Data: 2.52MB + Index: 2.00MB + Engine InnoDB wp_berocket_termmeta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_braapf_product_stock_status_parent: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_braapf_product_variation_attributes: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_braapf_term_taxonomy_hierarchical: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_braapf_variable_attributes: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_cleantalk_ac_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_cleantalk_connection_reports: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_cleantalk_no_cookie_data: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_cleantalk_sessions: Data: 4.02MB + Index: 0.00MB + Engine InnoDB wp_cleantalk_sfw: Data: 1.52MB + Index: 0.45MB + Engine InnoDB wp_cleantalk_sfw_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_cleantalk_spamscan_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_cleantalk_ua_bl: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 0.28MB + Index: 0.16MB + Engine InnoDB wp_commercekit_searches: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp_commercekit_swatches_cache_count: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_commercekit_waitlist: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_commercekit_wishlist: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_commercekit_wishlist_items: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_e_events: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_imagify_files: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_imagify_folders: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_options: Data: 5.02MB + Index: 0.25MB + Engine InnoDB wp_pmxe_exports: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_pmxe_google_cats: Data: 0.39MB + Index: 0.00MB + Engine InnoDB wp_pmxe_posts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_pmxe_templates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_pmxi_files: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_pmxi_hash: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_pmxi_history: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_pmxi_images: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wp_pmxi_imports: Data: 0.27MB + Index: 0.00MB + Engine InnoDB wp_pmxi_posts: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp_pmxi_templates: Data: 0.14MB + Index: 0.00MB + Engine InnoDB wp_postmeta: Data: 23.28MB + Index: 4.25MB + Engine InnoDB wp_posts: Data: 12.38MB + Index: 0.44MB + Engine InnoDB wp_rank_math_404_logs: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_rank_math_analytics_ga: Data: 0.05MB + Index: 0.05MB + Engine InnoDB wp_rank_math_analytics_gsc: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_rank_math_analytics_inspections: Data: 0.33MB + Index: 0.11MB + Engine InnoDB wp_rank_math_analytics_keyword_manager: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_rank_math_analytics_objects: Data: 0.16MB + Index: 0.08MB + Engine InnoDB wp_rank_math_internal_links: Data: 0.06MB + Index: 0.02MB + Engine InnoDB wp_rank_math_internal_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_rank_math_redirections: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_rank_math_redirections_cache: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_sbi_feeds: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_sbi_feed_caches: Data: 0.08MB + Index: 0.02MB + Engine InnoDB wp_sbi_instagram_feeds_posts: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_sbi_instagram_feed_locator: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_sbi_instagram_posts: Data: 0.09MB + Index: 0.00MB + Engine InnoDB wp_sbi_sources: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_sb_queue: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_snippets: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_solid_affiliates_bulk_payouts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_solid_affiliate_affiliates: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_solid_affiliate_affiliate_customer_links: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_solid_affiliate_affiliate_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_solid_affiliate_affiliate_meta: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_solid_affiliate_affiliate_product_rates: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_solid_affiliate_creatives: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_solid_affiliate_payouts: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_solid_affiliate_referrals: Data: 0.02MB + Index: 0.11MB + Engine InnoDB wp_solid_affiliate_store_credit_transactions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_solid_affiliate_visits: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_termmeta: Data: 0.06MB + Index: 0.06MB + Engine InnoDB wp_terms: Data: 0.05MB + Index: 0.03MB + Engine InnoDB wp_term_relationships: Data: 0.13MB + Index: 0.08MB + Engine InnoDB wp_term_taxonomy: Data: 0.09MB + Index: 0.03MB + Engine InnoDB wp_usermeta: Data: 0.31MB + Index: 0.20MB + Engine InnoDB wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_admin_notes: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_product_attributes_lookup: Data: 0.06MB + Index: 0.06MB + Engine InnoDB wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_product_meta_lookup: Data: 0.05MB + Index: 0.09MB + Engine InnoDB wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wpr_rocket_cache: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wpr_rucss_used_css: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_yaysmtp_email_logs: Data: 9.52MB + Index: 0.00MB + Engine InnoDB ### Post Type Counts ### attachment: 818 br_product_filter: 4 custom_css: 2 customize_changeset: 140 elementor_library: 8 nav_menu_item: 64 oembed_cache: 1 page: 18 pewc_field: 26 pewc_group: 16 pewc_product_extra: 212 post: 4 product: 205 revision: 727 seedprod: 1 shop_coupon: 6 shop_order: 114 shop_order_refund: 2 wp_block: 1 yaymail_template: 11 ### Security ### Secure connection (HTTPS): ?</img> Hide errors from visitors: ?</img> ### Active Plugins (42) ### Advanced Coupons for WooCommerce Free: by Rymera Web Co – 4.5.2 Advanced Coupons for WooCommerce Premium: by Rymera Web Co – 3.5.3 Advanced Gift Cards for WooCommerce: by Rymera Web Co – 1.3.2 Afterpay Gateway for WooCommerce: by Afterpay – 3.5.3 AppMySite: by AppMySite – 3.9.1 Brands for WooCommerce: by BeRocket – 3.7.0.6 Anti-Spam by CleanTalk: by СleanTalk – 6.2.1 Code Snippets: by Code Snippets Pro – 3.2.2 CommerceGurus Commercekit: by CommerceGurus – 2.1.1 Disable Bloat for WordPress & WooCommerce: by Disable Bloat – 3.1.13 Drip for WooCommerce: by Drip – 1.1.3 Elementor: by Elementor.com – 3.10.2 Imagify: by Imagify – Optimize Images & Convert WebP – 2.1 Smash Balloon Instagram Feed: by Smash Balloon – 6.1.1 Kirki Customizer Framework: by David Vongries – 4.0.24 Klarna Order Management for WooCommerce: by klarna krokedil – 1.7.1 Klarna Payments for WooCommerce: by krokedil klarna automattic – 2.12.1 Loyalty Program for WooCommerce: by Rymera Web Co – 1.8.1 Perfmatters: by forgemedia – 2.0.4 PixelYourSite: by PixelYourSite – 9.3.2 WooCommerce Product Add-Ons Ultimate: by Plugin Republic – 3.12.0 Richpanel for WooCommerce: by Richpanel – 2.3.7 Rank Math SEO PRO: by Rank Math – 3.0.29 Rank Math SEO: by Rank Math – 1.0.107.2 Servebolt Optimizer: by Servebolt – 3.5.10 Sezzle WooCommerce Payment: by Sezzle – 4.0.8 Solid Affiliate: by Solid Plugins – 1.1.0 Trustpilot-reviews: by Trustpilot – 2.5.914 Checkout with Cash App on WooCommerce PRO: by The African Boss – 4.3.1 WPC Save For Later for WooCommerce: by WPClever – 2.1.0 Product Feed PRO for WooCommerce: by AdTribes.io – 12.1.9 WooCommerce AJAX Products Filter: by BeRocket – 3.1.3.3 WooCommerce Stripe Gateway: by WooCommerce – 7.0.2 WooCommerce PayPal Payments: by WooCommerce – 2.0.1 (update to version 2.0.2 is available) WooCommerce - ShipStation Integration: by WooCommerce – 4.3.2 WooCommerce: by Automattic – 7.3.0 WP All Import Pro: by Soflyy – 4.7.8 WP Crontrol: by John Blackbourn & crontributors – 1.15.1 WP Rocket: by WP Media – 3.12.4 WP All Import - WooCommerce Import Add-On Pro: by Soflyy – 3.3.4 YayMail - WooCommerce Email Customizer: by YayCommerce – 3.1.7 YaySMTP - Simple WP SMTP Mail: by YayCommerce – 2.2.9 ### Inactive Plugins (2) ### WP All Export - WooCommerce Export Add-On Pro: by Soflyy – 1.0.5 WP All Export Pro: by Soflyy – 1.8.1 ### Dropin Plugins (1) ### advanced-cache.php: advanced-cache.php ### Settings ### API Enabled: – Force SSL: – Currency: USD ($) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: – Enforce Approved Product Download Directories: ?</img> Order datastore: WC_Order_Data_Store_CPT ### WC Pages ### Shop base: #28 - /shop/ Cart: #29 - /cart/ Checkout: #30 - /checkout/ My account: #31 - /account/ Terms and conditions: #32 - /terms/ ### Theme ### Name: Shoptimizer Version: 2.6.2 Author URL: https://www.commercegurus.com/ Child Theme: ?</img> – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ?</img> ### Templates ### Overrides: – ### Klarna Payments Request Log ### 2023-02-02 14:32:01: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html><head><title>401 Authorization Required<\/title><\/head><body><center><h1>401 Authorization Required<\/h1><\/center><\/body><\/html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2023-02-02 14:31:31: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html><head><title>401 Authorization Required<\/title><\/head><body><center><h1>401 Authorization Required<\/h1><\/center><\/body><\/html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2023-02-02 03:02:52: KP Create Session Response code: 400 Response message: {"headers":[],"body":"{\n \"error_code\" : \"BAD_VALUE\",\n \"error_messages\" : [ \"Bad value: order_amount\" ],\n \"correlation_id\" : \"33e5973c-446c-4b4f-b721-8dfe209b9ad7\"\n}","response":{"code":400,"message":"Bad Request"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2023-02-02 03:02:52: KP Create Session Response code: 400 Response message: {"headers":[],"body":"{\n \"error_code\" : \"BAD_VALUE\",\n \"error_messages\" : [ \"Bad value: order_amount\" ],\n \"correlation_id\" : \"b01b979e-05d2-495e-9571-520a509f2b87\"\n}","response":{"code":400,"message":"Bad Request"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2023-02-02 03:02:52: KP Update Session Response code: 400 Response message: {"headers":[],"body":"{\n \"error_code\" : \"BAD_VALUE\",\n \"error_messages\" : [ \"Bad value: order_amount\" ],\n \"correlation_id\" : \"e1b7b2ba-4ce2-49ec-9c90-d15ef3ad8b81\"\n}","response":{"code":400,"message":"Bad Request"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2023-02-02 02:12:49: KP Create Session Response code: 400 Response message: {"headers":[],"body":"{\n \"error_code\" : \"BAD_VALUE\",\n \"error_messages\" : [ \"Bad value: order_amount\" ],\n \"correlation_id\" : \"b4d41c29-4acf-4136-9317-dd79dac104e8\"\n}","response":{"code":400,"message":"Bad Request"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2023-02-02 02:12:20: KP Create Session Response code: 400 Response message: {"headers":[],"body":"{\n \"error_code\" : \"BAD_VALUE\",\n \"error_messages\" : [ \"Bad value: order_amount\" ],\n \"correlation_id\" : \"7bbbfe32-db53-4ae9-917f-49838871ef62\"\n}","response":{"code":400,"message":"Bad Request"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2023-02-02 02:12:20: KP Create Session Response code: 400 Response message: {"headers":[],"body":"{\n \"error_code\" : \"BAD_VALUE\",\n \"error_messages\" : [ \"Bad value: order_amount\" ],\n \"correlation_id\" : \"9cb3b95e-5ae1-4387-930a-296afc2f9981\"\n}","response":{"code":400,"message":"Bad Request"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2023-02-02 02:12:20: KP Update Session Response code: 400 Response message: {"headers":[],"body":"{\n \"error_code\" : \"BAD_VALUE\",\n \"error_messages\" : [ \"Bad value: order_amount\" ],\n \"correlation_id\" : \"529ebf3e-bad5-4e7a-b3c9-3144a59a6cd0\"\n}","response":{"code":400,"message":"Bad Request"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2023-02-02 02:05:55: KP Create Session Response code: 400 Response message: {"headers":[],"body":"{\n \"error_code\" : \"BAD_VALUE\",\n \"error_messages\" : [ \"Bad value: order_amount\" ],\n \"correlation_id\" : \"b67c697c-9307-42d8-b557-e6aac629cdcf\"\n}","response":{"code":400,"message":"Bad Request"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2023-02-02 02:05:30: KP Create Session Response code: 400 Response message: {"headers":[],"body":"{\n \"error_code\" : \"BAD_VALUE\",\n \"error_messages\" : [ \"Bad value: order_amount\" ],\n \"correlation_id\" : \"ee9a24de-8858-4cca-a22a-d8c54f4aebbe\"\n}","response":{"code":400,"message":"Bad Request"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2023-02-02 02:05:30: KP Create Session Response code: 400 Response message: {"headers":[],"body":"{\n \"error_code\" : \"BAD_VALUE\",\n \"error_messages\" : [ \"Bad value: order_amount\" ],\n \"correlation_id\" : \"1e177d42-179b-49d8-b6b4-b490d07c5452\"\n}","response":{"code":400,"message":"Bad Request"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2023-02-02 02:05:29: KP Create Session Response code: 400 Response message: {"headers":[],"body":"{\n \"error_code\" : \"BAD_VALUE\",\n \"error_messages\" : [ \"Bad value: order_amount\" ],\n \"correlation_id\" : \"44a380a2-2fcc-4942-85bc-054e1c62269f\"\n}","response":{"code":400,"message":"Bad Request"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2023-02-02 02:05:29: KP Create Session Response code: 400 Response message: {"headers":[],"body":"{\n \"error_code\" : \"BAD_VALUE\",\n \"error_messages\" : [ \"Bad value: order_amount\" ],\n \"correlation_id\" : \"47add626-bd56-45ad-b8c9-50ad4fc4fe83\"\n}","response":{"code":400,"message":"Bad Request"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2023-02-02 02:05:29: KP Create Session Response code: 400 Response message: {"headers":[],"body":"{\n \"error_code\" : \"BAD_VALUE\",\n \"error_messages\" : [ \"Bad value: order_amount\" ],\n \"correlation_id\" : \"16ad3a9b-6de4-4658-9b6c-0a8a60a470ce\"\n}","response":{"code":400,"message":"Bad Request"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: ### Klarna Countries ### Production Countries: US Test Countries: No countries selected ### WooCommerce PayPal Payments ### Onboarded: ?</img> Shop country code: US WooCommerce currency supported: ?</img> Advanced Card Processing available in country: ?</img> Pay Later messaging available in country: ?</img> Webhook status: – Vault enabled: ?</img> Logging enabled: – Reference Transactions: – Used PayPal Checkout plugin: – Tracking enabled: ?</img> ### Admin ### Enabled Features: activity-panels analytics coupons customer-effort-score-tracks experimental-products-task experimental-import-products-task experimental-fashion-sample-products shipping-smart-defaults shipping-setting-tour homescreen marketing multichannel-marketing mobile-app-banner navigation onboarding onboarding-tasks remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices woo-mobile-welcome wc-pay-promotion wc-pay-welcome-page Disabled Features: minified-js new-product-management-experience settings Daily Cron: ?</img> Next scheduled: 2023-02-03 08:01:29 -08:00 Options: ?</img> Notes: 46 Onboarding: completed ### Action Scheduler ### Canceled: 15 Oldest: 2023-01-31 22:03:58 -0800 Newest: 2023-01-31 22:03:58 -0800 Complete: 8,456 Oldest: 2023-01-04 00:12:03 -0800 Newest: 2023-02-02 06:57:03 -0800 Pending: 2 Oldest: 2023-02-03 00:42:03 -0800 Newest: 2023-02-03 20:27:03 -0800 ### Status report information ### Generated at: 2023-02-02 07:30:52 -08:00 `
Also, I don’t see any error related to shipstation on logs. Here’s the sample log https://prnt.sc/FFCe0rgn6CQm
Thanks!Hi there @dabert3
From what I gather, all the
meta_value
remain at 8oz, as showcased in this screenshot, while, after applying the hook, they should change to 16oz and 32oz, as showcased in this log. Correct?As I understand, the
meta_value
in the log, contains unsupported characters. Could you try removing all that is included in the<span>
tag and see if the issue persists, please?I trust that points you in the right direction, but if you have more questions, let us know. We’re happy to help.
Hey @anastas10s
Thanks for your response. I showed this showcased in this screenshot (screenshot) just to show you guys if the metakey ‘_Size’ is really exist. Yeah the Custom Field 2 in the Shipstation (shipstation.com) should have value both 16oz and 32oz OR either 16oz or 32oz.
Okay I tried to add a simple custom metakey “test_metadata_t” with value of “Hi” via woocommerce_checkout_create_order_shipping_item hook which is work and added it in the metadata when I test order. Here’s the code https://prnt.sc/je7zqS5k4CCV Here’s the data in database https://prnt.sc/8ViSRXsBSJol.
You can check on shipstation end here https://prnt.sc/P2Wq9_rnQIRE and the order thank you page https://rustitosdulces.com/checkout/order-received/9722/?key=wc_order_R9mby4RsimT3KNow the question is, why it didn’t show up in custom field 2 shipstation even I already added the hook woocommerce_shipstation_export_custom_field_2 (https://prnt.sc/je7zqS5k4CCV)? Did I miss something?
Thanks!Hi @dabert3
Please contact us at WooCommerce.com > My Account > Support. You may need to create an account before you can access that page.
Please include a link to this forum thread, so that we can keep track of what’s already been done.
We will be able to help you further there.
Hi there
The custom field hooks takes the order ID, but your data is stored against the order item.
Custom fields need to belong to the order, not the order item.
Using
woocommerce_checkout_create_order
to store your test meta data, should allow the data to show up on the ShipStation import.
- The topic ‘Custom Field hooks not working’ is closed to new replies.