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
2
votes
1 answer

Manual custom Ajax Add to Cart One time payment subscription

Good day, I am trying to manual ajax this Add to cart What this does is, It will add to the cart the one-time purchase option from the woocommerce subscription. I…
user6684898
2
votes
1 answer

Add Woocommerce Subscription switch to cart programmatically

I'm looking for a way to programmatically add a switch between two Woocommerce subscription variations to the cart. We're building a headless WP site, so I don't want to do it with a link, as described in this question I've tried the following…
Punchlinern
  • 714
  • 5
  • 17
  • 33
2
votes
1 answer

Remove particular variation from dropdown in WooCommerce frontend

I am using WooCommerce and WooCommerce Subscriptions and its working as per my expectations. Now I am creating a variable subscription product having multiple attributes like this. Now I want to remove/hide particular item from dropdown hence I…
2
votes
1 answer

WordPress WooCommerce add new field in each row at /my-account/subscriptions/ page

I am using WordPress with WooCommerce and WooCommerce subscriptions plugins and below is my code in which I have added a custom field called (Mindesk VAR Client User - Dropdown) to show in "Edit Subscription" admin page saving to my custom field…
2
votes
1 answer

Display subscription renewal count on WooCommerce "My account" page

We use WooCommerce subscription and I created that snippet below to display the renewal count on MyAccount page. This is working. But, I found out, that the initial parent order also count as a "paid". So actually I only want to count the renewals…
Nik7
  • 346
  • 2
  • 16
2
votes
1 answer

Add "VAT REVERSE CHARGE" when company is from EU in WooCommerce

I have a B2B webshop with Wordpress and WooCommerce using WooCommerce Subscriptions. As I am selling digital goods I need to do add special VAT rules to my orders for companies within the EU. My store is based in the Netherlands. I am using this…
2
votes
1 answer

Woocommerce variable subscription custom field checkbox set default as unchecked

Below is my code in which I have set a custom field called mindesk_analytics_opt_out for my Variable Subscriptions and it's working fine as per my expectations. However, Whenever I create a new variation and open the panel, my default checkbox…
2
votes
2 answers

WooCommerce subscriptions: Critical error message after checkout

We have recently discovered an error message once an order is placed (shown on the view order endpoint of WooCommerce). At the very bottom it says "There has been a critical error on this website." but nothing seems to be broken/not working. I have…
2
votes
1 answer

Get WooCommerce Subscription product type and specific category in a WP_Query

I'm using the WooCommerce Subscriptions plug-in for several products in the catalog that are available as both individual or subscription products and am writing a custom template page to query products that are available as subscriptions. My query…
2
votes
1 answer

How to Create WooCommerce Subscription Product via. REST API?

I am able to find the REST API docs for WooCommerce: https://woocommerce.github.io/woocommerce-rest-api-docs/#create-a-product but am unable to figure out how to create a subscription product via. this API. I am able to also edit a user's…
2
votes
1 answer

Replace WooCommerce "Place order" button text with cart total and subscription period

I'm using the following code to target specifically, subscription-based products. // Display total amount on place order button add_filter('woocommerce_order_button_text', 'subscriptions_custom_checkout_submit_button_text' ); function…
2
votes
1 answer

How to get the user ID from a WC_Subscription instance Object

I have two functions I need help with that I hope can handle my subscription tasks. The code comments (// ...) is what I'm trying to figure out. If you have other feedback, I'm open to them as well. This one for completed initial subscription…
yanike
  • 827
  • 3
  • 13
  • 29
2
votes
1 answer

WC_Order->get_items() returns empty items

Using the hook 'woocommerce_order_status_completed' I can get $order_id then get the WC_Order object with $order = wc_get_order($order_id). But the following $logger->add("send-order-debug", json_encode($order->get_items()) returns empty item…
2
votes
1 answer

Add some user user meta data as order meta data in WooCommerce

A Customer creates a subscription and tells me what he requires via WooCommerce. The requirements are stored inside of the user profile using the user meta data. When he updates this in the WooCommerce my account area on the front end, it updates it…
2
votes
2 answers

WooCommerce Subscription: Don't have the SUSPEND button

On my account page / View subscription, in the ACTION paragraph, I have a CANCEL button but not the SUSPEND button. Do you know if it is normal? I have traced this function and it returns only the cancel data :…
Pipoo
  • 23
  • 1
  • 1
  • 6