• Resolved had974

    (@had974)


    Hi and thanks for this great plugin.

    I wanted to know how I could update the next recurring price for a specific user ?
    is there any hook / filter available to do that ?

    Also is there any hook to trigger function before / fter a renewal payment is made ?
    Thanks a lot 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author WP Swings

    (@wpswings)

    Hi,
    Thanks for using our plugin!

    You can use this filter to change the total for a renewal order
    apply_filters( ‘mwb_product_args_for_order’, $mwb_args );

    You have to change this post meta value for a recurring total so that the user and admin can see the total recurring on their respective space.
    update_post_meta( $subscription_id, ‘mwb_recurring_total’, 10 );

    You can use this hook it will fire just after the renewal order creation.
    do_action( ‘mwb_sfw_renewal_order_creation’, $renewal_order_object, $subscription_id );

    Hope this will resolve your concern
    Regards,

    Thread Starter had974

    (@had974)

    thanks !

    Plugin Author WP Swings

    (@wpswings)

    Hi,

    Thank you. In the future, if you need any help, please feel free to connect with us

    Regards,

    Thread Starter had974

    (@had974)

    Hi sorry to come back but I need more infos :

    This hook “mwb_sfw_renewal_order_creation” will fire juste after the renewal order creation, but I need to update the next recurring price before the renewal order is created.

    What is the best way to do that ? I don’t find any hook for that 🙁

    Also how renewal subscription really works ? a user buy a subscription, then subscription is active and order status is marked as “Mwb Renewal”.
    But if the customer needs to renew his order (after period), the subscription changed status to “on-hold” and order has “cancel” or “pending” status ?

    Tanks for your answer 🙂

    Plugin Author WP Swings

    (@wpswings)

    Hi,

    If you need to change the recurring price for any specific order you need to update key update_post_meta( $subscription_id, ‘mwb_recurring_total’, 10 );

    And renewal subscription work like when the user placed a subscription then firstly we provide a custom status “Mwb Renewal” after which when payment is completed, then it turns into status “processing” and in case if payment is failed then it comes
    into “on-hold” status and if payment is a pending process then it comes into “pending” status based on subscription order, the same renewal subscription work every time.

    Thanks

    • This reply was modified 4 years, 3 months ago by WP Swings.
Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘change future recurring price amount programmatically’ is closed to new replies.