Condless
Forum Replies Created
-
Forum: Plugins
In reply to: [Unit Price for WooCommerce] Unit Precision for smaller weightsHi,
Please try the same settings but with Measurements: none.Forum: Plugins
In reply to: [Unit Price for WooCommerce] Show weight total instead subtotalHi,
The plugin doesn’t offer such feature.Forum: Plugins
In reply to: [User Posts Limit] Limit total WooCommerce orders without setting a role3. try ‘manage_options’ in the ‘Plugin Management Capability’ option (it must contain a capability that the Kitchen Manager role doesn’t have).
Forum: Plugins
In reply to: [User Posts Limit] Limit total WooCommerce orders without setting a roleYou can enable the ‘Documents Statistics’ option and see the counts in the users table list (Dashboard => Users).
1. ‘Monthly’ cycle means that orders older than 30 days won’t be counted.
2. The code from the previous comment should fit.
3. Use the code as is, you can also replace ‘.button’ with more specific class/id of your add to cart button.Forum: Plugins
In reply to: [User Posts Limit] Limit total WooCommerce orders without setting a role1. Can you further explain what you are trying to achieve?
2. You can prevent shop owners from deleting completed orders from the last month:
add_filter( 'pre_delete_post', 'upl_restrict_post_deletion', 10, 2 ); function upl_restrict_post_deletion( $check, $post ) { return ! current_user_can( get_option( 'upl_manage_cap' ) ) && 'shop_order' === get_post_type( $post ) && 'wc-completed' === get_post_meta( $post->ID, '_wp_trash_meta_status', true ) && strtotime( get_the_date( 'Y-m-d', $post ) . ' + 1 month' ) > strtotime( date( 'Y-m-d' ) ) ? false : $check; }3. Hide buttons if limit exceeded (update the button’s class):
add_action( 'wp_head', 'upl_hide_button' ); function upl_hide_button() { echo do_shortcode( '[upl_hide type="shop_order" message="<style>.button{ display: none !important; }<style>"][/upl_hide]' ); }Try the following product settings:
Product price (general tab)- 0.036 (the price for 1g), Weight (Shipping tab)- empty
Unit price tab: Dimensions- empty, Quantity Step- 50, Price Quantity: 1000, Price Suffix: /kgHi,
Make sure the ‘Price Quantity’ option is empty (and all the other options except ‘Quantity Step’).Hi,
In case the customer should choose how many units he wants from the product (like 1/2/3)
and you want to display the price per kg use only the ‘Price Quantity’ option (Enable ‘Price for display’ option).
in case the customer should choose how much weight he wants from the product (like 50/100/150) use just the Quantity Step option.Forum: Plugins
In reply to: [Unit Price for WooCommerce] Add multiple different variantsHi,
To add the possibility of adding several different variants of the same product add this to your functions.php file:
add_filter( 'upw_remove_other_variations', '__return_false' );Forum: Plugins
In reply to: [User Posts Limit] Limit total WooCommerce orders without setting a roleHi,
To limit by the total number for orders and for products, and apply the order limit on all users/guests redownload the plugin and use the following code instead of the previous one:add_filter( 'upl_query', 'upl_limit_total_posts' ); add_filter( 'upl_rule_limit_current_user_role_check', 'upl_disable_user_role', 10, 2 ); function upl_limit_total_posts( $args ) { $post_types = [ 'shop_order', 'product' ]; if ( in_array( $args['post_type'], $post_types ) ) { unset( $args['author'] ); } return $args; } function upl_disable_user_role( $check, $i ) { $post_type = 'shop_order'; return $post_type === get_option( 'upl_posts_type' )[ $i ] ? true : $check; }Forum: Plugins
In reply to: [User Posts Limit] Limit total WooCommerce orders without setting a roleYes, functions.php of your theme (preferably child theme).
Forum: Plugins
In reply to: [User Posts Limit] Limit total WooCommerce orders without setting a roleHi,
To limit the orders regardless of the user role use the code from the plugin’s docs ‘How to make rules that applied on certain post type to limit by the total posts in the website?’ and update: $post_type = ‘shop_order’;Forum: Plugins
In reply to: [User Posts Limit] Reset Limit by CalendarHi,
Use the code from the plugin’s docs ‘How to modify the cycle for rules that applied on certain post type?’, update your post type in $post_type and $cycle = ‘today’;Hi Zubair,
An answer was given by Email.Forum: Plugins
In reply to: [Unit Price for WooCommerce] Issue with minimum quantity stepHi Alaid,
A fix for your theme was given by Email.