additional_service = $additional_service; } /** * . * * @param stdClass $shipment_data . * * @return stdClass * @throws WPDesk_Paczkomaty_ShipX_Exception . */ public function modify_shipment_data( $shipment_data ) { if ( WPDesk_Flexible_Shipping_Shipment_Paczkomaty::SERVICE_KURIER === $this->shipment->get_inpost_service() ) { if ( intval( $this->shipment->get_meta( $this->meta_name, '0' ) ) === 1 ) { if ( ! isset( $shipment_data->additional_services ) ) { $shipment_data->additional_services = array(); } $shipment_data->additional_services[] = $this->additional_service; } } return $shipment_data; } }