marale
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Autocompleting bookingHi @donrucastle
While I have had it inserted correctly, it is not running correctly. I originally assumed it would change all orders even dating back to the start of the site to complete if it had a booking. This did not happen. I then waited for a recent booking to complete to see if it would do the same for the order. Unfortunately, it did not.
There was a little bug in the code :), sorry for that. In the last line ‘wc_booking_complete’ should be ‘wc-booking-complete’. I have updated the gist.
If you want to change the status of all orders dating back, uncomment(remove ‘//’ at the beginning of the line) the last line of my gist. I haven’t tested it for large amount of orders. If you send emails when an order becomes complete, all emails will be send, is it what you excpect ?
Please let me know if it works.
- This reply was modified 8 years, 2 months ago by marale.
Forum: Fixing WordPress
In reply to: Autocompleting bookingHi @donrucastle
Yes it will complete orders once the last booking in the order end date has passed (if there are only bookable products in the order).
You can put that code in your child theme’s function.php file through code editor in the dashboard, or you can use a Code Snippets plugin to implement it.
- This reply was modified 8 years, 3 months ago by marale.
The problem is in mctagmap_functions.php file on line 95:
$scarr = '';, the variable is used as array later on, but is initialised with empty string, it’s a bad practice, but it worked up to PHP 7.0. To fix this issue, change the line to:
$scarr = [];Forum: Fixing WordPress
In reply to: Autocompleting booking@donrucastle Bookings do auto complete themselves, but not all orders do. Only orders for virtual and downloadable products auto complete themselves. If you want to autocomplete orders which has status processing, has only bookable products in them, when all bookings are completed, you can use my gist:
The error dosen’t show anymore, but the menu doesn’t show. I choose external menu, when I choose wpda it shows under WP Data Tables menu.
It solved my problem, thanks. I’m using it only in the dashboard.