Support » Plugin: PPOM for WooCommerce » Show meta title instead of meta data

  • Resolved Nellybongo

    (@nellybongo)


    Hi Najeeb,

    I was hoeing you really could help me with this one, I use WooCommerce PDF Invoices (Bas Elbers) for sending the invoice to the customer, but when I use PPOM with this it only shows the meta data name not meta title, like this,

    included_initials__white_2frb

    I need it to show the title like this

    Included Initials – White – 2FRB

    So as mentioned its showing the data name instead of the title on the invoice, can I change this with a quick function?

    Many thanks Neil

Viewing 2 replies - 1 through 2 (of 2 total)
  • Nellybongo

    (@nellybongo)

    Hi Najeeb,

    Just to add, if this helps, I can see this section in the invoice template, could I change this?

    // Get attribute data.
    if ( taxonomy_exists( wc_sanitize_taxonomy_name( $meta[‘meta_key’] ) ) ) {
    $term = get_term_by( ‘slug’, $meta[‘meta_value’], wc_sanitize_taxonomy_name( $meta[‘meta_key’] ) );
    $meta[‘meta_key’] = wc_attribute_label( wc_sanitize_taxonomy_name( $meta[‘meta_key’] ) );
    $meta[‘meta_value’] = isset( $term->name ) ? $term->name : $meta[‘meta_value’];
    } else {
    $meta[‘meta_key’] = apply_filters( ‘woocommerce_attribute_label’, wc_attribute_label( $meta[‘meta_key’], $product ), $meta[‘meta_key’] );
    }

    echo ‘<div class=”item-attribute”><span style=”font-weight: bold;”>’ . wp_kses_post( rawurldecode( $meta[‘meta_key’] ) ) . ‘: </span>’ . wp_kses_post( rawurldecode( $meta[‘meta_value’] ) ) . ‘</div>’;
    }

    Plugin Author N-Media

    (@nmedia)

    Hi @nellybongo,

    PPOM is compatible with WooCommerce PDF Invoice & Packing plugin, and we also have our PPOM PDF Add-on to export PPOM fields.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.