From 0d7f4d84141c369cebdaa97d23cbf11e7cb97157 Mon Sep 17 00:00:00 2001 From: HeyMehedi Date: Thu, 3 Nov 2022 14:06:39 +0600 Subject: [PATCH 1/6] Add filter for order items --- includes/checkout/class-checkout.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/checkout/class-checkout.php b/includes/checkout/class-checkout.php index 19d7499937..43d12604d4 100644 --- a/includes/checkout/class-checkout.php +++ b/includes/checkout/class-checkout.php @@ -242,6 +242,8 @@ private function create_order($listing_id = 0, $data = array()) $amount = $detail['price']; } } + $amount = apply_filters( 'atbdp_order_amount_pre', $amount, $order_id, $data ); + /*Lowercase alphanumeric characters, dashes and underscores are allowed.*/ $gateway = !empty($amount) && !empty($data['payment_gateway']) ? sanitize_key($data['payment_gateway']) : 'free'; // save required data as order post meta From 9b513e3595a59d78319012a3cfdcb44b09d61e8a Mon Sep 17 00:00:00 2001 From: HeyMehedi Date: Thu, 3 Nov 2022 14:13:42 +0600 Subject: [PATCH 2/6] Add: doc block for filter --- includes/checkout/class-checkout.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/checkout/class-checkout.php b/includes/checkout/class-checkout.php index 43d12604d4..a1c80868a1 100644 --- a/includes/checkout/class-checkout.php +++ b/includes/checkout/class-checkout.php @@ -242,6 +242,12 @@ private function create_order($listing_id = 0, $data = array()) $amount = $detail['price']; } } + + /** + * Filter the order amount before tax calculation + * + * @since 2.1.3 + */ $amount = apply_filters( 'atbdp_order_amount_pre', $amount, $order_id, $data ); /*Lowercase alphanumeric characters, dashes and underscores are allowed.*/ From 621ad40a03a837d7cb8e08f93a9af9e8b08c00d9 Mon Sep 17 00:00:00 2001 From: HeyMehedi Date: Thu, 3 Nov 2022 14:21:08 +0600 Subject: [PATCH 3/6] Hook name and version update --- includes/checkout/class-checkout.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/checkout/class-checkout.php b/includes/checkout/class-checkout.php index a1c80868a1..023620b51b 100644 --- a/includes/checkout/class-checkout.php +++ b/includes/checkout/class-checkout.php @@ -246,9 +246,9 @@ private function create_order($listing_id = 0, $data = array()) /** * Filter the order amount before tax calculation * - * @since 2.1.3 + * @since v7.4.3 */ - $amount = apply_filters( 'atbdp_order_amount_pre', $amount, $order_id, $data ); + $amount = apply_filters( 'directorist_order_amount_before_tax_calculation', $amount, $order_id, $data ); /*Lowercase alphanumeric characters, dashes and underscores are allowed.*/ $gateway = !empty($amount) && !empty($data['payment_gateway']) ? sanitize_key($data['payment_gateway']) : 'free'; From e391a7716493866711a4c67d2a71644c54ee9d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehedi=20Hasan=20=20=E2=9A=A1=EF=B8=8F?= Date: Mon, 6 Nov 2023 15:23:02 +0600 Subject: [PATCH 4/6] dynamic view count icon --- templates/archive/fields/category.php | 8 +++----- templates/archive/fields/view_count.php | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/templates/archive/fields/category.php b/templates/archive/fields/category.php index 1fd71bdd18..d67dfe77c5 100644 --- a/templates/archive/fields/category.php +++ b/templates/archive/fields/category.php @@ -6,14 +6,12 @@ */ if ( ! defined( 'ABSPATH' ) ) exit; - -$default_icon = 'las la-folder-open'; ?>
loop['cats'] ) ) { $term_icon = get_term_meta( $listings->loop['cats'][0]->term_id, 'category_icon', true ); - $term_icon = $term_icon ? $term_icon : $default_icon; + $term_icon = $term_icon ? $term_icon : $icon; $term_link = esc_url( get_term_link( $listings->loop['cats'][0]->term_id, ATBDP_CATEGORY ) ); $term_label = $listings->loop['cats'][0]->name; ?> @@ -27,7 +25,7 @@ loop['cats'], 1) as $cat) { $term_icon = get_term_meta( $cat->term_id, 'category_icon', true ); - $term_icon = $term_icon ? $term_icon : $default_icon; + $term_icon = $term_icon ? $term_icon : $icon; $term_link = esc_url( ATBDP_Permalink::atbdp_get_category_page( $cat ) ); $term_link = esc_url( get_term_link( $cat->term_id, ATBDP_CATEGORY ) ); $term_label = $cat->name; @@ -45,7 +43,7 @@ } } else { ?> - + diff --git a/templates/archive/fields/view_count.php b/templates/archive/fields/view_count.php index 6a904e247a..c4a0a2acca 100644 --- a/templates/archive/fields/view_count.php +++ b/templates/archive/fields/view_count.php @@ -8,4 +8,4 @@ if ( ! defined( 'ABSPATH' ) ) exit; ?> -
loop['post_view']) ? esc_html( $listings->loop['post_view'] ) : 0;?>
+
loop['post_view']) ? esc_html( $listings->loop['post_view'] ) : 0;?>
From 0188af48f5ecd063efa1ab92bd56b1a04aa60eba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehedi=20Hasan=20=20=E2=9A=A1=EF=B8=8F?= <43073560+HeyMehedi@users.noreply.github.com> Date: Sun, 3 Dec 2023 12:16:40 +0600 Subject: [PATCH 5/6] Update category.php --- templates/archive/fields/category.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/archive/fields/category.php b/templates/archive/fields/category.php index d67dfe77c5..842cedf246 100644 --- a/templates/archive/fields/category.php +++ b/templates/archive/fields/category.php @@ -2,7 +2,7 @@ /** * @author wpWax * @since 6.6 - * @version 7.4.0 + * @version 7.8.3 */ if ( ! defined( 'ABSPATH' ) ) exit; @@ -47,4 +47,4 @@ -
\ No newline at end of file + From 6b5537047518287e062245960b2b02ee99c8eb5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehedi=20Hasan=20=20=E2=9A=A1=EF=B8=8F?= <43073560+HeyMehedi@users.noreply.github.com> Date: Sun, 3 Dec 2023 12:17:26 +0600 Subject: [PATCH 6/6] Update view_count.php --- templates/archive/fields/view_count.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/archive/fields/view_count.php b/templates/archive/fields/view_count.php index c4a0a2acca..6a93edae89 100644 --- a/templates/archive/fields/view_count.php +++ b/templates/archive/fields/view_count.php @@ -2,7 +2,7 @@ /** * @author wpWax * @since 6.6 - * @version 7.4.0 + * @version 7.8.3 */ if ( ! defined( 'ABSPATH' ) ) exit;