Replace Appointments+ ID with better description in pdf invoice

Hi

Please see attached screenshots for problem. Basically when I make an appointment on my site (using Appointments+) I have ensured the order looks like this

SERVICE, SERVICE PROVIDER, START TIME in the shopping cart

Unfortunately on the invoice sent by marketpress it shows as

SERVICE, APPOINTMENT ID

I don’t want it to show the APPOINTMENT ID it’s confusing and not much use. I want it to instead display as I’m setting it up in appointments. SERVICE, SERVICE PROVIDER and START TIME

Many Thanks

Kieran

  • Kieran
    • The Crimson Coder

    Hi Vinod.

    Thanks for the help.

    I can see the Appointment ID is now removed but can I have the SERVICE PROVIDER and START TIME added in please. I jsut want it to match what I put into the settings in Appointments and exactly how it shows in the cart

    Kind Regards

    Kieran

    Kind Regards

    Kieran

  • Vinod Dalvi
    • WP Unicorn

    Hi Kieran,

    To make it work like this, Would you mind if I access your site and did some testing? This might help get to the bottom of this faster. If this is ok, just send log in info through our secured contact form: https://premium.wpmudev.org/contact/

    – Choose “I have a different question”

    – Include my name in the subject “Vinod Dalvi”

    – Include the URL of this post in your message so that I may track this issue better

    – Include login information (WordPress admin info username + password )

    – Include FTP Details

    Regards,

    Vinod Dalvi

  • Vinod Dalvi
    • WP Unicorn

    Hi Kieran,

    Thank you for sending the site details.

    I could make it work by changing the code in the shared quick plugin as following.

    function mp_product_custom_title( $name, $this2 ) {

    global $appointments;
    $_core = $appointments;
    $product_id = $this2->_post->ID;
    $product = get_post( $product_id );
    $var_names = get_post_meta( $product_id, 'mp_var_name', true );
    //if ( is_array( $var_names ) ){

    list( $app_title, $app_id ) = split( ':', $name );
    if ( $app_id ) {
    global $wpdb;
    $result = $_core->get_app( $app_id );
    if ( $result ) {
    $name = $name . " (". date_i18n( $_core->datetime_format, strtotime( $result->start ) ) . ")";
    $name = apply_filters( 'app_mp_product_name_in_cart', $name, $_core->get_service_name( $result->service ), $_core->get_worker_name( $result->worker ), $result->start, $result );
    }
    //}
    }
    return $name;
    }

    add_filter( 'mp_product/title', 'mp_product_custom_title', 10, 2);

    Could you please check it and let me know hoe it works for you?

    Best Regards,

    Vinod Dalvi

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.