• Resolved Marcello

    (@vocmarcello)


    Hi
    i need that coupon is sent when payment is received, and not when order is complete
    Becouse i need 2 week for complete the order

    It’s possibile do this? thx

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

    (@goran87)

    Hi,

    yes, its possible.

    Ill send you code you need to change to get it working soon.

    Thread Starter Marcello

    (@vocmarcello)

    ok thx i wait your code

    Plugin Author Goran87

    (@goran87)

    So,

    inside includes/class-gens-raf.php, find this line of code:

    $this->loader->add_action( ‘woocommerce_order_status_completed’, $plugin_public, ‘gens_create_send_coupon’ );

    it should be line 177.

    change wording “completed” to whichever default status is once order is done. Maybe pending in your case? Check what status you have then use its slug, you can find slug of each status here: https://www.woobeginner.com/wp-content/uploads/2017/02/Screenshot_3-3.png

    So if its pending payment status, it will be:

    $this->loader->add_action( ‘woocommerce_order_status_pending’, $plugin_public, ‘gens_create_send_coupon’ );

    Let me know.

    Thread Starter Marcello

    (@vocmarcello)

    P E R F E C T !
    Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Sending Coupon for custom Order’s Status?’ is closed to new replies.