Condless
Forum Replies Created
-
Forum: Plugins
In reply to: [User Posts Limit] How to limit posts by categoryHi, can you send us by Email the URL of the page which the users posts from?
Forum: Plugins
In reply to: [User Posts Limit] How to limit posts by categoryHi, this happens because the plugin can’t predict on which category the user gonna post, in some cases it may be possible to achieve that but will require customization.
Forum: Plugins
In reply to: [User Posts Limit] All users can only post 1 postPlease try posting from the backend with new user, after replacing your theme and deactivating all the other plugins
Forum: Plugins
In reply to: [User Posts Limit] All users can only post 1 postHi,
Check if the problem still persists when you set 0 in the rules field (first field in the plugin settings),
The users post from the Dashboard or from the frontend? any custom code was used?Forum: Plugins
In reply to: [User Posts Limit] How to limit posts by categoryHi, it may be possible but will require customization, you can contact us by Email
Forum: Plugins
In reply to: [User Posts Limit] How to limit posts by categorySince the post’s category is still unknown at the stage where the plugin checks if its allowed, it will be impossible to restrict by specific category.
Forum: Plugins
In reply to: [User Posts Limit] How to limit posts by categoryHi, unforutnately the plugin doesn’t offer a way to set rules based on categories
Forum: Plugins
In reply to: [User Posts Limit] Reset post count after product purchaseadd_filter( 'upl_query', 'upl_users_cycle', 10, 2 ); add_action( 'show_user_profile', 'upl_add_cycle_user_data' ); add_action( 'edit_user_profile', 'upl_add_cycle_user_data' ); add_action( 'personal_options_update', 'upl_save_cycle_user_data' ); add_action( 'edit_user_profile_update', 'upl_save_cycle_user_data' ); add_filter( 'manage_users_columns', 'upl_cycle_user_table' ); add_filter( 'manage_users_custom_column', 'upl_cycle_user_table_row', 10, 3 ); function upl_users_cycle( $args, $i ) { if ( ! user_can( $args['author'], get_option( 'upl_manage_cap', 'manage_options' ) ) ) { $rule_role = ''; $cycle = get_user_meta( $args['author'], 'cycle', true ); if ( ( empty( $rule_role ) || $rule_role === get_option( 'upl_user_role' )[ $i ] ) && ! empty( $cycle ) && $cycle <= current_time( 'Y-m-d' ) ) { $args['date_query']['after'] = date( 'Y-m-d', strtotime( $cycle . ' - 1 day' ) ); } } return $args; } function upl_add_cycle_user_data( $user ) { if ( current_user_can( get_option( 'upl_manage_cap', 'manage_options' ) ) ) { ?> <h3><?php esc_html_e( 'User Posts Limit', 'user-posts-limit' ); ?></h3> <table class="form-table"> <tr> <th><label for="cycle"><?php esc_html_e( 'Cycle', 'user-posts-limit' ); ?></label></th> <td><input type="date" min="1970-01-01" name="cycle" value="<?php echo esc_attr( get_user_meta( $user->ID, 'cycle', true ) ); ?>" class="regular-text" /></td> </tr> </table> <br> <?php } } function upl_save_cycle_user_data( $user_id ) { if ( current_user_can( get_option( 'upl_manage_cap', 'manage_options' ) ) ) { update_user_meta( $user_id, 'cycle', sanitize_text_field( $_POST['cycle'] ) ); } } function upl_cycle_user_table( $columns ) { $columns['cycle'] = __( 'Cycle', 'user-posts-limit' ); return $columns; } function upl_cycle_user_table_row( $row_output, $column_id_attr, $user_id ) { return 'cycle' === $column_id_attr ? get_user_meta( $user_id, 'cycle', true ) : $row_output; } add_action( 'woocommerce_order_status_completed', 'upl_wc_update_user_cycle' ); function upl_wc_update_user_cycle( $order_id ) { $products_id = [ '683' ]; // Here update your product ID $order = wc_get_order( $order_id ); $user_id = $order->get_user_id(); if ( ! user_can( $user_id, get_option( 'upl_manage_cap', 'manage_options' ) ) ) { foreach ( $order->get_items() as $item ) { if ( in_array( $item->get_product_id(), $products_id ) ) { if ( empty( get_user_meta( $user_id, 'cycle', true ) ) || get_user_meta( $user_id, 'cycle', true ) <= current_time( 'Y-m-d' ) ) { update_user_meta( $user_id, 'cycle', date( 'Y-m-d', strtotime( current_time( 'Y-m-d' ) . ' + 1 day' ) ) ); } break; } } } }Forum: Plugins
In reply to: [User Posts Limit] Reset post count after product purchaseHi,
2 code snippets should be copied into your functions.php file, the first appears under the ‘How to allow posts count reset per user?’, and the second under the ‘How to reset user’s posts count when purchase some product in WooCommerce?’, in the second snippet you should set the $product_id with the id of the product which will reset the count.
Then when some user purchase this product his count will be reset at the end of the day (12:00 AM).Forum: Plugins
In reply to: [User Posts Limit] Reset post count after product purchaseHi,
The posts count can be reset by the end of the day of the purchase, you can copy the code which appears under the ‘How to allow posts count reset per user?’, in addition to the code that you mentioned (just update the product id that grant the reset).Hi,
The additional parameters was added to the trigger (lines 703 and 822), you can redownload the plugin to try it.Hi Alex,
When using the redirect option the ‘text’ option field can be used to enter the redirection URL.You can go the the WordPress built-in editor (the link in the previous message) and press export (at the bottom of the page), the cities should exist there.
You can update the plugin to its latest release (backup your translation before), then the cities will be translatable via PO file editor or the WordPress built-in editor, if you use the WordPress editor when you finish to translate contact one of the language managers to approve it.
Thanks for the details, please check if it happends when you switch to another theme, and also when the Cities plugin is active but not applied on any country.