Plugin Directory

Changeset 3425970


Ignore:
Timestamp:
12/23/2025 08:52:57 AM (3 months ago)
Author:
camper2020
Message:

add rdwcom_enable_includes_tax_edit filter hook

Location:
rd-wc-order-modifier/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • rd-wc-order-modifier/trunk/changelog.txt

    r3232864 r3425970  
    11*** RD Order Modifier for WooCommerce Changelog ***
     2
     3= 1.1.4 =
     4Release Date – 23 December 2025
     5
     6*Compatibility update
     7*Add rdwcom_enable_includes_tax_edit filter hook to override per line item whether to apply tax modifier
     8
     9= 1.1.3 =
     10Release Date – 13 September 2025
     11
     12*Compatibility update
    213
    314= 1.1.2 =
  • rd-wc-order-modifier/trunk/classes/class.rdwcom-manager.php

    r3361101 r3425970  
    649649        $options = self::get_options();
    650650        if ( 'yes' == $options['activate_includes_tax_modifier'] ) :
     651            $enable_inc_tax_edit = true;
     652            //Add filter to override inc tax editing
     653            $enable_inc_tax_edit = apply_filters( 'rdwcom_enable_includes_tax_edit', $enable_inc_tax_edit, $product, $item, $item_id );
    651654            if ( 'line_item' == $item->get_type() ) :
    652655                $order = wc_get_order( $item->get_order_id() );
     
    683686                            ?>
    684687                        </div>
    685                         <?php if ( 'item_single' == $options['includes_tax_modifier_edit_mode'] ) : ?>
     688                        <?php if ( 'item_single' == $options['includes_tax_modifier_edit_mode'] ) :
     689                            if ( $enable_inc_tax_edit ) : ?>
    686690                        <div class="edit" style="display: none;">
    687691                            <div class="split-input">
     
    699703                            <input type="text" name="refund_line_incl_cost[<?php echo absint( $item_id ); ?>]" placeholder="<?php echo esc_attr( wc_format_localized_price( 0 ) ); ?>" data-inc-price="<?php echo esc_attr( wc_format_localized_price( $total_inc_price ) ); ?>" class="rdwcom_refund_line_total wc_input_price" />
    700704                        </div>
    701                         <?php endif; ?>
     705                        <?php
     706                            endif;
     707                        endif; ?>
    702708                        <?php if ( 'no' == $options['show_includes_tax_modifier_total_column'] ) : ?>
    703                             <?php if ( 'item_total' == $options['includes_tax_modifier_edit_mode'] ) : ?>
     709                            <?php if ( 'item_total' == $options['includes_tax_modifier_edit_mode'] ) :
     710                                if ( $enable_inc_tax_edit ) : ?>
    704711                            <div class="edit" style="display: none;">
    705712                                <div class="split-input">
     
    717724                                <input type="text" name="refund_line_incl_cost[<?php echo absint( $item_id ); ?>]" placeholder="<?php echo esc_attr( wc_format_localized_price( 0 ) ); ?>" data-inc-price="<?php echo esc_attr( wc_format_localized_price( $total_inc_price ) ); ?>" class="rdwcom_refund_line_total wc_input_price" />
    718725                            </div>
     726                                <?php endif; ?>
    719727                            <?php endif; ?>
    720728                        <?php endif; ?>
     
    742750                        </div>
    743751                        <?php if ( 'no' == $options['show_includes_tax_modifier_cost_column'] ) : ?>
    744                             <?php if ( 'item_single' == $options['includes_tax_modifier_edit_mode'] ) : ?>
     752                            <?php if ( 'item_single' == $options['includes_tax_modifier_edit_mode'] ) :
     753                                if ( $enable_inc_tax_edit ) : ?>
    745754                            <div class="edit" style="display: none;">
    746755                                <div class="split-input">
     
    758767                                <input type="text" name="refund_line_incl_cost[<?php echo absint( $item_id ); ?>]" placeholder="<?php echo esc_attr( wc_format_localized_price( 0 ) ); ?>" data-inc-price="<?php echo esc_attr( wc_format_localized_price( $total_inc_price ) ); ?>" class="rdwcom_refund_line_total wc_input_price" />
    759768                            </div>
     769                                <?php endif; ?>
    760770                            <?php endif; ?>
    761771                        <?php endif; ?>
    762772                        <?php if ( 'item_total' == $options['includes_tax_modifier_edit_mode'] ) : ?>
     773                            <?php if ( $enable_inc_tax_edit ) : ?>
    763774                        <div class="edit" style="display: none;">
    764775                            <div class="split-input">
     
    776787                            <input type="text" name="refund_line_incl_cost[<?php echo absint( $item_id ); ?>]" placeholder="<?php echo esc_attr( wc_format_localized_price( 0 ) ); ?>" data-inc-price="<?php echo esc_attr( wc_format_localized_price( $total_inc_price ) ); ?>" class="rdwcom_refund_line_total wc_input_price" />
    777788                        </div>
     789                            <?php endif; ?>
    778790                        <?php endif; ?>
    779791                    </td>
  • rd-wc-order-modifier/trunk/rd-wc-order-modifier.php

    r3361101 r3425970  
    33Plugin URI:
    44Description: Allows editing order items pricing inclusive of tax.
    5 Version: 1.1.3
     5Version: 1.1.4
    66Author: Robot Dwarf
    77Author URI: https://www.robotdwarf.com
    88WC requires at least: 4.7.2
    9 WC tested up to: 10.1.2
     9WC tested up to: 10.4.3
    1010Requires PHP: 7.2
    1111Requires at least: 5.0
     
    3030Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    3131
    32 Copyright 2010-2023 Robot Dwarf.
     32Copyright 2010-2025 Robot Dwarf.
    3333*/
    3434
     
    3737}
    3838
    39 define( 'RDWCOM_VERSION', '1.1.3' );
     39define( 'RDWCOM_VERSION', '1.1.4' );
    4040define('RDWCOM_URL', plugin_dir_url( __FILE__ ) );
    4141define( 'RDWCOM_PATH', plugin_dir_path( __FILE__ ) );
  • rd-wc-order-modifier/trunk/readme.txt

    r3361101 r3425970  
    33Tags: woocommerce, tax, vat, orders, order editing
    44Requires at least: 5.0
    5 Tested up to: 6.8.2
    6 Stable tag: 1.1.3
     5Tested up to: 6.9
     6Stable tag: 1.1.4
    77Requires PHP: 7.2
    88License: GPLv2 or later
     
    6868== Changelog ==
    6969
     70= 1.1.4 =
     71Release Date – 23 December 2025
     72*Compatibility update
     73*Add rdwcom_enable_includes_tax_edit filter hook to override per line item whether to apply tax modifier
     74
    7075= 1.1.3 =
    7176Release Date – 13 September 2025
Note: See TracChangeset for help on using the changeset viewer.