Home Forums WC Vendors Free Support How to shorten the Commission Schedule (Cron) for Testing?

NOTICE: We've Moved to a Ticket System for Support

As of August 31, 2017 (12am EST) our support forums will be retired (read-only), and we will be moving to a support ticket system.  This will allow us to better organize and answer support requests, and provide a more personalized experience as we assist our customers.

For the time being, we will leave our forums open for reading and learning while we work on creating a more robust Knowledge Base for everyone to use.

If you are a WC Vendors Pro customer please open a support ticket here. 

If you are a WC Vendors user please open a support ticket on the Wordpress.org forums.

The information on this forum is outdated and in most instances no longer relevant. Please be sure to check our documentation for the most up to date information.

https://docs.wcvendors.com/

Thank you to all of our customers!

 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #70613
    Louie
    Participant

    Hi,
    I’m trying to add an additional payment schedule for the commission for testing purpose.
    So instead of waiting for the next 24 hours (Daily), I’m trying to add ‘Every 5 Minutes’ schedule.

    Is it possible to do?
    Here are what I tried so far :
    1. Add this line in wc-vendors/classes/class-cron.php (under custom_cron_intervals() function)

    $schedules[ 'superfast' ] = array(
    	'interval' => 300,
    	'display'  => __( 'Once Every Five Minutes' )
    );

    2. Add the superfast option to wc-vendors/classes/admin/settings/sf-options.php

    $options[ ] = array(
    	'name'    => __( 'Payment schedule', 'wcvendors' ),
    	'desc'    => __( 'Note: Schedule will only work if instant pay is unchecked', 'wcvendors' ),
    	'id'      => 'schedule',
    	'type'    => 'radio',
    	'std'     => 'manual',
    	'options' => array(
    		'superfast'=> __( 'Superfast', 'wcvendors' ),
    		'daily'    => __( 'Daily', 'wcvendors' ),
    		'weekly'   => __( 'Weekly', 'wcvendors' ),
    		'biweekly' => __( 'Biweekly', 'wcvendors' ),
    		'monthly'  => __( 'Monthly', 'wcvendors' ),
    		'manual'   => __( 'Manual', 'wcvendors' ),
    		'now'      => '<span style="color:green;"><strong>' . __( 'Now', 'wcvendors' ) . '</strong></span>',
    	)
    );

    Then I go to WooCommerce -> WC Vendors -> Payment -> and set Payment Schedule into Superfast.
    And then I try to make a checkout, complete the order, then wait until 5 minutes (even more), but nothing happens.

    P.S :
    I have set up the PayPal Adaptive Payment. And to make sure, I also have tested the Payment Schedule: Now, and it working properly (I mean, the payment gateway works perfectly). So, now I only need to make sure that the schedule is working properly.

    Do I missed something? or, is there any other way to test the schedule?
    Thanks!

    #70631
    Anna
    Member

    @snoodlenoodle1
    Hello,
    Aside from what you have already attempted, I really do not know how to adjust the cron schedule for PayPal scheduled payments.
    I’ll see if I can find more information on this, but in the meantime you may wish to try a daily schedule as I do not know if nor how quickly I will be able to provide the answer to this question.

    #70633
    Louie
    Participant

    Update:
    I have installed a plugin called WP Crontrol to see what’s happening in the WP-Cron system.

    According to that plugin, my custom cron set up is working properly.
    *Please see the attached screenshot.

    Maybe I missed something on the WC Vendors side?
    I look forward for your advice.
    Thanks!

    #70637
    Louie
    Participant

    Hi Anna @fervous ,
    thanks for your answer.

    Another Update:
    I just realised that with the Crontrol plugin we can run the cron immediately by clicking Run Now button.

    So I restore the modified PHP files that I mentioned on my first post and set it to Daily. Then I go to the Crontrol and try to Run the pv_schedule_mass_payments from there but still nothing happen. The due commission is still due.

    The Crontrol plugin give this response :

    Successfully executed the cron event pv_schedule_mass_payments.

    Any clue? Thanks!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘WC Vendors Free Support’ is closed to new topics and replies.