campaignmonitor / createsend-php

A PHP library for the Campaign Monitor API
http://campaignmonitor.github.io/createsend-php
Other
285 stars 106 forks source link

Composer autoloader not finding csrest_campaigns.php #80

Open v3nt opened 6 years ago

v3nt commented 6 years ago

I've used composer to install CM API but the theme can't see the API.

in content-signup-cm.php I've added require_once 'csrest_campaigns.php'

And that returns

Fatal error: require_once(): Failed opening required 'csrest_campaigns.php' (include_path='.:/Applications/MAMP/bin/php/php7.2.7/lib/php') in /wp-content/themes/wonkhe2-theme/templates/content-signup-cm.php on line 5

I can see the API here - /wp-content/themes/wonkhe2-theme/vendor/campaign-monitor/createsend-php/

Should the require_once path be different? I thought autoloader would set the paths? Using composer is new to me so apologies if I'm misunderstanding.