Questions tagged [woocommerce-subscriptions]

To be used for WooCommerce Subscriptions plugin related questions only

Third party official WooCommerce Subscriptions plugin.

This powerful extension allows you to create and manage products with recurring payments — payments that will give you residual revenue you can track and count on.

WooCommerce Subscriptions allows you to introduce a variety of subscriptions for physical or virtual products and services. Create product of the month clubs, weekly service subscriptions or even yearly software billing packages. Add sign-up fees, offer free trials or set expiration periods.

392 questions
1
vote
1 answer

Unhook remove_non_recurring_fees() WooCommerce Subscriptions function

I'm desperately trying to remove an action while the cart calculates the total. Here is my code: remove_action('woocommerce_cart_calculate_fees', array('WCS_Cart_Renewal', 'remove_non_recurring_fees'), 1000); While the original action hook is…
1
vote
1 answer

Woocommerce Subscriptions: Get product variations if product is a Subscription Product

In order to return an array of available variations for the current product in WooCommerce, I would use something like this: global $product; $variations = $product->get_available_variations(); I am trying to achieve the same for when a product…
1
vote
1 answer

Disable coupons for subscription products in WooCommerce

I am trying to disable coupon codes for my WooCommerce Subscriptions that I have set up through the "all products for subscription" add on. I've tried the snippet below but it's not targeting subscription products added through the "all products for…
1
vote
1 answer

WooCommerce Add Fee and Coupon to Programmatically Created Order

I'm working on a function that creates an order / subscription for a specified user. This part works perfectly but I am unable to add fees or coupons to the order. I have tried using add_fee() and add_discount() on the order object. The…
Reece
  • 2,581
  • 10
  • 42
  • 90
1
vote
0 answers

How can i insert the data of the subscription renewal order using "woocommerce_subscription_renewal_payment_complete" hook

I have a custom table in my db and i need to insert the product_id, user_id & order information to that table on the time of subscription renewal payment using the hook "woocommerce_subscription_renewal_payment_complete". is that possible to…
1
vote
1 answer

Merge WooCommerce tabs: Orders and Subscriptions

I'm following this tutorial to merge My Account tabs: https://www.businessbloomer.com/woocommerce-merge-account-tabs/ I want to merge Orders and Subscriptions, thus hide Subscriptions tab and display its content in Orders tab. So,…
bugnumber9
  • 451
  • 1
  • 4
  • 16
1
vote
1 answer

Wordpress WP_List_Table sort data query problem

I'm using wordpress 5.5 and php 7.4 and mysql 5.7.30 I'm using woocomerce subscription plugin for my e-commerce system. what I want is to be able to show list of paginatd subscriptions in admin panel and (important part) sort them based on…
1
vote
1 answer

WooCoomerce [Subscription]: Radio buttons at Grouped Products for Upgradation & Downgradation

WooCommerce subscription gives the ability to upgrade or downgrade, to other subscription products if they are. Grouped Product Variable Subscription. When using grouped subscription the single product page, uses the checkbox to show prices of all…
bhanu
  • 1,730
  • 3
  • 12
  • 30
1
vote
2 answers

Change user role based on WooCommerce active subscription

I have a Woocommerce store with a variable subscription and 3 types of subscription variations: subscription-a, subscription-b and subscription-c. I also added 3 new types of user roles: subscriber-a, subscriber-b and subscriber-c. I'm trying to…
1
vote
2 answers

How to get Order Details from a WC_Subscription instance Object

This one for completed initial subscription payments and subscription renewals. function payment_made($subscription){ // How do I get the order details? } add_action("woocommerce_subscription_payment_complete", "payment_made"); And this one for…
yanike
  • 827
  • 3
  • 13
  • 29
1
vote
1 answer

How to get the Product ID from a WC_Subscription instance Object

This one for completed initial subscription payments and subscription renewals. function payment_made($subscription){ // How do I get the Product ID from subscription? (Definitely need…
yanike
  • 827
  • 3
  • 13
  • 29
1
vote
1 answer

Remove WooCommerce subscription interval from cart and checkout pages

I am trying to remove the / month or / year on the cart and checkout page for Woocommerce Subscriptions. So Instead of $99 / year I only want to show $99 Hoping someone can point me i. the right direction. Thank you
1
vote
1 answer

Display WooCommerce variable subscriptions and its variations in a drop down list

I have been creating a plugin and I am trying to pull all woo commerce subscriptions and the variations within the subscription product into a drop down list. I have successfully pulled the top level product into the drop down list but for some…
1
vote
1 answer

Add Coupon to Pre Existing WooCommerce Subscription

I have started a referral scheme which gives users a £25 discount coupon code which works great but not for pre-existing subscribers how can I hook into renewals and apply the auto coupon so subscriptions can benefit from the discount too.? Can I…
1
vote
1 answer

WooCommerce Subscriptions: Subtract 1 day from $end_date when status is changed to "pending_cancel"

I'm using WooCommerce Subscriptions with a small payment gateway service and they differ in how they count a subscription interval. WooCommerce considers a monthly cycle like 15th April to 15th May, while the payment gateway considers 15th April to…