Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter jaypreet

    (@jaypreet)

    please provide support.

    Thread Starter jaypreet

    (@jaypreet)

    Hello,

    Where to ass below code in which file and line. I am weak in coding and need guidance. I am using pro, and free version of your plugin.

    Thanks

    add_filter(‘wcv_orders_add_new_row’, function($new_row){
    if ( !class_exists( ‘WooCommerce_PDF_Invoices’ ) ) {
    return false;
    }
    $order_id = $new_row->order_number;
    $order = new WC_Order ( $order_id );

    $vendor_pdf_actions = array(
    ‘invoice’ => array (
    ‘class’ => ‘button tips wpo_wcpdf invoice’,
    ‘url’ => wp_nonce_url( admin_url( ‘admin-ajax.php?action=generate_wpo_wcpdf&template_type=invoice&order_ids=’ . $order->id ), ‘generate_wpo_wcpdf’ ),
    ‘label’ => sprintf( ‘‘, WooCommerce_PDF_Invoices::$plugin_url . ‘images/invoice.png’),
    ‘target’ => ‘_blank’
    ),
    ‘packing-slip’ => array (
    ‘class’ => ‘button tips wpo_wcpdf packing-slip’,
    ‘url’ => wp_nonce_url( admin_url( ‘admin-ajax.php?action=generate_wpo_wcpdf&template_type=packing-slip&order_ids=’ . $order->id ), ‘generate_wpo_wcpdf’ ),
    ‘label’ => sprintf( ‘‘, WooCommerce_PDF_Invoices::$plugin_url . ‘images/packing-slip.png’),
    ‘target’ => ‘_blank’
    ),
    );

    $new_row->row_actions = array_merge($new_row->row_actions, $vendor_pdf_actions);

    return $new_row;
    }, 10, 1);

    Hello Flash UK,

    I am weak in coding and cannot do anything without guidance. Please tell me where to enter this code which file and line.

    Also I have WC pro and do i need to have Woocommerce pdf invoices packaginf free version or premium version .

    Thanks for your guidance in advance.

    thanks

Viewing 3 replies - 1 through 3 (of 3 total)