Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Woocomemrce subscriptions
Tagged: subscriptions
- This topic has 4 replies, 2 voices, and was last updated 5 years, 4 months ago by WCFM Forum.
- AuthorPosts
- August 8, 2019 at 10:18 am #75744kaloomeeParticipant
Hi
using woocommerce subscriptions plugin
I would like that when vendor creates new subscription – Products > Add new > ‘subscription’ (Simple or variable)
That a product category is always selected by default so that vendor does not have to select the product category
I have created a category specifically for subscriptions and this is the only category that subscriptions product should ever be placed in.Is this possible?
Regards
Kaloomee - August 8, 2019 at 11:06 am #75747kaloomeeParticipant
Would also like to make it so that subscriptions product is always set to ‘Virtual’
and hide ‘catalog’ and ‘downloadable’ as these would not apply to a subscription - August 12, 2019 at 7:54 am #76191WCFM ForumMember
Hi,
I have created a category specifically for subscriptions and this is the only category that subscriptions product should ever be placed in.
– Possibly, please know me that category ID.
Other things are also possible, will give you code for that.
Thank You
- August 12, 2019 at 9:39 am #76227kaloomeeParticipant
Hi
Thank you for reply
Since posting this, Over the weekend I have found part solution using :-
Settings > Product Type Specific Category Setup
Selected – Simple subscription Categories then chose the categroy from the dropdown list of product categoriesGreat feature, wonderful product
Still learning 🙂Now just need to be able to hide ‘Catalog’ Correct English used in UK for this is spelt ‘cataloguue’
And downloadable for both of the subscriptions product typeRegards
Kaloomee - August 13, 2019 at 5:19 am #76347WCFM ForumMember
Hi,
Please use this code to change “catalog” label all over –
function wcfm_custom_1208_translate_text( $translated ) { $translated = str_ireplace( 'Catalog', 'Cataloguue', $translated ); return $translated; } add_filter('gettext', 'wcfm_custom_1208_translate_text'); add_filter('ngettext', 'wcfm_custom_1208_translate_text');
Here is your code to hide “Downloadable” for subscription products –
add_filter( 'wcfm_product_manage_fields_general', function( $general_fields, $product_id, $product_type ) { if( isset( $general_fields['is_downloadable'] ) ) { $general_fields['is_downloadable']['class'] .= 'non-subscription'; $general_fields['is_downloadable']['desc_class'] .= 'non-subscription'; } return $general_fields; }, 50, 3 );
Add this code to your child theme’s functions.php
In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/Thank You
- AuthorPosts
- You must be logged in to reply to this topic.