Title: Not workgin
Last modified: August 30, 2016

---

# Not workgin

 *  [beseecher](https://wordpress.org/support/users/beseecher/)
 * (@beseecher)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/not-workgin/)
 * Try to change in the settings but the plugin does not save my changes. Why is
   this not supported at all?
 * [https://wordpress.org/plugins/woocommerce-direct-bulk-category-discount/](https://wordpress.org/plugins/woocommerce-direct-bulk-category-discount/)

Viewing 1 replies (of 1 total)

 *  [Dimitar A.](https://wordpress.org/support/users/mitegvg/)
 * (@mitegvg)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/not-workgin/#post-6474641)
 * Comment out line 107 and 189 in class/class-manage-discount.php:
 *     ```
       //if($isFlatDiscountOn == 'no') {
       // }
       ```
   
 * if you want to update prices automatically on product save add a metabox from
   line 191 and on:
 *     ```
       function woocm_cat_add_meta_box() {
   
       	$screens = array( 'product' );
   
       	foreach ( $screens as $screen ) {
   
       		add_meta_box(
       			'woocm_cat_sectionid',
       			__( 'Woocommerce Fields', 'woocm_cat_textdomain' ),
       			'woocm_cat_meta_box_callback',
       			$screen
       		);
       	}
       }
       add_action( 'add_meta_boxes', 'woocm_cat_add_meta_box' );
   
       /**
        * Prints the box content.
        *
        * @param WP_Post $post The object for the current post/page.
        */
       function woocm_cat_meta_box_callback( $post ) {
   
       	wp_nonce_field( 'woocm_cat_save_meta_box_data', 'woocm_cat_meta_box_nonce' );
       	echo '<div style="display:none">';
       	list_category_bulk_discount();
       	echo '</div>';
       }
   
       /**
        * When the post is saved, saves our custom data.
        *
        * @param int $post_id The ID of the post being saved.
        */
       function woocm_cat_save_meta_box_data( $post_id ) {
   
       	/*
       	 * We need to verify this came from our screen and with proper authorization,
       	 * because the save_post action can be triggered at other times.
       	 */
   
       	// Check if our nonce is set.
       	if ( ! isset( $_POST['woocm_cat_meta_box_nonce'] ) ) {
       		return;
       	}
   
       	// Verify that the nonce is valid.
       	if ( ! wp_verify_nonce( $_POST['woocm_cat_meta_box_nonce'], 'woocm_cat_save_meta_box_data' ) ) {
       		return;
       	}
   
       	// If this is an autosave, our form has not been submitted, so we don't want to do anything.
       	if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
       		return;
       	}
   
       	save_category_data();
   
       }
       add_action( 'save_post', 'woocm_cat_save_meta_box_data' );
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Not workgin’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/woocommerce-direct-bulk-category-
   discount_dbcfd3.svg)
 * [Woocommerce DBC Discount](https://wordpress.org/plugins/woocommerce-direct-bulk-category-discount/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-direct-bulk-category-discount/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-direct-bulk-category-discount/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-direct-bulk-category-discount/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-direct-bulk-category-discount/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-direct-bulk-category-discount/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Dimitar A.](https://wordpress.org/support/users/mitegvg/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/not-workgin/#post-6474641)
 * Status: not resolved