I have recently started writing a plugin for the woocommerce, and everything worked flawlessly before I tried to hook the extension to the system.
I have a following code inside my class.
function add_gateway($methods)
{
$methods[] = 'Rentalbloom_WSPay';
return $methods;
}
add_filter('woocommerce_payment_gateways', 'add_gateway');
Class has constructor defined as a public function __contruct()
so it shouldn't have problems with the access, but when I try to run this I get the following error.
Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION
and the error points to the add_filter line written above.
I don't know if this is relevant, but I'm using a PHP version 5.3 on the APMPPS stack on the OS X.
Aucun commentaire:
Enregistrer un commentaire