Free and Premium WordPress Plugins & Themes Forums WordPress Plugins Hotel Booking Hotel Booking Payment Request Waiting manual payment not substract from the total
- This topic has 7 replies, 2 voices, and was last updated 2 years ago by J. Davis.
- AuthorPosts
- October 13, 2022 at 1:09 am #1364786Mickael QuirinParticipant
Hello
Some times my clients send me a part of the payment by the post or by others ways, I add them in manual payment in status on hold.
But the issue with this is that thoses payements are not substracted of the total when I send them the payment link, the only way to substract them is set the status to completed which is not ideal.
From my point of view a payement on hold/waiting should be substracted from the total.
Is there a way to do it ?
Even if I need to modify code I’ll do it. (since it take status completed in consideration,I assume it’ll really not be complicated to add also status on hold too)Thanks
October 13, 2022 at 2:04 am #1364810Mickael QuirinParticipantFor thoses who are interrested in the modification I juste modified a line in PaymentUtils.php (path : wp-content/plugins/mphb-request-payment/classes/Utils/PaymentUtils.php )
Line 16
replace if ($payment->getStatus() == PaymentStatuses::STATUS_COMPLETED) {by
if ($payment->getStatus() == PaymentStatuses::STATUS_COMPLETED || $payment->getStatus() == PaymentStatuses::STATUS_ON_HOLD ) {It’ll take the on_hold payement in count of ammount already paid.
As far I I can tell it modify only the payment link of the plugin payment-request.
The on hold payment is not marked as paid in the backoffice.If that could be added in a way or another officialy that could be nice to avoid overwriting it with an update
October 13, 2022 at 2:11 am #1364812Mickael QuirinParticipantOctober 17, 2022 at 7:51 am #1366292J. DavisKeymasterHi Mickael,
Thanks for your reply and for the shared experience. Unfortunately, we do not offer customization orders of this type as all our developers are involved in the development process of the themes and plugins.
best regards,
John DavisOctober 17, 2022 at 10:30 am #1366370Mickael QuirinParticipantI don’t really understand your reply. I know your dev are involved in the dev process of theme and plugins (what they would do otherwise).
I Don’t think I’m the only one concerned by this and the modification is ,like I showed, really simple to add.
Anyway, if nobody wants it I do not have issue with that either.
October 18, 2022 at 1:19 am #1366575J. DavisKeymasterHi Mickael,
I’m sorry I meant that there was no free developer who might do this customization. I’ve made some research myself and you may try to modify the following files by adding the lines below instead of the default
line 829
\wp-content\plugins\motopress-hotel-booking\template-functions.phpif ($payment->getStatus() == PaymentStatuses::STATUS_COMPLETED || PaymentStatuses::STATUS_ON_HOLD) {
line 250 \wp-content\plugins\motopress-hotel-booking\includes\admin\manage-cpt-pages\booking-manage-cpt-page.php
'post_status' => array('mphb-p-on-hold','mphb-p-completed')
Unfortunately, I did not test if it works correctly everywhere so I can not guarantee it will work correctly. Let me know if it is helpful.
best regards,
John DavisOctober 18, 2022 at 2:01 am #1366588Mickael QuirinParticipantThanks for your reply.
I was probably not clear enough (english not my natural language, sorry :/ ).
I wasn’t asking for help to modify the code, I know you’re busy and can’t take all request like that, I was just asking if my modification could be added if thats something others peoples want too.And if not, what could I do to avoid loosing my modification with future update.
I tested your code, it work well but I prefer mine. I’d rather show not paid in invoice and admin page as long as the status is still on hold.
I just wanted to not bill a customer for something he already paid (which is what my modification do).Sorry if I made myself unclear and maybe offensive in any way, thats wasn’t the goal.
October 20, 2022 at 11:59 pm #1367942J. DavisKeymasterHi Mickael,
Thanks for your clarification. Usually, we measure the priority of the request by the votes under this request. So we may keep an eye on the topic and check if this feature is highly required by a community.
Thank you for the solution that you have described and do not hesitate to ask any additional questions.best regards,
John Davis - AuthorPosts
- You must be logged in to reply to this topic.