Hello,
Today I updated my website to the latest version of XStore and XStore core.
Now I’m having some issues with a custom functions.php code, that I was using to hide one of the payment methods with certain shipping methods.
This piece of code was:
add_filter( 'woocommerce_available_payment_gateways', 'payment_gateways_based_on_chosen_shipping_method' );
function payment_gateways_based_on_chosen_shipping_method( $available_gateways ) {
// Not in backend (admin) and Not in order pay page
if( is_admin() || is_wc_endpoint_url('order-pay') )
return $available_gateways;
// Get chosen shipping methods
$chosen_shipping_methods = (array) WC()->session->get( 'chosen_shipping_methods' );
if ( in_array( 'flexible_shipping_single:28', $chosen_shipping_methods ) )
{
unset( $available_gateways['przelewy24'] );
}
elseif ( in_array( 'flexible_shipping_single:29', $chosen_shipping_methods ) )
{
unset( $available_gateways['przelewy24'] );
}
return $available_gateways;
}
After the update I had to comment it out, because it started giving “internal error” message after trying to pay with this “przelewy24” payment method.
Could you verify it?
Site URL: hidden Theme version: 9.1.4 WooCommerce version: 7.7.0Hello, Basshunterek,
Thank you for contacting us and for using XStore.
We can see several issues with third-party plugins, and an error log file has been attached – https://we.tl/t-1xOAeYOdSt
Please try to reproduce the error without using third-party plugins and with a default WP theme.
In any case, we are not responsible for any third-party customizations, sorry.
Kind Regards,
8theme team
You must be logged in to reply to this topic.Log in/Sign up
One standard license is valid only for 1 project. Running multiple projects on a single license is a copyright violation.