How to make shipment status translatable to other language.

By default the status added in the WPCargo General settings and it was save on the database.

To make it translatable we should change the status list in static.

To do that copy and paste this code in your function.php file in you theme.

// Note: This process we force change the default shipment status
add_action( 'after_setup_theme', function(){
	global $wpcargo;
	$static_status = array(
        __( 'Pending', 'textdomain' ),
        __( 'Picked up', 'textdomain' ),
        __( 'On Hold', 'textdomain' ),
        __( 'Out for delivery', 'textdomain' ),
        __( 'In Transit', 'textdomain' ),
        __( 'Enroute', 'textdomain' ),
        __( 'Cancelled', 'textdomain' ),
        __( 'Delivered', 'textdomain' ),
        __( 'Returned', 'textdomain' )
    );
	$wpcargo->status = $static_status;
}, 100);

After force change the shipment status with the static status, re run your translator to make the translation to take effect

0
    0
    Your Cart
    Your cart is emptyReturn to Shop