WooCommerce Subscriptions: Hide one variation subscription

Woocommerce subscriptions | All Products for WooCommerce Subscriptions Does anyone know if there's a way to disable the subscribe option for a specific product variation? i.e. product with 2x attributes: attr-1, attr-2 All of which can be bought singly or via a sub on the PDP, is there a way to disable the subscribe option for one of the attributes? There's no succinct way using the wcsatt_product_subscription_scheme filter without a lot of JS logic. Have reached out to WC and …
Category: Web

How to auto send email when publishing a custom post type?

I'd like to have an email automatically sent out to my website's subscribers when I publish a post for a specific custom post type. I've found a few plugins that will do this but only for regular posts (or for any post type that gets published, not allowing you to specify a particular post type). Any suggestions would be greatly appreciated! Thanks.
Category: Web

How to apply a custom coupon to a WooCommerce Subscription recurring amount?

I ned to create a custom coupon for use with WooCommerce Subscriptions because for some reason you can either have one on the sign up fee OR you have one on the recurring amount, but I need a coupon to be applied to both, but there is no option. I have created a custom coupon using the filter woocommerce_coupon_discount_types, but the filter to then implement this coupon in the cart, woocommerce_coupon_get_discount_amount, does not add it to the recurring amounts, only …
Category: Web

Subscribe to email

I am looking for a way where, the users of my website will subscribe to a post, and when my post will be edited or updated they will be emailed by my posts contents, My post contains, article, Twitter Updates, a Video How will the users get notification when my posts get updated and also when someone comments on posts
Category: Web

How do you allow users to subscribe to a Wordpress blog?

How do you allow users to subscribe to a Wordpress blog? I need to create a widget that let users receive an email to a blog post, basically a link and an image like we see when we share links on social media. What's the general way of doing this without using a paid service like mailchimp?
Category: Web

How to get woocommerce subscription next payment date or date when subscription expires in woocommerce_subscription_renewal_payment_complete hook?

I want to get the updated subscription expiration date when a user successfully completes renewal payment or his card gets charged when trial ends. Is there a way to get the updated date in woocommerce_subscription_renewal_payment_complete hook or in any other hook? I need to tell a third party service that subscription has been updated so that it should update its renewal date that code should supply. So for I have come with below code but I am not able get …
Category: Web

How to change a WooCommerce Subscription Deposit and Monthly Payment?

A customer wants some specific/bespoke discounts to the subscription service they sell. I cannot find a plugin to do what they want, so thought I would code it myself. But I cannot find how to edit the initial payment item in the cart for subscriptions. Using woocommerce_before_calculate_totals I can edit the monthly amount. But the initial payment does not change. Even though it is looping its price below because I can output it to the screen, so I think $cart_item['data']->set_price( …
Category: Web

How to drip out preloaded WordPress blog posts via email

I'm in the process of loading up a WordPress site with content. When a user subscribes to the site, instead of getting only new blog posts, I'd like that user to be "dripped" all blog posts from the beginning, one per day. Is that possible via a plug-in or a third-party "drip" provider, or does something need to be built?
Category: Web

Scrolling on reply url

I have installed BBPress and anonymus subscription plugins for my forum. The problem is, if a user recived an email that notify him that he recived a reply to his topic/answer, after he press on the button from that email to go on his question/answer, the page scroll to the end of the post not at the beginning. Is somebody who can help me with this $reply_url = bbp_get_reply_url( $reply_id ); <a style="padding:10px; text-decoration:none; background:#66BB6A; font-family: Open Sans; font-style: normal; …
Category: Web

Limit users to one active subscription in WooCommerce Subscriptions?

I am in the process of building a membership/subscription based site for a client of mine and they are using woocommerce subscriptions (https://woocommerce.com/products/woocommerce-subscriptions). Now the problem is the client is building a few promo pages which basically allows the user to purchase an upgrade. Now, this is fine but the client only wants a customer to only have one subscription (and associating membership [https://woocommerce.com/products/woocommerce-memberships/]) at any one time. So the agreed solution is that, on a purchase of any new …
Category: Web

Unpaid PayPal orders switching to "processing"

Well well... after two weeks of testing, trial and error I finally came to Stackexchange. Following issue/bug: We have major issues with PayPal. We noticed orders without any payment. When you order something in our shop, choose PayPal and cancel the order in PayPal by just clicking "cancel" or leaving the browser tab, WooCommerce switches the order from either "canceled" or "pending" to "processing". Which indicated, that the user has paid. We received my emails from users who said they …
Category: Web

Woocommerce Subscription Pricing/Billing Schedule

We are currently building a site using the Woocomerce Subscriptions plugin. When adding a product to the cart a customer inputs their information on the product page and it returns a calculated price for that order. add_filter( 'woocommerce_add_cart_item_data', 'custom_add_to_cart_item_data', 20, 2 ); function custom_add_to_cart_item_data( $cart_item_data, $product_id ) { ... // Calculate total price based on input $totalPrice = calculateTotalPrice($product, $plan, $input); // Set calculated price to be the result of total price $cart_item_data['price_based_on_input'] = $totalPrice; } We then check if …
Category: Web

How to disable the "Upgrade or Downgrade" button in "My account" of WooCommerce Subscriptions

I have a Wordpress/WooCommerce webshop and I use WooCommerce Subscriptions. I want to disable the "Upgrade or Downgrade" button in My account > My Subsccriptions for users which have a specific user role. I found 2 pieces of php script but I don't know how to combine these two. The first is to check if a user has a specific role: /** * Check user has specific role * * @param string $role * @param int $user_id * @return bool …
Category: Web

I need a link that directs the user that is logged to his profile

I want a link in the form to an image in the frontpage, that direct the user that is logged to the subscription packages that are on its profile: The link look like this: https://mywebsite.co.uk/author/admin/?screen=acc_pay But I want for the user part /admin/ to change depending on the user that is logged. I am using KingComposer: This is the page were the link should be And this is were it should lead undependant of the user that is logged in, …
Category: Web

WooCommerce subscription, give option to prorate or not to prorate to user while switching subscription

With WooCommerce subscription plugin, user can switch between subscriptions. And there is an option in the backend to prorate the recurring payment. When the option prorate option is enabled, and user switch subscription the payment is made right there. It does not wait for current subscription period to end. To make the switch happen after the current subscription end, the option needs to be disabled. My problem is that I need to have these both options in the frontend for …
Category: Web

How can I transfer followers from Wordpress.com to a self-hosted Wordpress?

Recently, I performed a domain migration from a wordpress.com domain to a self-hosted solution. The primary complaint was the loss of followers gained through Wordpress ( http://marygoround.me/2012/02/18/to-all-my-current-wordpress-followers/ ) I don't see any plugins that Automattic has released to allow similar functionality to "Subscribe" and "Like" content on self-hosted blogs, so it's feeling more and more like a closed garden. What can I do to make sure this audience is preserved after the migration?
Category: Web

Plugin to allow for recurrent subscription + exclusive content

Recently my step-mom lost her freelancing gig with a couple of newspapers. She ran a fairly prominent feature about two shows, and decided to take her writing elsewhere, setting up her own website to use. She did some initial probing of her userbase and they all said they'd be willing to pay $5 or so a month to be able to read the stuff that my step-mom writes, but obviously we don't want for these posts to be viewable to …
Category: Web

Change sign up fee in cart for subscription products WooCommerce

i am changing the price of products in cart like this add_action('woocommerce_before_calculate_totals', 'set_custom_price',1000,1); function set_custom_price($cart_obj) { foreach ($cart_obj->get_cart() as $key => $value) { if($value['alredy_have_number'] == true) { $value['data']->set_price(0.90); } } } It works fine for recurring price but I wants to change signup fee for subscription products. what function or hook can I use for that ?
Category: Web

Correct function to get the user's latest Woocommerce Subscription?

I've a members' only subscription site, where the member can only have one active subscription, and I need to be able to get the status of the subscription. I've been through all the documentation and found the wcs_get_users_subscriptions() function, which returns an array of all subscription products for the given user, in reverse date order (ie, latest is always first). I settled on this code which, whilst it works, I know is absolutely the wrong way to do it: $subs …
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.