Disable withdrawals creation and set orders as paid

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 5 reply threads
  • Author
    Posts
    • #31970
      mepg2000
      Participant

      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.php

      I 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!

    • #32018
      WCFM Forum
      Keymaster

      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

    • #32027
      mepg2000
      Participant

      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

    • #32037
      WCFM Forum
      Keymaster

      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

    • #32041
      mepg2000
      Participant

      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!! 😀

    • #32044
      WCFM Forum
      Keymaster

      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

Viewing 5 reply threads
  • The topic ‘Disable withdrawals creation and set orders as paid’ is closed to new replies.