eileenmcnaughton / nz.co.fuzion.civitoken

Fuzion Token extension for CiviCRM
Other
11 stars 28 forks source link

'Civi\Token\CiviTokens' does not have a method 'evaluateTokens' #59

Open masetto opened 2 years ago

masetto commented 2 years ago

I have this PHP warning:

Warning: call_user_func() expects parameter 1 to be a valid callback, class 'Civi\Token\CiviTokens' does not have a method 'evaluateTokens' in `...wp-content/plugins/civicrm/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php on line 214

I think evaluateTokens function is missing in Civi/Token/CiviTokens.php...

eileenmcnaughton commented 2 years ago

opps yeah - I haven't updated this code for a bit - adding that would get rid of the php warning - although it really could do with a more thorough cleanup/overhaul

eileenmcnaughton commented 2 years ago

I just pushed up a patch that adds that function - and otherwise switches CiviToken to no longer use the old deprecated hooks

masetto commented 2 years ago

Great! Thank you @eileenmcnaughton

In your opinion, in order to add soft credit tokens using the new Token Processor context (I need the soft_credit_amount), is it useful to insert them in this extension or to intervene in the Soft Credit Tokens extension? Now I believe that all tokens work on the contactId context and not on the contributionId. See my question here

eileenmcnaughton commented 2 years ago

@MegaphoneJon might be better placed to answer that ? I don't have a problem with them being added to this extension

All the tokens in THIS extension work on the contact id - but it isn't hard these days to add to the other entities