Support » Plugin: WooCommerce » WC_Customer::set_postcode function is depreciated

  • Resolved inspired888

    (@inspired888)


    Hi there,
    I suspect this is a WC issue, on PHP 7.2.

    I see the following error in the error log.

    2018/04/04 16:43:19 [error] 32380#32380: *89903 FastCGI sent in stderr: “PHP message: The WC_Customer::set_postcode function is deprecated since version 3.0. Replace with WC_Customer::set_billing_postcode” while reading response header from upstream, client: 125.236.177.225, server: http://www.SANITISED.com.au, request: “POST /wp-admin/admin-ajax.php HTTP/2.0”, upstream: “fastcgi://unix:/run/php/php7.2-fpm.sock:”, host: “www.SANITISED.com.au”, referrer: “https://www.SANITISED.com.au/product-category/earrings/”

    In this particular instance, I traced it occurring when adding a product to the cart.

    When loading the checkout page, it occurs in this form:

    2018/04/04 16:44:50 [error] 32380#32380: *89903 FastCGI sent in stderr: “PHP message: The WC_Customer::set_postcode function is deprecated since version 3.0. Replace with WC_Customer::set_billing_postcode” while reading response header from upstream, client: 125.236.177.225, server: http://www.SANITISED.com.au, request: “POST /wp-admin/admin-ajax.php HTTP/2.0”, upstream: “fastcgi://unix:/run/php/php7.2-fpm.sock:”, host: “www.SANITISED.com.au”, referrer: “https://www.SANITISED.com.au/quote-invoice-request/”
    2018/04/04 16:44:50 [error] 32380#32380: *89903 FastCGI sent in stderr: “PHP message: The WC_Customer::set_postcode function is deprecated since version 3.0. Replace with WC_Customer::set_billing_postcode” while reading response header from upstream, client: 125.236.177.225, server: http://www.SANITISED.com.au, request: “POST /?wc-ajax=update_order_review HTTP/2.0”, upstream: “fastcgi://unix:/run/php/php7.2-fpm.sock:”, host: “www.SANITISED.com.au”, referrer: “https://www.SANITISED.com.au/quote-invoice-request/”

    
    ### WordPress Environment ###
    
    Home URL: http://www.SANITISED.com.au
    Site URL: http://www.SANITISED.com.au
    WC Version: 3.3.4
    Log Directory Writable: ✔
    WP Version: 4.9.4
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: –
    WP Cron: –
    Language: en_AU
    
    ### Server Environment ###
    
    Server Info: nginx/1.13.6
    PHP Version: 7.2.3-1+ubuntu16.04.1+deb.sury.org+1
    PHP Post Max Size: 32 MB
    PHP Time Limit: 90
    PHP Max Input Vars: 1000
    cURL Version: 7.47.0
    OpenSSL/1.0.2g
    
    SUHOSIN Installed: –
    Max Upload Size: 32 MB
    Default Timezone is UTC: ✔
    fsockopen/cURL: ✔
    SoapClient: ❌ Your server does not have the SoapClient class enabled - some gateway plugins which use SOAP may not work as expected.
    DOMDocument: ✔
    GZip: ✔
    Multibyte String: ✔
    Remote Post: ✔
    Remote Get: ✔
    
    ### Database ###
    
    WC Database Version: 3.3.4
    WC Database Prefix: wpgram_
    MaxMind GeoIP Database: ✔
    Total Database Size: 33.82MB
    Database Data Size: 24.12MB
    Database Index Size: 9.70MB
    wpgram_woocommerce_sessions: Data: 0.01MB + Index: 0.00MB
    wpgram_woocommerce_api_keys: Data: 0.00MB + Index: 0.00MB
    wpgram_woocommerce_attribute_taxonomies: Data: 0.00MB + Index: 0.00MB
    wpgram_woocommerce_downloadable_product_permissions: Data: 0.00MB + Index: 0.00MB
    wpgram_woocommerce_order_items: Data: 0.00MB + Index: 0.01MB
    wpgram_woocommerce_order_itemmeta: Data: 0.03MB + Index: 0.03MB
    wpgram_woocommerce_tax_rates: Data: 0.00MB + Index: 0.01MB
    wpgram_woocommerce_tax_rate_locations: Data: 0.00MB + Index: 0.00MB
    wpgram_woocommerce_shipping_zones: Data: 0.00MB + Index: 0.00MB
    wpgram_woocommerce_shipping_zone_locations: Data: 0.00MB + Index: 0.00MB
    wpgram_woocommerce_shipping_zone_methods: Data: 0.00MB + Index: 0.00MB
    wpgram_woocommerce_payment_tokens: Data: 0.00MB + Index: 0.00MB
    wpgram_woocommerce_payment_tokenmeta: Data: 0.00MB + Index: 0.00MB
    wpgram_woocommerce_log: Data: 0.00MB + Index: 0.00MB
    wpgram_commentmeta: Data: 0.00MB + Index: 0.00MB
    wpgram_comments: Data: 0.01MB + Index: 0.01MB
    wpgram_email_log: Data: 0.40MB + Index: 0.00MB
    wpgram_links: Data: 0.00MB + Index: 0.00MB
    wpgram_options: Data: 7.38MB + Index: 0.17MB
    wpgram_pmxe_exports: Data: 0.00MB + Index: 0.00MB
    wpgram_pmxe_google_cats: Data: 0.26MB + Index: 0.05MB
    wpgram_pmxe_posts: Data: 0.00MB + Index: 0.00MB
    wpgram_pmxe_templates: Data: 0.00MB + Index: 0.00MB
    wpgram_pmxi_files: Data: 0.00MB + Index: 0.00MB
    wpgram_pmxi_history: Data: 0.00MB + Index: 0.00MB
    wpgram_pmxi_imports: Data: 0.00MB + Index: 0.00MB
    wpgram_pmxi_posts: Data: 0.00MB + Index: 0.00MB
    wpgram_pmxi_templates: Data: 0.00MB + Index: 0.00MB
    wpgram_postmeta: Data: 13.14MB + Index: 8.35MB
    wpgram_posts: Data: 2.11MB + Index: 0.65MB
    wpgram_rm_fields: Data: 0.01MB + Index: 0.00MB
    wpgram_rm_forms: Data: 0.00MB + Index: 0.00MB
    wpgram_rm_front_users: Data: 0.00MB + Index: 0.00MB
    wpgram_rm_notes: Data: 0.00MB + Index: 0.00MB
    wpgram_rm_paypal_fields: Data: 0.00MB + Index: 0.00MB
    wpgram_rm_paypal_logs: Data: 0.00MB + Index: 0.00MB
    wpgram_rm_rules: Data: 0.00MB + Index: 0.00MB
    wpgram_rm_sent_mails: Data: 0.00MB + Index: 0.00MB
    wpgram_rm_sessions: Data: 0.00MB + Index: 0.01MB
    wpgram_rm_stats: Data: 0.00MB + Index: 0.00MB
    wpgram_rm_submissions: Data: 0.00MB + Index: 0.00MB
    wpgram_rm_submission_fields: Data: 0.00MB + Index: 0.00MB
    wpgram_rm_tasks: Data: 0.00MB + Index: 0.00MB
    wpgram_rm_task_exe_log: Data: 0.00MB + Index: 0.00MB
    wpgram_termmeta: Data: 0.00MB + Index: 0.01MB
    wpgram_terms: Data: 0.00MB + Index: 0.01MB
    wpgram_term_relationships: Data: 0.15MB + Index: 0.28MB
    wpgram_term_taxonomy: Data: 0.00MB + Index: 0.01MB
    wpgram_UPCP_Catalogues: Data: 0.00MB + Index: 0.00MB
    wpgram_UPCP_Catalogue_Items: Data: 0.00MB + Index: 0.00MB
    wpgram_UPCP_Categories: Data: 0.00MB + Index: 0.00MB
    wpgram_UPCP_Custom_Fields: Data: 0.00MB + Index: 0.00MB
    wpgram_UPCP_Fields_Meta: Data: 0.00MB + Index: 0.00MB
    wpgram_UPCP_Items: Data: 0.00MB + Index: 0.00MB
    wpgram_UPCP_Item_Images: Data: 0.00MB + Index: 0.00MB
    wpgram_UPCP_SubCategories: Data: 0.00MB + Index: 0.00MB
    wpgram_UPCP_Tagged_Items: Data: 0.00MB + Index: 0.00MB
    wpgram_UPCP_Tags: Data: 0.00MB + Index: 0.00MB
    wpgram_UPCP_Tag_Groups: Data: 0.00MB + Index: 0.00MB
    wpgram_UPCP_Videos: Data: 0.00MB + Index: 0.00MB
    wpgram_usermeta: Data: 0.03MB + Index: 0.02MB
    wpgram_users: Data: 0.00MB + Index: 0.01MB
    wpgram_wc_download_log: Data: 0.00MB + Index: 0.00MB
    wpgram_wc_webhooks: Data: 0.00MB + Index: 0.00MB
    wpgram_woof_query_cache: Data: 0.00MB + Index: 0.00MB
    wpgram_xcloner_scheduler: Data: 0.02MB + Index: 0.00MB
    wpss_commentmeta: Data: 0.00MB + Index: 0.00MB
    wpss_comments: Data: 0.00MB + Index: 0.01MB
    wpss_links: Data: 0.00MB + Index: 0.00MB
    wpss_options: Data: 0.57MB + Index: 0.01MB
    wpss_postmeta: Data: 0.00MB + Index: 0.01MB
    wpss_posts: Data: 0.00MB + Index: 0.01MB
    wpss_termmeta: Data: 0.00MB + Index: 0.00MB
    wpss_terms: Data: 0.00MB + Index: 0.01MB
    wpss_term_relationships: Data: 0.00MB + Index: 0.00MB
    wpss_term_taxonomy: Data: 0.00MB + Index: 0.00MB
    wpss_usermeta: Data: 0.00MB + Index: 0.01MB
    wpss_users: Data: 0.00MB + Index: 0.01MB
    
    ### Post Type Counts ###
    
    acf: 2
    attachment: 1185
    custom_css: 1
    customize_changeset: 24
    nav_menu_item: 38
    page: 22
    post: 11
    postman_sent_mail: 75
    product: 1181
    product_variation: 5260
    revision: 135
    shop_coupon: 1
    shop_order: 36
    sliced_invoice: 8
    sliced_quote: 17
    wpcf7_contact_form: 1
    
    ### Security ###
    
    Secure connection (HTTPS): ❌Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates.
    Hide errors from visitors: ✔
    
    ### Active Plugins (26) ###
    
    ACF for Woocommerce: by Cat's Plugins – 3.2.5 – Not tested with the active version of WooCommerce
    Advanced Custom Fields: by Elliot Condon – 4.4.12
    Better Plugin Compatibility Control: by Oliver Schlöbe – 4.9.0
    Booster Plus for WooCommerce: by Algoritmika Ltd – 3.4.5
    Conditional Tags Shortcode: by Hassan Derakhshandeh – 0.2
    Contact Form 7: by Takayuki Miyoshi – 5.0.1
    Divi Booster: by Dan Mossop – 2.7.1
    Email Log: by Sudar – 2.2.5
    Envato Market: by Envato – 2.0.0
    Health Check: by The WordPress.org community – 1.0.1
    If Menu: by Layered – 0.8.3
    Post SMTP: by Jason Hendriks
    Yehuda Hassine – 1.8.3
    
    Server Status: by LittleBizzy – 1.2.9
    Sliced Invoices: by Sliced Invoices – 3.7.1
    Temporary Login Without Password: by StoreApps – 1.5.6
    TinyMCE Advanced: by Andrew Ozz – 4.6.7
    UpdraftPlus - Backup/Restore: by UpdraftPlus.Com
    DavidAnderson – 1.14.4
    
    Widget Logic: by wpchefgadget
    alanft – 5.9.0
    
    Woo Invoices: by Sliced Invoices – 1.1.1
    Booster for WooCommerce: by Algoritmika Ltd – 3.4.5
    WooCommerce Product Table: by Barn2 Media – 2.1.2
    WooCommerce WooList Pro: by Festi Team – 2.5.1 – Not tested with the active version of WooCommerce
    WooCommerce Xero Integration: by WooCommerce – 1.7.10
    WooCommerce: by Automattic – 3.3.4
    WP Crontrol: by John Blackbourn & contributors – 1.6.2
    WP Server Stats: by Saumya Majumder – 1.6.0
    
    ### Settings ###
    
    API Enabled: ✔
    Force SSL: ✔
    Currency: AUD ($)
    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)
    
    ### WC Pages ###
    
    Shop base: #14 - /products/
    Cart: #26 - /cart/
    Checkout: #27 - /quote-invoice-request/
    My account: #28 - /my-account/
    Terms and conditions: #651 - /site-policies/
    
    ### Theme ###
    
    Name: SANITISED
    Version: 1.0
    Author URL: 
    Child Theme: ✔
    Parent Theme Name: Divi
    Parent Theme Version: 3.0.106
    Parent Theme Author URL: http://www.elegantthemes.com
    WooCommerce Support: ✔
    
    ### Templates ###
    
    Overrides: SANITISED/woocommerce/archive-product.php
    

    I am not willing to post potentially site/server sensitive information to a public forum. But I am happy to provide the domain name, if required, by email.

    Thanks.

    Jonathan

    • This topic was modified 1 year, 7 months ago by inspired888.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Joel Williams

    (@joelwills)

    Automattic Happiness Engineer

    Hi Jonathan!

    A lot or deprecated notices come from functions included for backwards compatibility. So often it’s not a problem as such. If you turn off all plugins except WooCommerce and then switch to a default theme does it still appear?

    It’s unlikely as that message is coming from WooCommerce, so then you can re-enable the theme and plugin one by one to see which one is outputting the message.

    As mentioned, it may be perfectly OK that it’s there for backwards compatibility.

    Plugin Support Joel Williams

    (@joelwills)

    Automattic Happiness Engineer

    Hi there!

    There hasn’t been a reply for a while so I’m going to close this ticket.

    If you’re still having problems please open a new ticket, thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WC_Customer::set_postcode function is depreciated’ is closed to new replies.