Václav Greif
Forum Replies Created
-
Hello, just installed the update, but the problem is not fixed. Any chance to fix this please?
Thanks
Forum: Plugins
In reply to: [WooCommerce COD Advanced Plugin] COD extra payment taxHello,
please, if you don’t plan adding a setting for this, at least add filter to the tax, ie.$extra_fee_option_taxable = apply_fiters('adv_cod_fee_taxable',0);
Thanks
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] Get Invoice number for orderVery cool, thanks!
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] Get Invoice number for orderHello, exactly, when I use the
wc_get_orders
, I get only the new orders with meta saved as timestamp.What’s the proper PHP function to convert old dates to UTC timestamps? Should it be something like
strtotime(gmdate("M d Y H:i:s",strtotime('2018-01-01 10:20:22')))
?Thanks
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] Get Invoice number for orderHello,
I have one more issue here: the_wcpdf_invoice_date
field is now UTC timestamp, but it used to beYYYY-mm-dd H:i:s
format in previous versions of WCPDF. When I use the code, I get only orders older than 21.9.2017, because older orders have the_wcpdf_invoice_date
stored in the older format.Any fix for this?
Thanks!Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] Get Invoice number for orderHello,
thanks, this works great. Thank you for an INCREDIBLE support!V.
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] Get Invoice number for orderThanks!
What I ended up with is:
// Get the invoices $args = [ 'post_type' => 'shop_order', 'post_status' => 'any', 'posts_per_page' => -1, 'meta_query' => array( 'relation' => 'AND', 'date_from' => array( 'key' => '_wcpdf_invoice_date_formatted', 'value' => date('Y-m-d H:i:s',strtotime($date_from)), 'compare' => '>=' ), 'date_to' => array( 'key' => '_wcpdf_invoice_date_formatted', 'value' => date('Y-m-d H:i:s',strtotime($date_to . ' + 1 day')), 'compare' => '<=' ), ), ]; $the_query = new \WP_Query( $args );
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] Get Invoice number for orderChanging to
admin_init
worked!Last bit of puzzle – any way to query the orders to get orders with invoices between specific dates? Is the invoice date saved as
postmeta
somehow?Thanks!
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] Get Invoice number for orderHello, thanks a lot for your help!
This code is executed on
init
action. I’m not aware of any references to the$wpo_wcpdf
object (at least i my code), here’s the complete code, not much going on there.For getting the invoices, I need to get invoices between specific dates, not orders. I mean, the invoice can be issued two weeks after the order is placed. Is there any way to get the invoices between specific dates, without querying all the orders and comparing against invoice date?
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] Get Invoice number for orderThanks for reply! What I’m trying to do is build the array of invoices issued between specific dates. Here’s my code:
// Get the invoices $invoices = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}wcpdf_invoice_number WHERE DATE(date) >= '{$date_from}' AND DATE(date) <= '{$date_to}'"); // If there are no invoices matching the criteria, just die if (empty($invoices)) wp_die('No invoices matched the date selection'); $export_invoices = []; foreach ($invoices as $invoice) { if ($invoice->order_id) { $order = wc_get_order($invoice->order_id); $document = wcpdf_get_invoice($order); $export_invoices[] = [ 'invoice_no' => $document->get_number(), 'invoice_date' => $document->get_date(), 'total' => $order->get_total(), ]; } }
That results in Fatal error
[10-Jan-2018 19:36:43 UTC] PHP Fatal error: Class 'WPO\WC\PDF_Invoices\Documents\Order_Document_Methods' not found in /var/www/vhosts/mywebsite.com/httpdocs/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/legacy/class-wcpdf-legacy-document.php on line 23
I’m obviously missing something here..Any help?
Thanks
Thanks for fixing this!
Hello, thanks for reply, my mistake when describing the issue.
The issue appears when you schedule post with the Autopubplish on, and than try to disable it. Please check following video:
Thanks!
Forum: Plugins
In reply to: [WordPress Popular Posts] “No data so far” after updateBack here, I installed
Query Monitor
and it revealed there was a problem with the db:Unknown column 'v.view_datetime' in 'where clause'
It seems the table structure changed in the latest version of WPP. The solution described here worked.
Would be cool to take care of the db changes automatically during plugin updates…
Same problem here, any fix for this?
Hi, thanks for reply!
Projects are really crucial for my workflow.
For projects tracking, I currently use Toggl only – I always know what my budget is, what is the price per hour for each client, and I use tags “to invoce” and “invoiced” to see what I already invoiced. Probably not the best way, but that’s how I do it now.