• Resolved pavel8289

    (@pavel8289)


    Should the hook – woocommerce_subscription_payment_complete work with automatic payment? I have WordPress cron disabled, I use cron hosting. I receive automatic emails that the payment was successful, but why the hook does not work at this moment with automatic payment is unknown


    I need to perform actions every time there is a successful subscription renewal operation.


    What hook should I use?

    it’s my function for the test. My hook works fine only when I buy for the first time

    add_action( "woocommerce_subscription_payment_complete", "everyMonthCreateNewCounterSubsProducts" );
    function everyMonthCreateNewCounterSubsProducts( $subscription ) {
    
    $headers = array(
    'content-type: text/html',
    'From: [email protected]'
    );
    
    $to = "[email protected]";
    wp_mail( $to, "subscription_payment", "", $headers );
    
    }
    
    • This topic was modified 2 years, 11 months ago by pavel8289.
Viewing 1 replies (of 1 total)
  • Hi @pavel8289

    Thanks for reaching out!

    I understand that you are using the woocommerce_subscription_payment_complete` hook, however, does not work when automatic payment is unknown, correct?

    As a first step, can you please share with us how subscriptions are added to your site as this is not part of the core functions of WooCommerce?

    If you are referring to the premium plugin WooCommerce Subscriptions here and you have a valid license with us, can you please open a support request for us to investigate further about your issue?

    Otherwise, if this was from a third-party plugin, it would be best to reach out to the developers for further assistance here.

    Thanks!

Viewing 1 replies (of 1 total)

The topic ‘Hook not working – woocommerce_subscription_payment_complete’ is closed to new replies.