• Hello! I installed the plugin, but when activating it and entering the payment settings (more specifically to the Management section of a payment method) the site generates a critical error

    I use the MercadoPago payment method, but the error also happens to me when using any other means of payment, be it cash or bank transfer.

    Error:
    PHP Fatal error: Uncaught Error: Unsupported operand types in /wp-content/plugins/woocommerce-pay-for-payment/inc/class-pay4pay-admin.php:233
    Stack trace: /wp-includes/class-wp-hook.php(287): Pay4Pay_Admin->add_payment_options(”)
    /wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
    #2 /wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #3 /wp-settings.php(562): do_action(‘wp_loaded’)
    #4 /wp-config.php(103): require_once(‘/home/c1311823/…’)
    #5 /wp-load.php(37): require_once(‘/home/c1311823/…’)
    #6 /wp-admin/admin.php(34): require_once(‘/home/c1311823/…’)
    #7 {main}
    thrown in /wp-content/plugins/woocommerce-pay-for-payment/inc/class-pay4pay-admin.php on line 233

    Help please!!

    —————————
    SYSTEM STATUS
    `
    ### WordPress Environment ###

    WordPress address (URL): https://digitalzone.com.ar
    Site address (URL): https://digitalzone.com.ar
    WC Version: 4.1.1
    REST API Version: ? 1.0.7
    WC Blocks Version: ? 2.5.16
    Action Scheduler Version: ? 3.1.6
    WC Admin Version: ? 1.1.3
    Log Directory Writable: ?
    WP Version: 5.4.1
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: –
    WP Cron: –
    Language: es_ES
    External object cache: –

    ### Server Environment ###

    Server Info: Apache
    PHP Version: 7.3.16
    PHP Post Max Size: 128 MB
    PHP Time Limit: 600
    PHP Max Input Vars: 3000
    cURL Version: 7.29.0
    NSS/3.44

    SUHOSIN Installed: –
    MySQL Version: 5.6.45-log
    Max Upload Size: 128 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?

    ### Database ###

    WC Database Version: 4.1.1
    WC Database Prefix: wp_
    Tama?o total de la base de datos: 13.50MB
    Tama?o de los datos de la base de datos: 11.14MB
    Tama?o del índice de la base de datos: 2.36MB

    ### Security ###

    Secure connection (HTTPS): ?

    ### Settings ###

    API Enabled: ?
    Force SSL: –
    Currency: ARS ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)

    ### Action Scheduler ###
    —————————

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Karolina Vyskocilova

    (@vyskoczilova)

    Hi,

    it’s likely to be caused with Mercadopago plugin – could you try it when the plugin is deactivated?

    Otherwise, do you know how to insert a line of code so we could see, what’s in there at the place where it fails?

    Into /wp-content/plugins/woocommerce-pay-for-payment/inc/class-pay4pay-admin.php before line 233 insert following line:

    var_dump($gateway);

    This will print out what is currently in the $gateway object (if it looks like WooCommerce one or is terribly custom). Thanks a lot!

    Thread Starter crowstdwp

    (@crowstdwp)

    Hello! Thanks for your quick response.

    I tried the line of code and my site “exploded”. See the link with the screenshot:
    https://bit.ly/2X8pIHB

    I tried with and without the MercadoPago plugin activated and in both cases the same thing happens.

    I read on some blog that it may be the use of symbols that could be causing the error.

    In line 233 it is expressed
    $ gateway-> form_fields + = $ form_fields;

    The “+” symbol is what would be wrong. If I delete it the site works, but the plugin does not appear. The option of discounts or increases of your plugin does not appear.

    Again, thanks for your time!
    Cheers

    I’m having another similar error but caused by MercadoPago (I think so).
    I’m using Woocommerce and when I pay with PAYPAL sandbox account I receive a fatal error in the register (everything is completed perfecly well but this appears in the status page.

    2020-05-27T20:05:54+00:00 CRITICAL Uncaught Error: Cannot instantiate abstract class WC_Gateway_PPEC in /home/finanint/public_html/tienda/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php:94
    Stack trace:
    #0 /home/finanint/public_html/tienda/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(70): WC_Payment_Gateways->init()
    #1 /home/finanint/public_html/tienda/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(43): WC_Payment_Gateways->__construct()
    #2 /home/finanint/public_html/tienda/wp-content/plugins/woocommerce/includes/class-woocommerce.php(826): WC_Payment_Gateways::instance()
    #3 /home/finanint/public_html/tienda/wp-content/plugins/woocommerce/includes/class-wc-api.php(139): WooCommerce->payment_gateways()
    #4 /home/finanint/public_html/tienda/wp-includes/class-wp-hook.php(287): WC_API->handle_api_requests(Object(WP))
    #5 /home/finanin en /home/finanint/public_html/tienda/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php en la línea 94

    If I deactivate the Mercadopago plugin, everything works great (without errors).
    The only plugins I have are “Woocommerce”, “Mercado Pago payments for WooCommerce”, “WooCommerce PayPal Checkout Gateway” and “WooCommerce Price Based on Country (Basic)”.
    Can you tell me if there is any configuration problem or the plugin has any bug?
    Regards

    —————————-
    SYSTEM STATUS

    Entorno WordPress
    Dirección de WordPress (URL): https://mentoringfinanciero.com/tienda
    Dirección del sitio (URL): https://mentoringfinanciero.com/tienda
    Versión de WooCommerce: 4.1.1
    Paquete de la REST API de WooCommerce: 1.0.7 /home/finanint/public_html/_mentoringfinanciero.com/tienda/wp-content/plugins/woocommerce/packages/woocommerce-rest-api
    Paquete WooCommerce Blocks: 2.5.16 /home/finanint/public_html/_mentoringfinanciero.com/tienda/wp-content/plugins/woocommerce/packages/woocommerce-blocks/
    Paquete del programador de acciones: 3.1.6 /home/finanint/public_html/_mentoringfinanciero.com/tienda/wp-content/plugins/woocommerce/packages/action-scheduler
    Paquete de WooCommerce Admin: 1.1.3 /home/finanint/public_html/_mentoringfinanciero.com/tienda/wp-content/plugins/woocommerce/packages/woocommerce-admin
    Directorio de registros con permiso de escritura: /home/finanint/public_html/_mentoringfinanciero.com/tienda/wp-content/uploads/wc-logs/
    Versión de WordPress: 5.4.1
    WordPress multisitio: –
    Límite de memoria de WordPress: 256 MB
    Modo de depuración de WordPress: –
    Cron de WordPress:
    Idioma: es_ES
    Caché externa de objetos: –
    Entorno del servidor
    Información del servidor: Apache
    Versión de PHP: 7.3.18
    PHP post max size: 128 MB
    PHP time limit: 90
    PHP max input vars: 1000
    Versión cURL: 7.70.0, OpenSSL/1.1.1g
    SUHOSIN Instalado: –
    Versión de MySQL: 5.7.30
    Tama?o máximo de subida: 128 MB
    Por defecto la zona horaria es GMT:
    fsockopen/cURL:
    SoapClient:
    DOMDocument:
    GZip:
    Cadena multibyte:
    Publicación remota:
    Obtención remota:
    Base de datos
    Versión de la base de datos de WordPress: 4.1.1
    Prefijo de la base de datos wptda_
    Tama?o total de la base de datos 1.10MB
    Tama?o de los datos de la base de datos 0.84MB
    Tama?o del índice de la base de datos 0.26MB
    wptda_woocommerce_sessions Datos: 0.03MB + índice: 0.00MB + Motor MyISAM
    wptda_woocommerce_api_keys Datos: 0.00MB + índice: 0.00MB + Motor MyISAM
    wptda_woocommerce_attribute_taxonomies Datos: 0.00MB + índice: 0.00MB + Motor MyISAM
    wptda_woocommerce_downloadable_product_permissions Datos: 0.00MB + índice: 0.00MB + Motor MyISAM
    wptda_woocommerce_order_items Datos: 0.00MB + índice: 0.00MB + Motor MyISAM
    wptda_woocommerce_order_itemmeta Datos: 0.01MB + índice: 0.01MB + Motor MyISAM
    wptda_woocommerce_tax_rates Datos: 0.00MB + índice: 0.00MB + Motor MyISAM
    wptda_woocommerce_tax_rate_locations Datos: 0.00MB + índice: 0.00MB + Motor MyISAM
    wptda_woocommerce_shipping_zones Datos: 0.00MB + índice: 0.00MB + Motor MyISAM
    wptda_woocommerce_shipping_zone_locations Datos: 0.00MB + índice: 0.00MB + Motor MyISAM
    wptda_woocommerce_shipping_zone_methods Datos: 0.00MB + índice: 0.00MB + Motor MyISAM
    wptda_woocommerce_payment_tokens Datos: 0.00MB + índice: 0.00MB + Motor MyISAM
    wptda_woocommerce_payment_tokenmeta Datos: 0.00MB + índice: 0.00MB + Motor MyISAM
    wptda_woocommerce_log Datos: 0.00MB + índice: 0.00MB + Motor MyISAM
    wptda_actionscheduler_actions Datos: 0.02MB + índice: 0.02MB + Motor MyISAM
    wptda_actionscheduler_claims Datos: 0.00MB + índice: 0.00MB + Motor MyISAM
    wptda_actionscheduler_groups Datos: 0.00MB + índice: 0.01MB + Motor MyISAM
    wptda_actionscheduler_logs Datos: 0.01MB + índice: 0.02MB + Motor MyISAM
    wptda_commentmeta Datos: 0.00MB + índice: 0.00MB + Motor MyISAM
    wptda_comments Datos: 0.01MB + índice: 0.01MB + Motor MyISAM
    wptda_links Datos: 0.00MB + índice: 0.00MB + Motor MyISAM
    wptda_options Datos: 0.68MB + índice: 0.04MB + Motor MyISAM
    wptda_postmeta Datos: 0.06MB + índice: 0.05MB + Motor MyISAM
    wptda_posts Datos: 0.02MB + índice: 0.01MB + Motor MyISAM
    wptda_termmeta Datos: 0.00MB + índice: 0.01MB + Motor MyISAM
    wptda_terms Datos: 0.00MB + índice: 0.01MB + Motor MyISAM
    wptda_term_relationships Datos: 0.00MB + índice: 0.00MB + Motor MyISAM
    wptda_term_taxonomy Datos: 0.00MB + índice: 0.00MB + Motor MyISAM
    wptda_usermeta Datos: 0.00MB + índice: 0.01MB + Motor MyISAM
    wptda_users Datos: 0.00MB + índice: 0.01MB + Motor MyISAM
    wptda_wc_admin_notes Datos: 0.00MB + índice: 0.00MB + Motor MyISAM
    wptda_wc_admin_note_actions Datos: 0.00MB + índice: 0.00MB + Motor MyISAM
    wptda_wc_category_lookup Datos: 0.00MB + índice: 0.00MB + Motor MyISAM
    wptda_wc_customer_lookup Datos: 0.00MB + índice: 0.01MB + Motor MyISAM
    wptda_wc_download_log Datos: 0.00MB + índice: 0.00MB + Motor MyISAM
    wptda_wc_order_coupon_lookup Datos: 0.00MB + índice: 0.00MB + Motor MyISAM
    wptda_wc_order_product_lookup Datos: 0.00MB + índice: 0.01MB + Motor MyISAM
    wptda_wc_order_stats Datos: 0.00MB + índice: 0.01MB + Motor MyISAM
    wptda_wc_order_tax_lookup Datos: 0.00MB + índice: 0.00MB + Motor MyISAM
    wptda_wc_product_meta_lookup Datos: 0.00MB + índice: 0.01MB + Motor MyISAM
    wptda_wc_tax_rate_classes Datos: 0.00MB + índice: 0.01MB + Motor MyISAM
    wptda_wc_webhooks Datos: 0.00MB + índice: 0.00MB + Motor MyISAM
    Contador de tipo de contenido
    attachment 5
    customize_changeset 1
    page 7
    post 2
    product 1
    revision 1
    shop_coupon 1
    shop_order 23
    shop_order_refund 1
    Seguridad
    Conexión segura (HTTPS):
    Ocultar errores a los visitantes
    Plugins activos (4)
    WooCommerce PayPal Checkout Gateway por WooCommerce – 2.0.1
    Mercado Pago payments for WooCommerce por Mercado Pago – 4.2.1
    WooCommerce Price Based on Country (Basic) por Oscar Gare – 2.0.7
    WooCommerce por Automattic – 4.1.1
    Plugins inactivos (0)
    Ajustes
    API activada: –
    Forzar SSL: –
    Moneda USD ($)
    Ubicación de la moneda left_space
    Separador de miles .
    Separador decimal ,
    Número de decimales 0
    Taxonomías: Tipos de producto external (external), grouped (grouped), simple (simple), variable (variable)
    Taxonomías: Visibilidad del producto 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)
    Conectado a WooCommerce.com: –
    Páginas de WooCommerce
    Base de la tienda: #6 – /tienda/
    Carrito: #7 – /carrito/
    Finalizar compra: #8 – /finalizar-compra/
    Mi cuenta: #9 – /mi-cuenta/
    Términos y condiciones: Página sin definir
    Tema
    Nombre: Storefront
    Versión: 2.5.6
    URL del autor: https://woocommerce.com/
    Tema hijo: – Si estás modificando WooCommerce en un tema padre que no has creado personalmente, te recomendamos utilizar un tema hijo. Ver: Cómo crear un tema hijo
    Compatible con WooCommerce:
    Plantillas
    Anulaciones: –
    Información de depuración de geolocalización
    Ubicación del cliente por defecto: geolocation
    Base de datos GeoIP de MaxMind:
    Licencia de MaxMind:
    MM_COUNTRY_CODE:
    GEOIP_COUNTRY_CODE:
    HTTP_CF_IPCOUNTRY:
    HTTP_X_COUNTRY_CODE:
    HTTP_X_REAL_IP:
    HTTP_X_FORWARDED_FOR:
    REMOTE_ADDR: 181.47.238.48
    IP externa real: 2800:810:44b:dd6:f459:4d7f:8b17:2425
    Const WCPBC_USE_REMOTE_ADDR: –
    Prueba de geolocalización:
    Price Based on Country Opciones generales
    Versión: 2.0.7
    Ubicación base: AR:C
    Moneda base: USD
    Precio basado en: shipping
    Envío: –
    Modo de prueba: –
    País de prueba: –
    Cargar el precio de los productos en segundo plano: –
    Precios con impuestos incluidos: –
    Calcular el impuesto basado en: shipping
    Mostrar los precios en la tienda: excl
    Precio de la zona: “ARG”
    zone_id: arg
    name: ARG
    countries: AR
    currency: ARS
    exchange_rate: 1
    auto_exchange_rate: no
    disable_tax_adjustment: no
    Programador de acciones
    Versión: 3.1.6
    Estado de la acción Contador Fecha programada más antigua Fecha programada más reciente
    Completo 87 2020-05-13 18:31:35 +0000 2020-05-27 19:23:29 +0000

    Plugin Author Karolina Vyskocilova

    (@vyskoczilova)

    Hi, guys,

    @crowstdwp,

    I’ve revised a part of code, could you either download pre-release version here: https://github.com/vyskoczilova/woocommerce-payforpayment/releases/tag/2.0.15.1

    or replace line 233
    $gateway->form_fields += $form_fields
    with
    $gateway->form_fields = array_merge($gateway->form_fields, $form_fields);
    See the diff here (the correct line should be highlighted):
    https://github.com/vyskoczilova/woocommerce-payforpayment/commit/2ce36d125dac2b9d433bd14c0a5b61890cba9501#diff-cc2c2aaeb49ba294d295881eb21d80fdR233

    Could you test and let me know?
    Your ‘exploded’ site helped ??

    @aleobaid sorry to say that, but you don’t use my plugin so I can’t help you out. Based on the code, it looks like something wrong is in WooCommerce plugin itself or it has trouble with your server configuration.

    Cheers,
    Karolina

    Thread Starter crowstdwp

    (@crowstdwp)

    Hello! Forgive me for the delay in my response.
    I tried the pre-release version and it works PERFECT !!!

    You’re the best!! It is solved, the plugin works successfully together with the MercadoPago plugin.

    What is missing now is that your plugin allows you to enter the minimum purchase amount to apply a certain discount. For example, my client wants to offer a 10% discount if the purchase exceeds $ 1000 of purchase.

    Thanks for your help!!

    Thread Starter crowstdwp

    (@crowstdwp)

    Sorry!! I was excited to see that it worked and when I tried it completely something was missing …

    When going to the MercadoPago payment gateway, the total does not include the adjustment.
    That is, it shows it in the total of the site with your plugin, but the payment amount on the gateway is not correct.

    I leave you some screenshots
    Plugin Working: https://bit.ly/3dhlpiz
    Error Gateway: https://bit.ly/2zIN5yq

    What should happen is that the total with the plugin is the final amount to be paid on the gateway.

    I hope you can solve
    Please save me

    Plugin Author Karolina Vyskocilova

    (@vyskoczilova)

    Hi @crowstdwp I’m sorry that it didn’t work completely, but that one will be hard.

    I assume that the “Error Gateway” is somewhere outside of your site at the payment gateway, right?

    Since it works right in the WooCommerce ecosystem, it looks like all is good, but somehow the payment gateway doesn’t take price with the fees added.

    Could you try to add another fee from the WooCommerce example and check if it’s passed to payment gateway? I think the first example would work just fine (you could change the percentage surcharge to something like 100% so you can see it on the first sign).

    https://docs.woocommerce.com/document/add-a-surcharge-to-cart-and-checkout-uses-fees-api/#section-1

    If it works, I’ll have a look at what’s wrong on my side. If it doesn’t it will be something to fix on Marcadopago plugin.

    Let me know!
    Karolina

    P.S. This is possible with custom code at the moment, but I’d like to release Pro version this year which would contain that:

    What is missing now is that your plugin allows you to enter the minimum purchase amount to apply a certain discount. For example, my client wants to offer a 10% discount if the purchase exceeds $ 1000 of purchase.

    Plugin Author Karolina Vyskocilova

    (@vyskoczilova)

    Hi @crowstdwp did you have time to look at that?
    Karolina

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘CRITICAL ERROR! Whit payment mode’ is closed to new replies.