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
18
votes
2 answers

Detecting if the current user has an active subscription

I'm developing a website in WordPress with WooCommerce. I'm using additionally WC Paid Listings and WooCommerce Subscriptions plugins to handle my work. The problem is when a user with "subscriber" role with an active subscription login tries to…
Knight
  • 343
  • 1
  • 4
  • 16
12
votes
1 answer

WooCommerce Subscriptions - Get related orders Ids for a specific subscription

Is there woocommerce function that will return me all related orders (at least the order ID) for the specific subscription that user has bough? I have found in this official documentation Subscription Function & Property Reference:…
Ugis
  • 181
  • 1
  • 1
  • 13
8
votes
1 answer

Date and date range based member-only downloads

Scratching my head with a specific setup for member-only content (currently using Woo Memberships and Woo Subscriptions). The project has a large number of downloadable products which are available for purchase as one-offs. So far so good…
8
votes
3 answers

WooCommerce Subscriptions - Get product of a specific subscription

Is there a way to get from $product from $subscription? Thanks to this post, I know that from $subscription I can get $order: $order = $subscription->order; Is this also possible? $product = $subscription->product; Or: $product = $order->product;
Casey Crookston
  • 13,016
  • 24
  • 107
  • 193
7
votes
1 answer

WooCommerce subscriptions "invalid recurring shipping method"

On my website, I use the plugin WooCommerce subscription, where I have a sign-up fee ($10 ish), and then a 7-day free trial. Then we charge the customer around $55 for the next product. I use a plugin called Smart Send, which is a logistic plugin…
7
votes
1 answer

WooCommerce Subscriptions - Check if product already has an active subscriber

I am using a plugin "WooCommerce Subscriptions" and I want to check if the product already has the active subscriber in the system I only want 1 subscriber per product. There is a filter available to check it but I don't know how to use it:…
6
votes
1 answer

Switch Subscription - Add Directly To Cart

I'm trying to bypass the single product page so I've created a custom template page for my subscriptions. On this page I'm generating the buttons to either allow users to signup for a specific subscription or switch their subscription. The problem…
Howdy_McGee
  • 10,422
  • 29
  • 111
  • 186
6
votes
1 answer

Display shipping cost on product page - WooCommerce

I'm trying to make a custom page on Wordpress that display 2 subscription types in a form with 3 variations each (monthly, 6 month, 12 month). Each variation gets a radio button and I have a total price that is live updated when user clicks on the…
Alexis Vandepitte
  • 2,077
  • 2
  • 12
  • 28
6
votes
1 answer

WooCommerce - Get the Subscription id from the Order ID

I'm trying to get the subscription id from the action hook woocommerce_order_status_changed. It gives me the order id which is changed with every switch the customer makes. For example: If the subscription id is 10, the original order id is 9. Now…
Shlomi
  • 337
  • 1
  • 6
  • 19
6
votes
3 answers

Get the user ID in WooCommerce Subscriptions

I am using WooCommerce Subscriptions plugin and I am trying to get the customer or userid of a given wc_subscription. Here is the code I have been using but fails: add_action( 'woocommerce_scheduled_subscription_trial_end',…
5
votes
1 answer

Charge saved Stripe card programmatically in WooCommerce

I am using WooCoommerce with WooCommerce Subscription plugin and Stripe. The subscription is being charged monthly and products are being sent out to the customer, the customer then decides wether to keep and pay for the items or return them. If…
5
votes
1 answer

Auto change Woocommerce Subscriptions status to "On-Hold" rather than "Active"

In Woocommerce, I would like to automatically put all Woocommerce Subscriptions "on hold" rather than "active" when the order is still "processing". Once I mark the order as "completed" that subscription should change to "active". I've tried…
5
votes
2 answers

How do I fetch a specific user's subscriptions with WooCommerce Subscriptions?

Context: Given a WordPress website with WooCommerce and WooCommerce Subscriptions, I am attempting to fetch a list of a specific user's subscriptions. Until the recent update, this one line of code has taken care of this for me. Here's is the code…
Nicholas Cardot
  • 956
  • 1
  • 11
  • 30
5
votes
2 answers

How Can I Properly Use WooCommerce Subscriptions API in PHP?

Documentation is very scarce. I'm trying to create some code that uses WooCommerce subscriptions (a plugin for WooCommerce) API to get a list of subscriptions and all of the details of each subscription. The docs and examples out there are just so…
xendi
  • 2,332
  • 5
  • 40
  • 64
4
votes
1 answer

Most reliable hook for setting next renewal payment date after order

We have a situation in a Woocommerce Subscriptions set up where the default sync options won't work. I've created a manual calendar that my functions.php file references at subscription creation time, but it only ever checks at subscription creation…
armadadrive
  • 963
  • 2
  • 11
  • 42
1
2 3
26 27