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

Renaming WooCommerce Subscription status

I've seen code to change WooCommerce's Order status references, how do I adjust this to change WooCommerce Subscriptions statuses? I'd like to change "Active" to something else: function wc_renaming_order_status( $order_statuses ) { foreach (…
1
vote
2 answers

Hide WooCommerce Subscriptions 'cancel' button after 90 days

I am trying to show/hide the 'Cancel' button within the subscription details in 'My Account', based on the subscription start date. However I am finding the interval is not working as expected. I have tried months (m) and noticed it counts whole…
1
vote
1 answer

WooCommerce / Stripe: Trouble trying to pass a Stripe Customer ID through WC_Order

I'm having trouble passing a Stripe Customer ID directly to a WC_Order object. I have tried passing it through the payment gateway metadata via the set_payment_method function however nothing I try seems to work. I am trying to complete an entire…
1
vote
1 answer

How to detect if WooCommerce subscriptions checkout page is for a change payment gateway request?

I have a site using WooCommerce Subscriptions. I do some processing in a woocommerce_available_payment_gateways($available_gateways) filter handler function and I need to detect if the checkout process was triggered by the user wanting to change…
1
vote
1 answer

Remove Subscription line items via API for items that no longer exist in WooCommerce Store

Background: I have about 1000 subscriptions that I need to run through and delete line items. Woocommerce has somehow allowed us to delete products that are tied to subscriptions, meaning there are now up to 1000 subscriptions with products in them…
1
vote
1 answer

WooCommerce Subscriptions - Changing the wording/removing subscription terms (eg /month)

I found this older post: How to change the "/ month" on a woocommerce subscription product page ''' add_filter('woocommerce_subscriptions_product_price_string_inclusions', 'remove_subscription_inclusions', 10, 2); function…
1
vote
1 answer

WooCommerce change checkbox value based on product in cart

We use a plugin for the payment gateways. There is a setting for recurring subscriptions. Now we have a subscription where we need that checkbox selected and we have one sub where we don't need that recurring checkbox. This is the original plugin…
1
vote
1 answer

Remove WooCommerce subscription duration from cart and checkout pages

I am trying to remove the duration on the cart and checkout page for Woocommerce Subscriptions. So instead of $99 / month for 12 months only $99 / month (${price} / {period}) The solution on the following topic removes the whole string after the…
1
vote
1 answer

How to display end date in Woocommerce Subscriptions with a specific date format?

I just want to ask on how to display the end date (or next payment date) in Woocommerce Subscriptions in "MM/DD/YYYY" format? I'm currently using WooCommerce, WooCommerce Subscriptions, WooCommerce Memberships and Elementor Pro (with Dynamic Content…
1
vote
1 answer

WooCommerce Subscription - check is subscription active & paid

I am Using WooCommerce Subscribtion Plugin and I want to check is current user has an active and paid subscription on his acccount to put simple if/else in my PHP file like: if ($subscription = 'active' && is_user_logged_in() ) { echo "Hello"; }…
1
vote
0 answers

Woocommerce subscriptions API and Authorize.net (Credit Card Payment Failed (Subscription Renewal: payment token is missing/invalid.))

We created a user on authorize.net with the following data: Customer profile ID : 901961001 Payment Profile ID: Payment ProfileID: 901782940 Now on Woocommerce API, we have the following JSON that we try to run to create the subscription: { …
1
vote
1 answer

Error when trying create WooCommerce subscription as admin

I am trying to manually add a subscription in WooCommerce and keep getting this error. I have located the PHP file but am unsure of the error. Any help would be appreciated. Thank you. Fatal error: Uncaught Error: [] operator not supported for…
1
vote
0 answers

How to add note in woocommerce table orders?

I am trying to add on the last column of the order list in woocommerce a private note text that is only for me. I did with his code and now the last column is populated with the last note but how can I be able to add notes directly from the order…
1
vote
1 answer

Get global order items quantity sum by category in WooCommerce

I want to ask if anyone knows how to unify products in WooCommerce. I have orders and I only needed the last values ​​and variable in INT form so that I could continue working with it. Here is my code: // set the product categories you want to get…
1
vote
1 answer

WooCommerce REST API: Gateway does not support admin changing the payment method on a Subscription

I am using WooCommerce Subscription REST API to extend the subscription of the user. The problem that I have is that when I want to update expire time I get this error: Gateway does not support admin changing the payment method on a…