• Resolved mattemar

    (@mattemar)


    Hi there,

    Thanks for your plugin, this is what I needed for my client website. Unfortunately I don’t have too much knowledge in .php and it’s a bit hard for me to change the setting of the plugin. Here below is what I understood and changed:

    CONNECT PAYPAL

    function woa_custom_gateways_hook( $gateways ) {
         $gateways[] = 'ppec_paypal'; // PAYPAL
         return $gateways;
    }
    add_filter( 'woo_cao_gateways', 'woa_custom_gateways_hook', 10, 1 );

    SET IT TO 6 HOURS – Is it correct how I’ve edited it?

    function woa_date_order_hook( $old_date, $gateway, $mode ) {
    	// For example, change date only for cheque.
    	if ( 'cheque' == $gateway ) {
    		$old_date = strtotime( 'today -6 hours' );
    	}
    
    	return $old_date;
    }
    add_filter( 'woo_cao_date_order', 'woa_date_order_hook', 10, 3 );

    ONLY FOR ORDERS MARKED AS ‘PENDING PAYMENT’

    function woa_custom_statustocancel_hook( $status ) {
    	// More explication on WooCommerce status : https://docs.woocommerce.com/document/managing-orders/
    	$status[] = 'pending';
    	return $status;
    }
    add_filter( 'woo_cao_statustocancel', 'woa_custom_statustocancel_hook', 10, 1 );

    Thanks in advance for your help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author RVOLA

    (@rvola)

    Hello @mattemar

    Thank you for the message !!
    You are a chef !!
    Everything is almost right.

    You just have to put the right gateway in the function woa_date_order_hook, currently it is ‘cheque‘ replace by ‘ppec_paypal

    And everything should work.

    • This reply was modified 5 years, 1 month ago by RVOLA.
    Thread Starter mattemar

    (@mattemar)

    Hi @rvola

    Thank you for the quick response!

    I’ve got it, I hope this will help other people too.

    Have a nice day!

    Hello,

    I am attempting to connect PayPal Standard checkout, however am not getting any order status changes results using the code and provided revision above. Does this plugin work for PayPal Standard, if so what code (gateway perhaps?) might need to be adjusted?

    Thanks

    • This reply was modified 4 years, 11 months ago by claing.
    Plugin Author RVOLA

    (@rvola)

    Hello,
    I invite you to read the documentation here which will help you, in particular “Add a new gateway”
    https://github.com/rvola/woo-cancel-abandoned-order/wiki

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Help setting up the plugin’ is closed to new replies.