From c17068f855b9bb76da108507f3efb2895590105c Mon Sep 17 00:00:00 2001 From: Aunshon <32583103+Aunshon@users.noreply.github.com> Date: Thu, 5 Dec 2024 16:15:12 +0600 Subject: [PATCH] Save fixed as default commission type --- includes/Product/Hooks.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/Product/Hooks.php b/includes/Product/Hooks.php index 9ea3aa7606..bff815b7c0 100644 --- a/includes/Product/Hooks.php +++ b/includes/Product/Hooks.php @@ -2,6 +2,7 @@ namespace WeDevs\Dokan\Product; +use WeDevs\Dokan\Commission\Formula\Fixed; use WeDevs\Dokan\ProductCategory\Helper; use WC_Product; @@ -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 ); }