HOW TO Insert Existing PHP Code to WOrdPress

Generally speaking, you can typically take PHP code and place a comment at the top:

<?php
/* Plugin Name: My SOAP Plugin
*/
?>

You can then create a folder for the plugin inside /wp-content/plugins/ (for example, /wp-conten/plugins/my-soap-plugin/) and place the PHP file inside that folder. At that point, you can activate the plugin from wp-admin.

Depending on what specifically the PHP file does, it may need editing. For example, if it refers to any specific paths on a server, you’ll need to adjust those as you almost certainly didn’t have the file inside of a /wp-content/plugins/ folder before. Other changes will likely be needed – for example, you’ll have to figure out what to do with the SOAP data – show it on a new admin screen? Display it on the front end for logged-in users associated with that data? – so it might require a significant amount of development work.