Support » Fixing WordPress » How to use another plugin's functions in my theme functions.php?

  • Hello,

    How can i use a plugin’s function from my theme functions.php, at the moment i have

    function test_totals(){
        require_once(WP_PLUGIN_URL . '/wp-e-commerce-style-email/mail.class.php');
        return "Total, please ".ecse_get_the_totals();
    }

    But i get a Fatal error: Call to undefined function ecse_get_the_totals()?

    Any suggestions?

Viewing 1 replies (of 1 total)
  • esmi

    (@esmi)

    Forum Moderator

    Have you tried asking the plugin’s developer?

    a more elegant way of implementing the above code so that the site doesn’t collapse would be to use:

    function test_totals(){
        if(function_exists( 'ecse_get_the_totals' ) ) return "Total, please ".ecse_get_the_totals();
    }
Viewing 1 replies (of 1 total)
  • The topic ‘How to use another plugin's functions in my theme functions.php?’ is closed to new replies.