How to use another plugin's functions in my theme functions.php? (2 posts)

  1. DDT
    Posted 2 years ago #


    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?

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    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();

Topic Closed

This topic has been closed to new replies.

About this Topic