Home Forums Plugins Custom Fields Ideas [Resolved] echo $output -> return $output

Welcome to our community support forums! We're here to help - but if you have an urgent request for a Pro Plugin, you will get a prioritised response through our Premium Support page.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #28325
    jcs
    Participant

    Hello!

    Everytime I update the plugin I have to change manually a line of code in /includes/release-3_8.php at line 303 (in wpsc_cf_value function):

    /* start CUSTOM  */
    //echo $output;
    return $output;
    /* end CUSTOM */

    I have to do this change because I made a custom template that uses do_shortcode to the $output of wpsc_cf_value function.

    Could be possible adding a function that *returns* the $output inseat of echoing it?

    I mean create something like:

    function wpsc_cf_value_return( $custom_field ) {
    // SAME code you have in wpsc_cf_value but changing last echo for a return.
    }

    (And, if you want, change your wpsc_cf_value function to something like :

    function wpsc_cf_value( $custom_field ) {
    echo wpsc_cf_value_return( $custom_field );
    }

    Thanks!

    #29461
    Michael Visser
    Keymaster

    Hi jcs, I’ve made the above changes to enable you to use wpsc_cf_get_value(), it’s in the latest release that just went out.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] echo $output -> return $output’ is closed to new replies.