Changeset 3495455
- Timestamp:
- 03/31/2026 10:35:06 AM (5 days ago)
- Location:
- probo-connect
- Files:
-
- 14 edited
- 1 copied
-
tags/1.2.2 (copied) (copied from probo-connect/trunk)
-
tags/1.2.2/includes/admin/class-probo-settings.php (modified) (1 diff)
-
tags/1.2.2/includes/frontend/class-probo-hooks.php (modified) (2 diffs)
-
tags/1.2.2/languages/probo-connect-de_DE.po (modified) (1 diff)
-
tags/1.2.2/languages/probo-connect-nl_BE.po (modified) (1 diff)
-
tags/1.2.2/languages/probo-connect-nl_NL.po (modified) (1 diff)
-
tags/1.2.2/probo-connect.php (modified) (1 diff)
-
tags/1.2.2/readme.txt (modified) (3 diffs)
-
trunk/includes/admin/class-probo-settings.php (modified) (1 diff)
-
trunk/includes/frontend/class-probo-hooks.php (modified) (2 diffs)
-
trunk/languages/probo-connect-de_DE.po (modified) (1 diff)
-
trunk/languages/probo-connect-nl_BE.po (modified) (1 diff)
-
trunk/languages/probo-connect-nl_NL.po (modified) (1 diff)
-
trunk/probo-connect.php (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
probo-connect/tags/1.2.2/includes/admin/class-probo-settings.php
r3494752 r3495455 1114 1114 ), 1115 1115 array( 1116 'title' => __( 'Show summary in mini cart', 'probo-connect' ), 1117 'id' => 'probo_show_options_in_minicart', 1118 'desc' => __( 'Show the selected configurator options below the product name in the mini cart.', 'probo-connect' ), 1119 'type' => 'checkbox', 1120 'default' => 'yes', 1121 ), 1122 array( 1116 1123 'title' => __( 'Require confirmed upload', 'probo-connect' ), 1117 1124 'desc' => __( 'Block checkout if a cart item with a Probo file uploader has not been confirmed yet. The customer must upload and confirm their file before placing the order.', 'probo-connect' ), -
probo-connect/tags/1.2.2/includes/frontend/class-probo-hooks.php
r3494752 r3495455 70 70 add_filter( 'woocommerce_cart_calculate_fees', array( $this, 'probo_cart_calculate_fees' ) ); 71 71 add_action( 'woocommerce_after_cart_item_name', array( $this, 'probo_upload_field_to_cart_items' ), 10, 2 ); 72 add_filter( 'woocommerce_get_item_data', array( $this, 'probo_get_item_data' ), 10, 2 ); 72 73 add_filter( 'woocommerce_cart_item_quantity', array( $this, 'probo_cart_item_quantity' ), 10, 3 ); 73 74 add_action( 'woocommerce_checkout_create_order_line_item', array( $this, 'probo_checkout_create_order_line_item' ), 10, 4 ); … … 222 223 PROBO_PLUGIN_PATH . 'templates/' 223 224 ); 225 } 226 227 /** 228 * Adds selected configurator options to the mini cart item data display. 229 * 230 * Uses the `woocommerce_get_item_data` filter so WooCommerce renders the 231 * selected options in the mini cart widget and blocks mini cart drawer. 232 * 233 * @param array $item_data The existing item data array. 234 * @param array $cart_item The cart item details. 235 * 236 * @return array The item data with Probo options appended. 237 * @since 1.2.1 238 * @version 1.2.1 239 */ 240 public function probo_get_item_data( $item_data, $cart_item ) { 241 // The cart page already renders options via woocommerce_after_cart_item_name. 242 if ( is_cart() || 'yes' !== get_option( 'probo_show_options_in_minicart', 'yes' ) || empty( $cart_item[ Probo_Meta_Keys::OPTIONS ] ) ) { 243 return $item_data; 244 } 245 246 $formatted = probo()->format_selected_options( $cart_item[ Probo_Meta_Keys::OPTIONS ] ); 247 $lines = array(); 248 249 if ( isset( $formatted['size'] ) ) { 250 $lines[] = esc_html( $formatted['size']['name'] ) . ': ' . esc_html( trim( $formatted['size']['value'] . ' ' . $formatted['size']['unit_code'] ) ); 251 } 252 253 if ( isset( $formatted['options'] ) && is_array( $formatted['options'] ) ) { 254 foreach ( $formatted['options'] as $option ) { 255 $value = $option['name']; 256 if ( ! empty( $option['value'] ) ) { 257 $value .= ' (' . $option['value'] . ')'; 258 } 259 $lines[] = esc_html( $option['parent_name'] ) . ': ' . esc_html( $value ); 260 } 261 } 262 263 if ( ! empty( $lines ) ) { 264 $item_data[] = array( 265 'name' => '', 266 'value' => implode( ' / ', $lines ), 267 'display' => implode( '<br>', $lines ), 268 ); 269 } 270 271 return $item_data; 224 272 } 225 273 -
probo-connect/tags/1.2.2/languages/probo-connect-de_DE.po
r3494752 r3495455 1572 1572 msgstr "Nein" 1573 1573 1574 #: includes/admin/class-probo-settings.php:1569 1574 #: includes/admin/class-probo-settings.php:1116 1575 msgid "Show summary in mini cart" 1576 msgstr "Zusammenfassung im Miniwarenkorb anzeigen" 1577 1578 #: includes/admin/class-probo-settings.php:1118 1579 msgid "Show the selected configurator options below the product name in the mini cart." 1580 msgstr "Zeigt die ausgewählten Konfigurator-Optionen unterhalb des Produktnamens im Miniwarenkorb an." 1581 1582 #: includes/admin/class-probo-settings.php:1575 1575 1583 msgid "Logging" 1576 1584 msgstr "" -
probo-connect/tags/1.2.2/languages/probo-connect-nl_BE.po
r3494752 r3495455 1198 1198 msgstr "Ontwikkelaar" 1199 1199 1200 #: includes/admin/class-probo-settings.php 1201 msgid "Show summary in mini cart" 1202 msgstr "Samenvatting tonen in minicart" 1203 1204 #: includes/admin/class-probo-settings.php 1205 msgid "Show the selected configurator options below the product name in the mini cart." 1206 msgstr "Toon de geselecteerde configurator-opties onder de productnaam in de minicart." 1207 1200 1208 #: includes/admin/class-probo-settings.php:970 1201 1209 msgid "Auto load the configurator" -
probo-connect/tags/1.2.2/languages/probo-connect-nl_NL.po
r3494752 r3495455 1527 1527 msgstr "Nee" 1528 1528 1529 #: includes/admin/class-probo-settings.php:1569 1529 #: includes/admin/class-probo-settings.php:1116 1530 msgid "Show summary in mini cart" 1531 msgstr "Samenvatting tonen in minicart" 1532 1533 #: includes/admin/class-probo-settings.php:1118 1534 msgid "Show the selected configurator options below the product name in the mini cart." 1535 msgstr "Toon de geselecteerde configurator-opties onder de productnaam in de minicart." 1536 1537 #: includes/admin/class-probo-settings.php:1575 1530 1538 msgid "Logging" 1531 1539 msgstr "" -
probo-connect/tags/1.2.2/probo-connect.php
r3495422 r3495455 13 13 * Plugin URI: https://www.probo.nl/ 14 14 * Description: Plugin to connect Probo API to WooCommerce. 15 * Version: 1.2. 115 * Version: 1.2.2 16 16 * Requires at least: 6.7 17 17 * Requires PHP: 8.0 -
probo-connect/tags/1.2.2/readme.txt
r3495422 r3495455 3 3 Requires at least: 6.7 4 4 Tested up to: 6.9 5 Stable tag: 1.2. 15 Stable tag: 1.2.2 6 6 Requires PHP: 8.0 7 7 License: GPLv2 or later … … 39 39 Service Provider: [Probo Print BV](https://www.probo.nl) 40 40 41 Data Transmitted 41 Data Transmitted: 42 42 43 43 * Customer name and shipping address … … 64 64 65 65 == Changelog == 66 = 1.2.2 = 67 * Added: Option to show selected configurator options in the mini cart (WooCommerce blocks compatible). 68 * Fixed: Mini cart now displays options on separate lines instead of separated by slashes. 69 66 70 = 1.2.1 = 67 71 * Fixed Bug in calculation checkout 68 72 69 73 = 1.2.0 = 70 * Added Menu for easy Probo related navigation71 * Added New uploader type; Files after order. Initiates an probo uploader session72 * Added Uploader sessions page, to manually set the status for uploaders or to check these.73 * Added Probo Configurable Product => Pricing discounts per user and per product.74 * Updated Settings to be more clear and understandable.74 * Added: Menu for easy Probo related navigation 75 * Added: New uploader type; Files after order. Initiates an probo uploader session/ 76 * Added: Uploader sessions page, to manually set the status for uploaders or to check these. 77 * Added: Probo Configurable Product => Pricing discounts per user and per product. 78 * Updated: Settings to be more clear and understandable. 75 79 * Fixed Bugs 76 80 -
probo-connect/trunk/includes/admin/class-probo-settings.php
r3494752 r3495455 1114 1114 ), 1115 1115 array( 1116 'title' => __( 'Show summary in mini cart', 'probo-connect' ), 1117 'id' => 'probo_show_options_in_minicart', 1118 'desc' => __( 'Show the selected configurator options below the product name in the mini cart.', 'probo-connect' ), 1119 'type' => 'checkbox', 1120 'default' => 'yes', 1121 ), 1122 array( 1116 1123 'title' => __( 'Require confirmed upload', 'probo-connect' ), 1117 1124 'desc' => __( 'Block checkout if a cart item with a Probo file uploader has not been confirmed yet. The customer must upload and confirm their file before placing the order.', 'probo-connect' ), -
probo-connect/trunk/includes/frontend/class-probo-hooks.php
r3494752 r3495455 70 70 add_filter( 'woocommerce_cart_calculate_fees', array( $this, 'probo_cart_calculate_fees' ) ); 71 71 add_action( 'woocommerce_after_cart_item_name', array( $this, 'probo_upload_field_to_cart_items' ), 10, 2 ); 72 add_filter( 'woocommerce_get_item_data', array( $this, 'probo_get_item_data' ), 10, 2 ); 72 73 add_filter( 'woocommerce_cart_item_quantity', array( $this, 'probo_cart_item_quantity' ), 10, 3 ); 73 74 add_action( 'woocommerce_checkout_create_order_line_item', array( $this, 'probo_checkout_create_order_line_item' ), 10, 4 ); … … 222 223 PROBO_PLUGIN_PATH . 'templates/' 223 224 ); 225 } 226 227 /** 228 * Adds selected configurator options to the mini cart item data display. 229 * 230 * Uses the `woocommerce_get_item_data` filter so WooCommerce renders the 231 * selected options in the mini cart widget and blocks mini cart drawer. 232 * 233 * @param array $item_data The existing item data array. 234 * @param array $cart_item The cart item details. 235 * 236 * @return array The item data with Probo options appended. 237 * @since 1.2.1 238 * @version 1.2.1 239 */ 240 public function probo_get_item_data( $item_data, $cart_item ) { 241 // The cart page already renders options via woocommerce_after_cart_item_name. 242 if ( is_cart() || 'yes' !== get_option( 'probo_show_options_in_minicart', 'yes' ) || empty( $cart_item[ Probo_Meta_Keys::OPTIONS ] ) ) { 243 return $item_data; 244 } 245 246 $formatted = probo()->format_selected_options( $cart_item[ Probo_Meta_Keys::OPTIONS ] ); 247 $lines = array(); 248 249 if ( isset( $formatted['size'] ) ) { 250 $lines[] = esc_html( $formatted['size']['name'] ) . ': ' . esc_html( trim( $formatted['size']['value'] . ' ' . $formatted['size']['unit_code'] ) ); 251 } 252 253 if ( isset( $formatted['options'] ) && is_array( $formatted['options'] ) ) { 254 foreach ( $formatted['options'] as $option ) { 255 $value = $option['name']; 256 if ( ! empty( $option['value'] ) ) { 257 $value .= ' (' . $option['value'] . ')'; 258 } 259 $lines[] = esc_html( $option['parent_name'] ) . ': ' . esc_html( $value ); 260 } 261 } 262 263 if ( ! empty( $lines ) ) { 264 $item_data[] = array( 265 'name' => '', 266 'value' => implode( ' / ', $lines ), 267 'display' => implode( '<br>', $lines ), 268 ); 269 } 270 271 return $item_data; 224 272 } 225 273 -
probo-connect/trunk/languages/probo-connect-de_DE.po
r3494752 r3495455 1572 1572 msgstr "Nein" 1573 1573 1574 #: includes/admin/class-probo-settings.php:1569 1574 #: includes/admin/class-probo-settings.php:1116 1575 msgid "Show summary in mini cart" 1576 msgstr "Zusammenfassung im Miniwarenkorb anzeigen" 1577 1578 #: includes/admin/class-probo-settings.php:1118 1579 msgid "Show the selected configurator options below the product name in the mini cart." 1580 msgstr "Zeigt die ausgewählten Konfigurator-Optionen unterhalb des Produktnamens im Miniwarenkorb an." 1581 1582 #: includes/admin/class-probo-settings.php:1575 1575 1583 msgid "Logging" 1576 1584 msgstr "" -
probo-connect/trunk/languages/probo-connect-nl_BE.po
r3494752 r3495455 1198 1198 msgstr "Ontwikkelaar" 1199 1199 1200 #: includes/admin/class-probo-settings.php 1201 msgid "Show summary in mini cart" 1202 msgstr "Samenvatting tonen in minicart" 1203 1204 #: includes/admin/class-probo-settings.php 1205 msgid "Show the selected configurator options below the product name in the mini cart." 1206 msgstr "Toon de geselecteerde configurator-opties onder de productnaam in de minicart." 1207 1200 1208 #: includes/admin/class-probo-settings.php:970 1201 1209 msgid "Auto load the configurator" -
probo-connect/trunk/languages/probo-connect-nl_NL.po
r3494752 r3495455 1527 1527 msgstr "Nee" 1528 1528 1529 #: includes/admin/class-probo-settings.php:1569 1529 #: includes/admin/class-probo-settings.php:1116 1530 msgid "Show summary in mini cart" 1531 msgstr "Samenvatting tonen in minicart" 1532 1533 #: includes/admin/class-probo-settings.php:1118 1534 msgid "Show the selected configurator options below the product name in the mini cart." 1535 msgstr "Toon de geselecteerde configurator-opties onder de productnaam in de minicart." 1536 1537 #: includes/admin/class-probo-settings.php:1575 1530 1538 msgid "Logging" 1531 1539 msgstr "" -
probo-connect/trunk/probo-connect.php
r3495422 r3495455 13 13 * Plugin URI: https://www.probo.nl/ 14 14 * Description: Plugin to connect Probo API to WooCommerce. 15 * Version: 1.2. 115 * Version: 1.2.2 16 16 * Requires at least: 6.7 17 17 * Requires PHP: 8.0 -
probo-connect/trunk/readme.txt
r3495422 r3495455 3 3 Requires at least: 6.7 4 4 Tested up to: 6.9 5 Stable tag: 1.2. 15 Stable tag: 1.2.2 6 6 Requires PHP: 8.0 7 7 License: GPLv2 or later … … 39 39 Service Provider: [Probo Print BV](https://www.probo.nl) 40 40 41 Data Transmitted 41 Data Transmitted: 42 42 43 43 * Customer name and shipping address … … 64 64 65 65 == Changelog == 66 = 1.2.2 = 67 * Added: Option to show selected configurator options in the mini cart (WooCommerce blocks compatible). 68 * Fixed: Mini cart now displays options on separate lines instead of separated by slashes. 69 66 70 = 1.2.1 = 67 71 * Fixed Bug in calculation checkout 68 72 69 73 = 1.2.0 = 70 * Added Menu for easy Probo related navigation71 * Added New uploader type; Files after order. Initiates an probo uploader session72 * Added Uploader sessions page, to manually set the status for uploaders or to check these.73 * Added Probo Configurable Product => Pricing discounts per user and per product.74 * Updated Settings to be more clear and understandable.74 * Added: Menu for easy Probo related navigation 75 * Added: New uploader type; Files after order. Initiates an probo uploader session/ 76 * Added: Uploader sessions page, to manually set the status for uploaders or to check these. 77 * Added: Probo Configurable Product => Pricing discounts per user and per product. 78 * Updated: Settings to be more clear and understandable. 75 79 * Fixed Bugs 76 80
Note: See TracChangeset
for help on using the changeset viewer.