0

I have to adapt Codeigniter module to Wordpress. It fetches data with SOAP protocol. It needs to use Codeigniter's csrf_protection.

How to include Codeigniter MY_Controller class in Wordpress?

class Balance extends MY_Controller
{

    public function __construct()
    {
        parent::__construct();

        $this->config->set_item('csrf_protection', TRUE);

        require_once('addons/libraries/nusoap/nusoap.php');

    }

    ...
1

1 Answer 1

2

You need to copy the methods in the nusoap file and try to make like other libraries setup in codeigniter library folder and then :

$this->load->library('nusoap/nusoap')

Nusoap is the class name which is in upper case letter start with and call in controller like above.

Or else you can find / download separate controller codeingiter library file from github

check it and mark accepted if it works!.

Thanks

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.