Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Disable withdrawals creation and set orders as paid
- This topic has 5 replies, 2 voices, and was last updated 6 years, 1 month ago by WCFM Forum.
- AuthorPosts
- September 18, 2018 at 8:45 pm #31970mepg2000Participant
Hello wclovers,
Due to the particular scenario which my site involves and not having my problem sorted out completely via my last post, I would like to ask you how to achieve 2 things:
1) Disable withdrawals creation. This can be easily achieved by removing the hook:
add_action( ‘wcfmmp_order_item_processed’, array( &$this, ‘wcfmmp_order_item_auto_withdrawal_processed’ ), 30, 8 );
in the contstruct of the class ‘WCFMmp_Withdraw’ located in the file: class-wcfmmp-withdraw.phpI tried with the following function with no success:
add_action(‘init’, ‘cbm_remove_withdrawals’, 50);
function cbm_remove_withdrawals() {
global $WCFM, $WCFMmp;
remove_action( ‘wcfmmp_order_item_processed’, array( $WCFMmp->WCFMmp_Withdraw, ‘wcfmmp_order_item_auto_withdrawal_processed’ ), 30 );
}Could you provide me the correct way, or add an option in the settings to remove this hook and disable withdrawals creation?
2) Set all orders withdrawal status to “paid” once the order gets into “processing” status. I have tried to follow all your instructions in my previous post. tried adding all payment methods to “Disallow Order Payment Methods for Withdraw”. In any case all orders, even when set to “completed” by vendor, result as “unpaid”
Please provide me a function or method to set all orders as “paid” when entering the “processing” state.
Thank you!
- September 19, 2018 at 6:22 pm #32018WCFM ForumMember
Hi,
1. First tell me, what you want to disable? Withdrawal creation or commission creation?
add_action( ‘wcfmmp_order_item_processed’, array( &$this, ‘wcfmmp_order_item_auto_withdrawal_processed’ ), 30, 8 ); – this is for generating “vendor orders” or “commission”
2. When I tested last time in your site it was working, do you change anything since then?
Thank You
- September 19, 2018 at 7:21 pm #32027mepg2000Participant
Hello there,
I want to disable the creation of “commissions” since none have to be paid to the vendor. The vendor gets the full payment accredited directly to his paypal account upon user transaction.
You have tested my site but did not try to set an order as completed. Even after vendor sets order to “completed” it still results as “unpaid”. That unfortunately never worked out.
I would like the order to be set as “paid” once it enters the processing state.Thanks
- September 19, 2018 at 8:26 pm #32037WCFM ForumMember
Hi,
“I want to disable the creation of “commissions” since none have to be paid to the vendor. The vendor gets the full payment accredited directly to his paypal account upon user transaction.”
– This is required, don’t disable this. You may disable “Withdrawal Module” from WCFM Admin Setting -> Modules.
“I would like the order to be set as “paid” once it enters the processing state.”
– I will add prohibition for this in next update.
Thank You
- September 19, 2018 at 8:40 pm #32041mepg2000Participant
Thanks for speedy response 😀
I know I can hide the module and that the process is required in 99% of cases, but in my case it would just fill up my DB of useless entries. (and quite a few)
If you could tell me how to use a remove_action I would appreciate it, else ill just hide it.Awesome about the addition in next update. Very kind of you.
Thank you very much for the AWESOME SUPPORT!! 😀
- September 19, 2018 at 9:02 pm #32044WCFM ForumMember
Hi,
You are welcome 🙂
Well, that remove_action will break down vendor’s orders system, vendor will not see any orders under their dashboard.
So, this will be problematic.I understand DB issue, I am looking for most optimized solution for you.
Thank you
- AuthorPosts
- The topic ‘Disable withdrawals creation and set orders as paid’ is closed to new replies.