Plugin Directory

Changeset 3246162


Ignore:
Timestamp:
02/25/2025 06:02:28 AM (13 months ago)
Author:
avify
Message:

Update to version 1.3.4 from GitHub

Location:
avify
Files:
34 added
24 deleted
26 edited
1 copied

Legend:

Unmodified
Added
Removed
  • avify/tags/1.3.4/.git/FETCH_HEAD

    r3219249 r3246162  
    1 0f24b7f8556766a05b5143169c6dcf29357d9865        '0f24b7f8556766a05b5143169c6dcf29357d9865' of https://github.com/avify-com/avify-wordpress-plugin
     1adb70d1bc234513eb2511ca2af5ddd44c3ae2a6e        'adb70d1bc234513eb2511ca2af5ddd44c3ae2a6e' of https://github.com/avify-com/avify-wordpress-plugin
  • avify/tags/1.3.4/.git/HEAD

    r3219249 r3246162  
    1 0f24b7f8556766a05b5143169c6dcf29357d9865
     1adb70d1bc234513eb2511ca2af5ddd44c3ae2a6e
  • avify/tags/1.3.4/.git/config

    r3219249 r3246162  
    1010    auto = 0
    1111[http "https://github.com/"]
    12     extraheader = AUTHORIZATION: basic eC1hY2Nlc3MtdG9rZW46Z2hzX0kwU0xNOG5LNzdTSjJldVpQSnpUT0FHSDRqSFh3YTBJTFB2Zw==
     12    extraheader = AUTHORIZATION: basic eC1hY2Nlc3MtdG9rZW46Z2hzX2Zsdm1wVGNYQXdjOWh5Y05vcXZIaUZIZlBFRngzZzBiNFFTaw==
  • avify/tags/1.3.4/.git/logs/HEAD

    r3219249 r3246162  
    1 0000000000000000000000000000000000000000 0f24b7f8556766a05b5143169c6dcf29357d9865 runner <runner@fv-az1278-706.queh1xzsn3aexkx5dk5ryuekfg.dx.internal.cloudapp.net> 1736364414 +0000    checkout: moving from master to refs/tags/1.3.3
     10000000000000000000000000000000000000000 adb70d1bc234513eb2511ca2af5ddd44c3ae2a6e runner <runner@fv-az1694-59.weko0o5e0xoedci0i5ymhktqva.dx.internal.cloudapp.net> 1740463295 +0000 checkout: moving from master to refs/tags/1.3.4
  • avify/tags/1.3.4/.git/shallow

    r3219249 r3246162  
    1 0f24b7f8556766a05b5143169c6dcf29357d9865
     1adb70d1bc234513eb2511ca2af5ddd44c3ae2a6e
  • avify/tags/1.3.4/README.md

    r3219249 r3246162  
    55Requires at least: 5.6
    66Tested up to: 6.4.3
    7 Stable tag: 1.3.3
     7Stable tag: 1.3.4
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    6161
    6262## Changelog
     63
     64### 1.3.4
     65
     66* Avify product categories REST endpoint
    6367
    6468### 1.3.3
  • avify/tags/1.3.4/avify-checkout.php

    r3219249 r3246162  
    33    $options = get_option('avify-settings-options');
    44    if (($options['avify_enable_checkout'] ?? '') === 'on' && is_checkout()) {
    5         $v = '1.3.3';
     5        $v = '1.3.4';
    66        wp_enqueue_script('avify-checkout', plugin_dir_url( __FILE__ ) . '/assets/avify-checkout.js', array('jquery', 'jquery-ui-sortable', 'jquery-ui-resizable'), $v);
    77        wp_enqueue_style('avify-checkout', plugin_dir_url( __FILE__ ) . '/assets/avify-checkout.css', false, $v);
  • avify/tags/1.3.4/avify-payments-gateway.php

    r2984647 r3246162  
    44
    55class WC_Avify_Payments_Gateway extends WC_Payment_Gateway_CC {
    6 
     6    /**
     7     *
     8     */
    79    public function __construct() {
    810        //TODO: remove this
  • avify/tags/1.3.4/avify-rest.php

    r3211225 r3246162  
    11<?php
    2 function avify_v1_attachment(WP_REST_Request $request) {
    3     $jsonRequest = $request->get_json_params();
    4     $src = wp_get_attachment_url($jsonRequest['id'] ?? '');
    5     return new WP_REST_Response([
    6         'src' => $src
    7     ], 200);
     2
     3class WC_Avify_Rest {
     4    /**
     5     * Endpoint namespace.
     6     *
     7     * @var string
     8     */
     9    protected $namespace = 'avify/v1';
     10
     11    /**
     12     *
     13     */
     14    public function __construct() {
     15        add_action( 'rest_api_init', [ $this, 'register_routes' ] );
     16    }
     17
     18    /**
     19     * Check whether a given request has permission to read webhook deliveries.
     20     *
     21     * @param WP_REST_Request $request Full details about the request.
     22     *
     23     * @return WP_Error|boolean
     24     */
     25    public function get_items_permissions_check( $request ) {
     26        if ( ! $this->perform_basic_authentication() ) {
     27            return new WP_Error( 'woocommerce_rest_cannot_view', __( 'Sorry, you cannot list resources.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) );
     28        }
     29        return true;
     30    }
     31
     32    /**
     33     * @return void
     34     */
     35    public function register_routes() {
     36        register_rest_route(
     37            $this->namespace,
     38            '/product/categories/(?P<id>[\d]+)',
     39            array(
     40                array(
     41                    'methods'             => 'GET',
     42                    'callback'            => array( $this, 'avify_v1_products_categories' ),
     43                    'permission_callback' => array( $this, 'get_items_permissions_check' ),
     44                ),
     45                'schema' => array( $this, 'get_public_item_schema' ),
     46            )
     47        );
     48
     49        register_rest_route(
     50            $this->namespace,
     51            '/attachment',
     52            array(
     53                array(
     54                    'methods'             => 'POST',
     55                    'callback'            => array( $this, 'avify_v1_attachment' ),
     56                    // 'permission_callback' => array( $this, 'get_items_permissions_check' ),
     57                ),
     58                'schema' => array( $this, 'get_public_item_schema' ),
     59            )
     60        );
     61    }
     62
     63    //
     64
     65    /**
     66     * @param WP_REST_Request $request
     67     *
     68     * @return WP_Error|WP_HTTP_Response|WP_REST_Response
     69     */
     70    public function avify_v1_products_categories( WP_REST_Request $request ) {
     71        $product_id = $request->get_param( 'id' );
     72        $categories = wp_get_post_terms( $product_id, 'product_cat' );
     73        if ( empty( $categories ) || is_wp_error( $categories ) ) {
     74            return new WP_Error( 'no_categories', 'No se encontraron categorías para este producto', [ 'status' => 404 ] );
     75        }
     76
     77        $category_tree = [];
     78        foreach ( $categories as $category ) {
     79            $category_tree = array_merge( $category_tree, $this->avify_get_category_parents( $category ) );
     80        }
     81        $category_tree = array_values( array_unique( $category_tree, SORT_REGULAR ) );
     82
     83        return rest_ensure_response( $category_tree );
     84    }
     85
     86    /**
     87     * @param WP_REST_Request $request
     88     *
     89     * @return WP_Error|WP_HTTP_Response|WP_REST_Response
     90     */
     91    public function avify_v1_attachment( WP_REST_Request $request ) {
     92        //$attachment_id = $request->get_param( 'id' );
     93        $jsonRequest = $request->get_json_params();
     94        $attachment_id = $jsonRequest['id'] ?? '';
     95        $src         = wp_get_attachment_url( $attachment_id );
     96
     97        return rest_ensure_response( [
     98            'src' => $src
     99        ] );
     100    }
     101
     102    //
     103
     104    /**
     105     * Return the user data for the given consumer_key.
     106     *
     107     * @param string $consumer_key Consumer key.
     108     * @return stdClass
     109     */
     110    private function get_user_data_by_consumer_key( $consumer_key ) {
     111        global $wpdb;
     112
     113        return $wpdb->get_row(
     114            $wpdb->prepare(
     115                "
     116            SELECT key_id, user_id, permissions, consumer_key, consumer_secret, nonces
     117            FROM {$wpdb->prefix}woocommerce_api_keys
     118            WHERE consumer_key = %s
     119        ",
     120                wc_api_hash( sanitize_text_field( $consumer_key ) )
     121            )
     122        );
     123    }
     124
     125    /**
     126     * @return false|mixed
     127     */
     128    private function perform_basic_authentication() {
     129        $consumer_key      = '';
     130        $consumer_secret   = '';
     131
     132        // If the $_GET parameters are present, use those first.
     133        if ( ! empty( $_GET['consumer_key'] ) && ! empty( $_GET['consumer_secret'] ) ) { // WPCS: CSRF ok.
     134            $consumer_key    = $_GET['consumer_key']; // WPCS: CSRF ok, sanitization ok.
     135            $consumer_secret = $_GET['consumer_secret']; // WPCS: CSRF ok, sanitization ok.
     136        }
     137
     138        // If the above is not present, we will do full basic auth.
     139        if ( ! $consumer_key && ! empty( $_SERVER['PHP_AUTH_USER'] ) && ! empty( $_SERVER['PHP_AUTH_PW'] ) ) {
     140            $consumer_key    = $_SERVER['PHP_AUTH_USER']; // WPCS: CSRF ok, sanitization ok.
     141            $consumer_secret = $_SERVER['PHP_AUTH_PW']; // WPCS: CSRF ok, sanitization ok.
     142        }
     143
     144        // Stop if don't have any key.
     145        if ( ! $consumer_key || ! $consumer_secret ) {
     146            return false;
     147        }
     148
     149        // Get user data.
     150        $user = $this->get_user_data_by_consumer_key( $consumer_key );
     151        if ( empty( $user ) ) {
     152            return false;
     153        }
     154
     155        // Validate user secret.
     156        if ( ! hash_equals( $user->consumer_secret, $consumer_secret ) ) { // @codingStandardsIgnoreLine
     157            return false;
     158        }
     159
     160        return $user->user_id;
     161    }
     162
     163    /**
     164     * @param $category
     165     *
     166     * @return array
     167     */
     168    private function avify_get_category_parents( $category ) {
     169        $hierarchy = [];
     170        while ( $category ) {
     171            $hierarchy[] = [
     172                'id'          => $category->term_id,
     173                'name'        => $category->name,
     174                'slug'        => $category->slug,
     175                'parent'      => $category->parent,
     176                'description' => $category->description,
     177            ];
     178            if ( $category->parent == 0 ) {
     179                break;
     180            }
     181            $category = get_term( $category->parent, 'product_cat' );
     182        }
     183
     184        return array_reverse( $hierarchy );
     185    }
    8186}
    9187
    10 add_action('rest_api_init', function () {
    11     register_rest_route('avify/v1', '/attachment', [
    12         'methods' => 'POST',
    13         'callback' => 'avify_v1_attachment',
    14     ]);
    15 });
     188new WC_Avify_Rest();
  • avify/tags/1.3.4/avify-wordpress-initializer.php

    r3219249 r3246162  
    77 * Plugin URI:
    88 * Description: Connect your WooCommerce account to Avify and send all your orders to one centralized inventory.
    9  * Version: 1.3.3
     9 * Version: 1.3.4
    1010 * Author: Avify
    1111 * Author URI: https://avify.com/
  • avify/tags/1.3.4/readme.txt

    r3219249 r3246162  
    44Requires at least: 5.6
    55Tested up to: 6.4.3
    6 Stable tag: 1.3.3
     6Stable tag: 1.3.4
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    5959== Changelog ==
    6060
    61 ### 1.3.3
     61### 1.3.4
     62
     63* Avify product categories REST endpoint
     64
     65= 1.3.3 =
    6266
    6367* Fix subtotal visual error on checkout page
  • avify/tags/1.3.4/templates/checkout.php

    r3219249 r3246162  
    605605                                                $product_name      = apply_filters( 'woocommerce_cart_item_name', $product->get_name(), $cart_item, $cart_item_key );
    606606                                                $thumbnail         = apply_filters( 'woocommerce_cart_item_thumbnail', $product->get_image(), $cart_item, $cart_item_key );
    607                                                 $product_price     = apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $product ), $cart_item, $cart_item_key );
     607                                                $product_price     = apply_filters( 'woocommerce_cart_item_price', $cart->get_product_price( $product ), $cart_item, $cart_item_key );
    608608                                                $product_permalink = apply_filters( 'woocommerce_cart_item_permalink', $product->is_visible() ? $product->get_permalink( $cart_item ) : '', $cart_item, $cart_item_key );
    609609                                            ?>
     
    678678                            </div>
    679679
    680                             <div class="review-order-total-taxes review-order-total-part-container" style="<?= WC()->cart->display_prices_including_tax() ? "display: none" : "" ?>">
     680                            <div class="review-order-total-taxes review-order-total-part-container" style="<?= $cart && $cart->display_prices_including_tax() ? "display: none" : "" ?>">
    681681                                <div class="review-order-total-left-part">
    682682                                    <div class="avf_txt type-10">
  • avify/trunk/.git/FETCH_HEAD

    r3219249 r3246162  
    1 0f24b7f8556766a05b5143169c6dcf29357d9865        '0f24b7f8556766a05b5143169c6dcf29357d9865' of https://github.com/avify-com/avify-wordpress-plugin
     1adb70d1bc234513eb2511ca2af5ddd44c3ae2a6e        'adb70d1bc234513eb2511ca2af5ddd44c3ae2a6e' of https://github.com/avify-com/avify-wordpress-plugin
  • avify/trunk/.git/HEAD

    r3219249 r3246162  
    1 0f24b7f8556766a05b5143169c6dcf29357d9865
     1adb70d1bc234513eb2511ca2af5ddd44c3ae2a6e
  • avify/trunk/.git/config

    r3219249 r3246162  
    1010    auto = 0
    1111[http "https://github.com/"]
    12     extraheader = AUTHORIZATION: basic eC1hY2Nlc3MtdG9rZW46Z2hzX0kwU0xNOG5LNzdTSjJldVpQSnpUT0FHSDRqSFh3YTBJTFB2Zw==
     12    extraheader = AUTHORIZATION: basic eC1hY2Nlc3MtdG9rZW46Z2hzX2Zsdm1wVGNYQXdjOWh5Y05vcXZIaUZIZlBFRngzZzBiNFFTaw==
  • avify/trunk/.git/logs/HEAD

    r3219249 r3246162  
    1 0000000000000000000000000000000000000000 0f24b7f8556766a05b5143169c6dcf29357d9865 runner <runner@fv-az1278-706.queh1xzsn3aexkx5dk5ryuekfg.dx.internal.cloudapp.net> 1736364414 +0000    checkout: moving from master to refs/tags/1.3.3
     10000000000000000000000000000000000000000 adb70d1bc234513eb2511ca2af5ddd44c3ae2a6e runner <runner@fv-az1694-59.weko0o5e0xoedci0i5ymhktqva.dx.internal.cloudapp.net> 1740463295 +0000 checkout: moving from master to refs/tags/1.3.4
  • avify/trunk/.git/shallow

    r3219249 r3246162  
    1 0f24b7f8556766a05b5143169c6dcf29357d9865
     1adb70d1bc234513eb2511ca2af5ddd44c3ae2a6e
  • avify/trunk/README.md

    r3219249 r3246162  
    55Requires at least: 5.6
    66Tested up to: 6.4.3
    7 Stable tag: 1.3.3
     7Stable tag: 1.3.4
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    6161
    6262## Changelog
     63
     64### 1.3.4
     65
     66* Avify product categories REST endpoint
    6367
    6468### 1.3.3
  • avify/trunk/avify-checkout.php

    r3219249 r3246162  
    33    $options = get_option('avify-settings-options');
    44    if (($options['avify_enable_checkout'] ?? '') === 'on' && is_checkout()) {
    5         $v = '1.3.3';
     5        $v = '1.3.4';
    66        wp_enqueue_script('avify-checkout', plugin_dir_url( __FILE__ ) . '/assets/avify-checkout.js', array('jquery', 'jquery-ui-sortable', 'jquery-ui-resizable'), $v);
    77        wp_enqueue_style('avify-checkout', plugin_dir_url( __FILE__ ) . '/assets/avify-checkout.css', false, $v);
  • avify/trunk/avify-payments-gateway.php

    r2984647 r3246162  
    44
    55class WC_Avify_Payments_Gateway extends WC_Payment_Gateway_CC {
    6 
     6    /**
     7     *
     8     */
    79    public function __construct() {
    810        //TODO: remove this
  • avify/trunk/avify-rest.php

    r3211225 r3246162  
    11<?php
    2 function avify_v1_attachment(WP_REST_Request $request) {
    3     $jsonRequest = $request->get_json_params();
    4     $src = wp_get_attachment_url($jsonRequest['id'] ?? '');
    5     return new WP_REST_Response([
    6         'src' => $src
    7     ], 200);
     2
     3class WC_Avify_Rest {
     4    /**
     5     * Endpoint namespace.
     6     *
     7     * @var string
     8     */
     9    protected $namespace = 'avify/v1';
     10
     11    /**
     12     *
     13     */
     14    public function __construct() {
     15        add_action( 'rest_api_init', [ $this, 'register_routes' ] );
     16    }
     17
     18    /**
     19     * Check whether a given request has permission to read webhook deliveries.
     20     *
     21     * @param WP_REST_Request $request Full details about the request.
     22     *
     23     * @return WP_Error|boolean
     24     */
     25    public function get_items_permissions_check( $request ) {
     26        if ( ! $this->perform_basic_authentication() ) {
     27            return new WP_Error( 'woocommerce_rest_cannot_view', __( 'Sorry, you cannot list resources.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) );
     28        }
     29        return true;
     30    }
     31
     32    /**
     33     * @return void
     34     */
     35    public function register_routes() {
     36        register_rest_route(
     37            $this->namespace,
     38            '/product/categories/(?P<id>[\d]+)',
     39            array(
     40                array(
     41                    'methods'             => 'GET',
     42                    'callback'            => array( $this, 'avify_v1_products_categories' ),
     43                    'permission_callback' => array( $this, 'get_items_permissions_check' ),
     44                ),
     45                'schema' => array( $this, 'get_public_item_schema' ),
     46            )
     47        );
     48
     49        register_rest_route(
     50            $this->namespace,
     51            '/attachment',
     52            array(
     53                array(
     54                    'methods'             => 'POST',
     55                    'callback'            => array( $this, 'avify_v1_attachment' ),
     56                    // 'permission_callback' => array( $this, 'get_items_permissions_check' ),
     57                ),
     58                'schema' => array( $this, 'get_public_item_schema' ),
     59            )
     60        );
     61    }
     62
     63    //
     64
     65    /**
     66     * @param WP_REST_Request $request
     67     *
     68     * @return WP_Error|WP_HTTP_Response|WP_REST_Response
     69     */
     70    public function avify_v1_products_categories( WP_REST_Request $request ) {
     71        $product_id = $request->get_param( 'id' );
     72        $categories = wp_get_post_terms( $product_id, 'product_cat' );
     73        if ( empty( $categories ) || is_wp_error( $categories ) ) {
     74            return new WP_Error( 'no_categories', 'No se encontraron categorías para este producto', [ 'status' => 404 ] );
     75        }
     76
     77        $category_tree = [];
     78        foreach ( $categories as $category ) {
     79            $category_tree = array_merge( $category_tree, $this->avify_get_category_parents( $category ) );
     80        }
     81        $category_tree = array_values( array_unique( $category_tree, SORT_REGULAR ) );
     82
     83        return rest_ensure_response( $category_tree );
     84    }
     85
     86    /**
     87     * @param WP_REST_Request $request
     88     *
     89     * @return WP_Error|WP_HTTP_Response|WP_REST_Response
     90     */
     91    public function avify_v1_attachment( WP_REST_Request $request ) {
     92        //$attachment_id = $request->get_param( 'id' );
     93        $jsonRequest = $request->get_json_params();
     94        $attachment_id = $jsonRequest['id'] ?? '';
     95        $src         = wp_get_attachment_url( $attachment_id );
     96
     97        return rest_ensure_response( [
     98            'src' => $src
     99        ] );
     100    }
     101
     102    //
     103
     104    /**
     105     * Return the user data for the given consumer_key.
     106     *
     107     * @param string $consumer_key Consumer key.
     108     * @return stdClass
     109     */
     110    private function get_user_data_by_consumer_key( $consumer_key ) {
     111        global $wpdb;
     112
     113        return $wpdb->get_row(
     114            $wpdb->prepare(
     115                "
     116            SELECT key_id, user_id, permissions, consumer_key, consumer_secret, nonces
     117            FROM {$wpdb->prefix}woocommerce_api_keys
     118            WHERE consumer_key = %s
     119        ",
     120                wc_api_hash( sanitize_text_field( $consumer_key ) )
     121            )
     122        );
     123    }
     124
     125    /**
     126     * @return false|mixed
     127     */
     128    private function perform_basic_authentication() {
     129        $consumer_key      = '';
     130        $consumer_secret   = '';
     131
     132        // If the $_GET parameters are present, use those first.
     133        if ( ! empty( $_GET['consumer_key'] ) && ! empty( $_GET['consumer_secret'] ) ) { // WPCS: CSRF ok.
     134            $consumer_key    = $_GET['consumer_key']; // WPCS: CSRF ok, sanitization ok.
     135            $consumer_secret = $_GET['consumer_secret']; // WPCS: CSRF ok, sanitization ok.
     136        }
     137
     138        // If the above is not present, we will do full basic auth.
     139        if ( ! $consumer_key && ! empty( $_SERVER['PHP_AUTH_USER'] ) && ! empty( $_SERVER['PHP_AUTH_PW'] ) ) {
     140            $consumer_key    = $_SERVER['PHP_AUTH_USER']; // WPCS: CSRF ok, sanitization ok.
     141            $consumer_secret = $_SERVER['PHP_AUTH_PW']; // WPCS: CSRF ok, sanitization ok.
     142        }
     143
     144        // Stop if don't have any key.
     145        if ( ! $consumer_key || ! $consumer_secret ) {
     146            return false;
     147        }
     148
     149        // Get user data.
     150        $user = $this->get_user_data_by_consumer_key( $consumer_key );
     151        if ( empty( $user ) ) {
     152            return false;
     153        }
     154
     155        // Validate user secret.
     156        if ( ! hash_equals( $user->consumer_secret, $consumer_secret ) ) { // @codingStandardsIgnoreLine
     157            return false;
     158        }
     159
     160        return $user->user_id;
     161    }
     162
     163    /**
     164     * @param $category
     165     *
     166     * @return array
     167     */
     168    private function avify_get_category_parents( $category ) {
     169        $hierarchy = [];
     170        while ( $category ) {
     171            $hierarchy[] = [
     172                'id'          => $category->term_id,
     173                'name'        => $category->name,
     174                'slug'        => $category->slug,
     175                'parent'      => $category->parent,
     176                'description' => $category->description,
     177            ];
     178            if ( $category->parent == 0 ) {
     179                break;
     180            }
     181            $category = get_term( $category->parent, 'product_cat' );
     182        }
     183
     184        return array_reverse( $hierarchy );
     185    }
    8186}
    9187
    10 add_action('rest_api_init', function () {
    11     register_rest_route('avify/v1', '/attachment', [
    12         'methods' => 'POST',
    13         'callback' => 'avify_v1_attachment',
    14     ]);
    15 });
     188new WC_Avify_Rest();
  • avify/trunk/avify-wordpress-initializer.php

    r3219249 r3246162  
    77 * Plugin URI:
    88 * Description: Connect your WooCommerce account to Avify and send all your orders to one centralized inventory.
    9  * Version: 1.3.3
     9 * Version: 1.3.4
    1010 * Author: Avify
    1111 * Author URI: https://avify.com/
  • avify/trunk/readme.txt

    r3219249 r3246162  
    44Requires at least: 5.6
    55Tested up to: 6.4.3
    6 Stable tag: 1.3.3
     6Stable tag: 1.3.4
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    5959== Changelog ==
    6060
    61 ### 1.3.3
     61### 1.3.4
     62
     63* Avify product categories REST endpoint
     64
     65= 1.3.3 =
    6266
    6367* Fix subtotal visual error on checkout page
  • avify/trunk/templates/checkout.php

    r3219249 r3246162  
    605605                                                $product_name      = apply_filters( 'woocommerce_cart_item_name', $product->get_name(), $cart_item, $cart_item_key );
    606606                                                $thumbnail         = apply_filters( 'woocommerce_cart_item_thumbnail', $product->get_image(), $cart_item, $cart_item_key );
    607                                                 $product_price     = apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $product ), $cart_item, $cart_item_key );
     607                                                $product_price     = apply_filters( 'woocommerce_cart_item_price', $cart->get_product_price( $product ), $cart_item, $cart_item_key );
    608608                                                $product_permalink = apply_filters( 'woocommerce_cart_item_permalink', $product->is_visible() ? $product->get_permalink( $cart_item ) : '', $cart_item, $cart_item_key );
    609609                                            ?>
     
    678678                            </div>
    679679
    680                             <div class="review-order-total-taxes review-order-total-part-container" style="<?= WC()->cart->display_prices_including_tax() ? "display: none" : "" ?>">
     680                            <div class="review-order-total-taxes review-order-total-part-container" style="<?= $cart && $cart->display_prices_including_tax() ? "display: none" : "" ?>">
    681681                                <div class="review-order-total-left-part">
    682682                                    <div class="avf_txt type-10">
Note: See TracChangeset for help on using the changeset viewer.