Skip to content

Commit

Permalink
Save fixed as default commission type
Browse files Browse the repository at this point in the history
  • Loading branch information
Aunshon committed Dec 5, 2024
1 parent aa5c9ed commit c17068f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion includes/Product/Hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace WeDevs\Dokan\Product;

use WeDevs\Dokan\Commission\Formula\Fixed;
use WeDevs\Dokan\ProductCategory\Helper;
use WC_Product;

Expand Down Expand Up @@ -534,7 +535,7 @@ public static function save_per_product_commission_options( $post_id ) {
$additional_fee = '';

if ( isset( $_POST['_per_product_admin_commission_type'] ) ) { // phpcs:ignore
$commission_type = ! empty( $_POST['_per_product_admin_commission_type'] ) ? sanitize_text_field( $_POST['_per_product_admin_commission_type'] ) : 'percentage'; // phpcs:ignore
$commission_type = ! empty( $_POST['_per_product_admin_commission_type'] ) ? sanitize_text_field( $_POST['_per_product_admin_commission_type'] ) : Fixed::SOURCE; // phpcs:ignore
update_post_meta( $post_id, '_per_product_admin_commission_type', $commission_type );
}

Expand Down

0 comments on commit c17068f

Please sign in to comment.