Changeset 3269716
- Timestamp:
- 04/09/2025 01:00:44 PM (12 months ago)
- Location:
- rtdashboards/trunk
- Files:
-
- 3 edited
-
readme.txt (modified) (1 diff)
-
rtdashboards-woocommerce.php (modified) (1 diff)
-
rtdashboards.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
rtdashboards/trunk/readme.txt
r3250124 r3269716 4 4 Requires at least: 6.7 5 5 Tested up to: 6.7 6 Stable tag: 1. 0.16 Stable tag: 1.1.0 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
rtdashboards/trunk/rtdashboards-woocommerce.php
r3246600 r3269716 24 24 if (in_array('wc-'.$new_status, $success_statuses)) { 25 25 26 $price_setting = $options['rtdashboards_price_tax_field'] ?? 'incl_tax'; 27 26 28 // The total amount of the order can be retrieved from the $order object 27 $order_total = $order->get_total(); 29 $order_total = $price_setting === 'excl_tax' 30 ? $order->get_total() - $order->get_total_tax() 31 : $order->get_total(); 28 32 29 33 // POST request using WordPress's built-in WP_Http class -
rtdashboards/trunk/rtdashboards.php
r3250124 r3269716 64 64 65 65 add_settings_field( 66 'rtdashboards_price_tax_field', 67 __( 'Send Price', 'rtdashboards' ), 68 array( $this, 'rtdashboards_price_tax_field_render'), 69 'rtdashboardsPlugin', 70 'rtdashboards_rtdashboardsPlugin_section' 71 ); 72 73 add_settings_field( 66 74 'rtdashboards_successful_order_statuses_field', // Updated field name for clarity 67 75 __( 'Successful WooCommerce Order Statuses', 'rtdashboards' ), // Updated label for clarity … … 173 181 echo '</select>'; 174 182 } 183 184 function rtdashboards_price_tax_field_render() { 185 186 $options = get_option( 'rtdashboards_settings' ); 187 $selected = isset($options['rtdashboards_price_tax_field']) ? $options['rtdashboards_price_tax_field'] : 'incl_tax'; 188 ?> 189 <select name="rtdashboards_settings[rtdashboards_price_tax_field]"> 190 <option value="incl_tax" <?php selected( $selected, 'incl_tax' ); ?>> 191 <?php _e('Include VAT', 'rtdashboards'); ?> 192 </option> 193 <option value="excl_tax" <?php selected( $selected, 'excl_tax' ); ?>> 194 <?php _e('Exclude VAT', 'rtdashboards'); ?> 195 </option> 196 </select> 197 <p class="description"><?php _e('Determine whether the prices including or excluding VAT are sent to RTDashboards.', 'rtdashboards'); ?></p> 198 <?php 199 } 175 200 } 176 201
Note: See TracChangeset
for help on using the changeset viewer.