@sabakhurrum Please use the attached code in theme functions.php file to disable wallet partial payment if shipping method is flat rate.
add_filter( 'woo_wallet_disable_partial_payment', 'woo_wallet_disable_partial_payment_callback', 10, 1 );
if ( ! function_exists( 'woo_wallet_disable_partial_payment_callback' ) ) {
function woo_wallet_disable_partial_payment_callback( $is_disabled ) {
$chosen_methods = WC()->session->get( 'chosen_shipping_methods' );
$chosen_shipping = $chosen_methods[0];
if ( 0 === strpos( $chosen_shipping, 'flat_rate' ) ) {
$is_disabled = true;
}
return $is_disabled;
}
}
add_filter( 'woo_wallet_partial_payment_amount', 'woo_wallet_partial_payment_amount_callback', 10, 1 );
if ( ! function_exists( 'woo_wallet_partial_payment_amount_callback' ) ) {
function woo_wallet_partial_payment_amount_callback( $amount ) {
$chosen_methods = WC()->session->get( 'chosen_shipping_methods' );
$chosen_shipping = $chosen_methods[0];
if ( 0 === strpos( $chosen_shipping, 'flat_rate' ) ) {
$amount = 0;
}
return $amount;
}
}