How to modify Shipping Rate Addon on the front end and Manage Shipments on Parcel quote through the backend
Shipping rate plugin provides hooks that allow us to customize its functionality. One of this is how to change the shipment type from shipping rate to other shipment type.
In this code we’ll change the shipping rate shipment type into parcel quotation shipment type.
Copy and paste this code to your theme functions.php file.
function my_update_shipment_type( $shipment_id, $form_data ){ // "parcel-quotation" is the value for the Parcel Quotation Shipment type update_post_meta( $shipment_id, '__shipment_type', 'parcel-quotation' ); } add_action( 'wpcsr_after_save_shipment', 'my_update_shipment_type', 11, 2 );