Shipping cost is not including in paypal express checkout in wordpress woocommerce

Solution:

The only way to do this is to edit the actual code in the plugi files woocommerce-gateway-paypal-express.php, Basically what I did was use the cart->get_cart_shipping_total() from the file. Unfortunately it comes formatted with html so I had to just explode out a couple things, I”ve included the code below.

$shipping = WC_PayPal_Express_Compatibility::WC()->cart->get_cart_shipping_total();
$shippingarray = explode(";", $shipping);
$shippingarray = explode("</span>", $shippingarray[1]);
$shippingamt = str_replace("_",".", $shippingarray[0]);
$nvpstr .= "&PAYMENTREQUEST_0_SHIPPINGAMT=" . $shippingamt;

Then you also have to edit the total amount line as well to:

$nvpstr .= "&PAYMENTREQUEST_0_AMT="     . number_format($order_total + $shippingamt, 2