Support » Plugin: PayPal Brasil para WooCommerce » Ajax notice: Undefined index: person_type (Brazilian Market on WooCommerce)

  • Resolved zeinnicholas

    (@zeinnicholas)


    Olá,

    estou recebendo os seguintes avisos ao utilizar este plugin (PayPal Brasil para WooCommerce) em conjunto com o plugin “Brazilian Market on WooCommerce”:

    1.
    Ajax notice: Undefined index: person_type on line 533 in wp-content/plugins/paypal-brasil-para-woocommerce/includes/payment-methods/class-paypal-brasil-plus-gateway.php

    2.
    Ajax notice: Undefined index: person_type on line 14 in wp-content/plugins/paypal-brasil-para-woocommerce/includes/views/checkout/plus-html-fields.php

    Isso já acontece há algum tempo (desde as versões anteriores do Checkout Transparente do PayPal), e o motivo é por causa do nome errado referenciado para o campo de checkout, reconhecido pelo seu plugin como person_type, porém declarado no plugin do Claudio Sanches como billing_persontype.

    Isso não causa problemas visíveis nos sites utilizando ambos os plugins (ou seja, não impede a finalização do checkout), porém o carregamento do checkout demora mais pois fica procurando pelo campo por mais tempo, sem contar que não sei ao certo se isso causa algum problema na integração com a API do PayPal.

    Não é registrado nenhum erro no log.

    [Edit: Incluindo as configurações atuais do plugin Brazilian Market on WooCommerce]

    WooCommerce > Checkout Fields > Display Person Type: Individuals Only
    $settings['person_type'] === 2

    WooCommerce > Checkout Fields > Person Type is required only in Brazil?: Yes.
    $settings['only_brazil'] === true

    Ambiente:

    
    ### WordPress Environment ###
    
    WordPress address (URL): https://ppbr-test.local
    Site address (URL): https://ppbr-test.local
    WC Version: 3.7.1
    REST API Version: ✔ 1.0.2
    Log Directory Writable: ✔
    WP Version: 5.2.3
    WP Multisite: –
    WP Memory Limit: 512 MB
    WP Debug Mode: ✔
    WP Cron: ✔
    Language: pt_BR
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: nginx/1.16.0
    PHP Version: 7.3.6
    PHP Post Max Size: 1,000 MB
    PHP Time Limit: 1200
    PHP Max Input Vars: 4000
    cURL Version: 7.64.0
    OpenSSL/1.1.1b
    
    SUHOSIN Installed: –
    MySQL Version: 8.0.16
    Max Upload Size: 300 MB
    Default Timezone is UTC: ✔
    fsockopen/cURL: ✔
    SoapClient: ✔
    DOMDocument: ✔
    GZip: ✔
    Multibyte String: ✔
    Remote Post: ✔
    Remote Get: ✔
    
    ### Security ###
    
    Secure connection (HTTPS): ✔
    Hide errors from visitors: ✔
    
    ### Active Plugins (9) ###
    
    Query Monitor: by John Blackbourn – 3.4.0
    ARI Adminer: by ARI Soft – 1.2.3
    Astra Pro: by Brainstorm Force – 2.1.1
    Better Search Replace: by Delicious Brains – 1.3.3
    PayPal Brasil para WooCommerce: by PayPal – 1.0.2
    Claudio Sanches - Correios for WooCommerce: by Claudio Sanches – 3.8.0 – Not tested with the active version of WooCommerce
    Brazilian Market on WooCommerce: by Claudio Sanches – 3.7.2 – Not tested with the active version of WooCommerce
    WooCommerce: by Automattic – 3.7.1
    WP Crontrol: by John Blackbourn & crontributors – 1.7.1
    
    ### Inactive Plugins (5) ###
    
    Checkout Transparente do PayPal: by PayPal – 1.7 – Not tested with the active version of WooCommerce
    Claudio Sanches - PagSeguro for WooCommerce: by Claudio Sanches – 2.14.0 – Not tested with the active version of WooCommerce
    Health Check & Troubleshooting: by The WordPress.org community – 1.4.2
    Post SMTP: by Yehuda Hassine – 2.0.6
    WooCommerce PayPal Checkout Gateway: by WooCommerce – 1.6.17
    
    ### Settings ###
    
    API Enabled: ✔
    Force SSL: –
    Currency: BRL (R$)
    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: –
    
    ### WC Pages ###
    
    Shop base: #220282 - /modelos/
    Cart: #220285 - /sacola/
    Checkout: #220908 - /checkout/
    My account: #220287 - /minha-conta/
    Terms and conditions: #220303 - /termos-e-condicoes/
    
    ### Theme ###
    
    Name: Astra Floww
    Version: 1.0.0
    Child Theme: ✔
    Parent Theme Name: Astra
    Parent Theme Version: 2.1.1
    Parent Theme Author URL: https://wpastra.com/about/
    WooCommerce Support: ✔
    
    ### Templates ###
    
    Overrides: –
    
    ### Action Scheduler ###
    
    Complete: 0
    Oldest: –
    Newest: –
    
    Pending: 0
    Oldest: –
    Newest: –
    
    Canceled: 0
    Oldest: –
    Newest: –
    
    In-progress: 0
    Oldest: –
    Newest: –
    
    Failed: 0
    Oldest: –
    Newest: –
    
    

    Peço a gentileza de corrigir o código para eliminar este pequeno erro.

    Grato.

    • This topic was modified 4 months, 1 week ago by zeinnicholas.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.