• Resolved ayrpin

    (@ayrpin)


    I have added the following code that I have seen in some other ticket but I still get error 200: parsererror

    /** * PDF Invoices & Packing Slips for WooCommerce: * Incluye el NIF en los documentos PDF */ add_filter( ‘wpo_wcpdf_billing_address’, function( $address, $document ) { if ( ( $order = $document->order ) && ( $nif = $order->get_meta( ‘NIF’ ) ) ) { $address .= sprintf( ‘<p>CIF/DNI/NIE: %s</p>’, $nif ); } return $address; }, 10, 2 );

    thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor dwpriv

    (@dwpriv)

    Could you share the error you’re getting, please?

    Thread Starter ayrpin

    (@ayrpin)

    I add here a screenshot of the error in the control panel

    https://www.dropbox.com/t/JRIvHBFzsDUaNUDQ

    Thanks

    Plugin Contributor dwpriv

    (@dwpriv)

    Try replacing your snippet with this one

    /** * PDF Invoices & Packing Slips for WooCommerce: * Incluye el NIF en los documentos PDF */
    add_filter( 'wpo_wcpdf_billing_address', function( $address, $document ) {
    	if ( ( $order = $document->order ) && ( $nif = $order->get_meta( 'NIF' ) ) ) {
    		$address .= sprintf( '<p>CIF/DNI/NIE: %s</p>', $nif );
    	}
    	return $address;
    }, 10, 2 );
    Thread Starter ayrpin

    (@ayrpin)

    nothing…I keep getting this error message

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @ayrpin:

    Could you check the WooCommerce logs to see if there are errors with the wpo-wcpdf or fatal-errors prefix? If so, please share the logs with us in a paste on https://pastebin.com/ (please set the paste expiration to 1 week, so it is automatic deleted in 7 days).

    You’ll find the logs under WooCommerce > Status > Logs. See Where to find error logs

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @ayrpin:

    Since we haven’t heard back from you in the last two weeks, we’re assuming you solved this issue, so I’ll go ahead and mark this ticket as Resolved.

    Feel free to reply to this topic is you still need help with this, or open a new topic if you have any other questions!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘200: parsererror’ is closed to new replies.