Home Forums WoodMart support forum gpay in checkout page Reply To: gpay in checkout page

#519075

fcoerezza
Participant

Hi support,
I followed what written in the link sent, and I add the following to the function.php of the child theme:

remove_action( ‘woocommerce_checkout_before_customer_details’, array( WC_Stripe_Payment_Request::instance(), ‘display_payment_request_button_html’ ), 1 ); //removes the button
remove_action( ‘woocommerce_checkout_before_customer_details’, array( WC_Stripe_Payment_Request::instance(), ‘display_payment_request_button_separator_html’ ), 2 ); // removes the separator under button

add_action( ‘woocommerce_review_order_before_payment’, array( WC_Stripe_Payment_Request::instance(), ‘display_payment_request_button_html’ ), 1 ); // adds the button before payments
add_action( ‘woocommerce_review_order_before_payment’, array( WC_Stripe_Payment_Request::instance(), ‘display_payment_request_button_separator_html’ ), 2 ); // adds separator before payments after button

Immediately after the website crashed with this error:

Dettagli dell’errore
====================
Un errore di E_ERROR รจ stato causato nella linea 216 del file /home/staging/public_html/wp-content/themes/woodmart-child/functions.php. Messaggio di errore: Uncaught Error: Class “WC_Stripe_Payment_Request” not found in /home/staging/public_html/wp-content/themes/woodmart-child/functions.php:216
Stack trace:
#0 /home/staging/public_html/wp-settings.php(611): include()
#1 /home/staging/public_html/wp-config.php(87): require_once(‘…’)
#2 /home/staging/public_html/wp-load.php(50): require_once(‘…’)
#3 /home/staging/public_html/wp-admin/admin.php(34): require_once(‘…’)
#4 /home/staging/public_html/wp-admin/plugins.php(10): require_once(‘…’)
#5 {main}
thrown

Of course I immediately deleted the code, but a problem still persists when I access to the product data. see image attached.
I also tried to switch the theme to the main one and disable all plugins, but the problem is always present.

Please help, as I do not know what to do more.
I add also admin credentials and the recovery mode link

Attachments:
You must be logged in to view attached files.