How to fix the payments of Mercado Pago with Learnpress

Article in Blog
learnpress mercadopago

When you update the Woocommerce, WordPress announces that the Mercado Pago payment has a conflict.

mercado pago

SOLUTION: 

Surely, you can fix that errors by hard code on plugin Mecardo Pago,

file: \wp-content\plugins\woocommerce-mercadopago\includes\module\preference\WC_WooMercadoPago_PreferenceAbstract. Then at the line 184 or around, find and replace

$product = new WC_product($item[‘product_id’]);
by
$product = wc_get_product($item[‘product_id’]);

That function doesn’t have any hook, so we can’t intervention to override.

Read more: LearnPress Payment Settings: The All-in-one tutorial