Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Matt12

    (@matt-pain)

    Thanks a lot Marcel !
    The updated version resolves the issue. I still don’t see the older order_notes that are still marked as spam but I can see them again in the new orders.

    The order_note is an admin order note. They are all stored in the wp_comments table.
    Those are mostly notes about the payment gateway, stock updates, etc. Admins & shop managers can manually add notes there as well. Those notes are not visible to the customers.

    Stock notes are definitely stored like other order notes however you have to activate the stock in the product itself for it to work.
    Stock is not related to product type however if it’s a variable product you have to activate it on each variation it’s needed. In case of a simple product the stock is managed globally for the product.

    However as a customer, you can add a customer_message when you place your order.
    My guess is the customer_message is stored in the wp_postmeta table. In the admin section, the customer_message appears on the edit order page after the customer info(name, email, address, etc.).

    Hope that helps ??
    Thanks again for resolving the issue !

    • This reply was modified 1 year, 11 months ago by Matt12.
    Thread Starter Matt12

    (@matt-pain)

    Do you have any update regarding this second filter ?

    add_filter( 'wpo_wcpdf_external_invoice_number', function( $number, $document ) {
    	if ( ! empty( $document->order ) ) {
    		// Get invoice formatted number
    		$number = $document->order->get_meta( '_bewpi_invoice_number' ); // if $number is empty, the plugin will generate a new number
    	}
    	return $number;
    }, 10, 2 );

    I put a prefix for the invoices in your plugin’s settings ([invoice_year]-)but the invoices created with the old plugin already have their own prefix. Do you have a way to remove your prefix from the invoice number in this case ?
    Thanks !

    Thread Starter Matt12

    (@matt-pain)

    I didn’t see your second answer before my answer but yes removing the “@” from "@{$legacy_date}" definitely worked ! I now have the correct date for the invoices. Thanks ??

    I still have the issue with the second filter adding the prefix. Let me know if there’s a way to fix it.

    Thread Starter Matt12

    (@matt-pain)

    Thanks for your reply Darren,

    var_dump( $legacy_date = $order->get_meta( '_bewpi_invoice_date' ) );
    returns something like this, for each invoice generated by the old plugin :
    string(19) "2022-03-25 15:42:27"

    If I var_dump the meta_key _wcpdf_invoice_date_formatted :
    var_dump( $legacy_date = $order->get_meta( '_wcpdf_invoice_date_formatted' ) );
    for the invoices generated by your plugin, I have the same output as _bewpi_invoice_date : something like string(19) "2022-09-06 15:44:50"

    And changing @{$legacy_date} to now definitely works.
    I really don’t get why _bewpi_invoice_date doesn’t work in this case ??

    I also have an issue with the second filter to get the old invoice number :

    add_filter( 'wpo_wcpdf_external_invoice_number', function( $number, $document ) {
    	if ( ! empty( $document->order ) ) {
    		// Get invoice formatted number
    		$number = $document->order->get_meta( '_bewpi_invoice_number' ); // if $number is empty, the plugin will generate a new number
    	}
    	return $number;
    }, 10, 2 );

    The invoice number generated is correct but adds the prefix [invoice_year]- I added in the settings of your plugin.
    How do I remove it ?

    Thanks ??

    Hi Steve,

    I removed my custom code and tested the upgraded version on my site, it works perfectly. Thanks for quickly implementing this option ??

    Hi,

    I think Onisforos meant to say if there was a way to set a treshold to load images x pixels before the viewport’s bottom.
    The fact that users saw (and sometimes waited for) the loading of images bothered me a little too.
    On the Github page of Lazyload XT I found the option to do that https://github.com/ressio/lazy-load-xt#options.
    Place the code below in your theme’s js file :

    $.extend($.lazyLoadXT, {
      edgeY:  200
    });

    In this example the images will load 200 pixels before the viewport’s bottom. Change ‘200’ by whatever value you want.

    BTW thanx for the plugin, I implemented it on 2 sites and works great so far ??

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