Plugin Directory

Changeset 3495455


Ignore:
Timestamp:
03/31/2026 10:35:06 AM (5 days ago)
Author:
proboconnect
Message:

Update to version 1.2.2 from GitHub

Location:
probo-connect
Files:
14 edited
1 copied

Legend:

Unmodified
Added
Removed
  • probo-connect/tags/1.2.2/includes/admin/class-probo-settings.php

    r3494752 r3495455  
    11141114            ),
    11151115            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(
    11161123                'title'   => __( 'Require confirmed upload', 'probo-connect' ),
    11171124                '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  
    7070        add_filter( 'woocommerce_cart_calculate_fees', array( $this, 'probo_cart_calculate_fees' ) );
    7171        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 );
    7273        add_filter( 'woocommerce_cart_item_quantity', array( $this, 'probo_cart_item_quantity' ), 10, 3 );
    7374        add_action( 'woocommerce_checkout_create_order_line_item', array( $this, 'probo_checkout_create_order_line_item' ), 10, 4 );
     
    222223            PROBO_PLUGIN_PATH . 'templates/'
    223224        );
     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;
    224272    }
    225273
  • probo-connect/tags/1.2.2/languages/probo-connect-de_DE.po

    r3494752 r3495455  
    15721572msgstr "Nein"
    15731573
    1574 #: includes/admin/class-probo-settings.php:1569
     1574#: includes/admin/class-probo-settings.php:1116
     1575msgid "Show summary in mini cart"
     1576msgstr "Zusammenfassung im Miniwarenkorb anzeigen"
     1577
     1578#: includes/admin/class-probo-settings.php:1118
     1579msgid "Show the selected configurator options below the product name in the mini cart."
     1580msgstr "Zeigt die ausgewählten Konfigurator-Optionen unterhalb des Produktnamens im Miniwarenkorb an."
     1581
     1582#: includes/admin/class-probo-settings.php:1575
    15751583msgid "Logging"
    15761584msgstr ""
  • probo-connect/tags/1.2.2/languages/probo-connect-nl_BE.po

    r3494752 r3495455  
    11981198msgstr "Ontwikkelaar"
    11991199
     1200#: includes/admin/class-probo-settings.php
     1201msgid "Show summary in mini cart"
     1202msgstr "Samenvatting tonen in minicart"
     1203
     1204#: includes/admin/class-probo-settings.php
     1205msgid "Show the selected configurator options below the product name in the mini cart."
     1206msgstr "Toon de geselecteerde configurator-opties onder de productnaam in de minicart."
     1207
    12001208#: includes/admin/class-probo-settings.php:970
    12011209msgid "Auto load the configurator"
  • probo-connect/tags/1.2.2/languages/probo-connect-nl_NL.po

    r3494752 r3495455  
    15271527msgstr "Nee"
    15281528
    1529 #: includes/admin/class-probo-settings.php:1569
     1529#: includes/admin/class-probo-settings.php:1116
     1530msgid "Show summary in mini cart"
     1531msgstr "Samenvatting tonen in minicart"
     1532
     1533#: includes/admin/class-probo-settings.php:1118
     1534msgid "Show the selected configurator options below the product name in the mini cart."
     1535msgstr "Toon de geselecteerde configurator-opties onder de productnaam in de minicart."
     1536
     1537#: includes/admin/class-probo-settings.php:1575
    15301538msgid "Logging"
    15311539msgstr ""
  • probo-connect/tags/1.2.2/probo-connect.php

    r3495422 r3495455  
    1313 * Plugin URI:        https://www.probo.nl/
    1414 * Description:       Plugin to connect Probo API to WooCommerce.
    15  * Version:           1.2.1
     15 * Version:           1.2.2
    1616 * Requires at least: 6.7
    1717 * Requires PHP:      8.0
  • probo-connect/tags/1.2.2/readme.txt

    r3495422 r3495455  
    33Requires at least: 6.7
    44Tested up to: 6.9
    5 Stable tag: 1.2.1
     5Stable tag: 1.2.2
    66Requires PHP: 8.0
    77License: GPLv2 or later
     
    3939Service Provider: [Probo Print BV](https://www.probo.nl)
    4040
    41 Data Transmitted
     41Data Transmitted:
    4242
    4343* Customer name and shipping address
     
    6464
    6565== 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
    6670= 1.2.1 =
    6771* Fixed Bug in calculation checkout
    6872
    6973= 1.2.0 =
    70 * Added Menu for easy Probo related navigation
    71 * Added New uploader type; Files after order. Initiates an probo uploader session
    72 * 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.
    7579* Fixed Bugs
    7680
  • probo-connect/trunk/includes/admin/class-probo-settings.php

    r3494752 r3495455  
    11141114            ),
    11151115            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(
    11161123                'title'   => __( 'Require confirmed upload', 'probo-connect' ),
    11171124                '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  
    7070        add_filter( 'woocommerce_cart_calculate_fees', array( $this, 'probo_cart_calculate_fees' ) );
    7171        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 );
    7273        add_filter( 'woocommerce_cart_item_quantity', array( $this, 'probo_cart_item_quantity' ), 10, 3 );
    7374        add_action( 'woocommerce_checkout_create_order_line_item', array( $this, 'probo_checkout_create_order_line_item' ), 10, 4 );
     
    222223            PROBO_PLUGIN_PATH . 'templates/'
    223224        );
     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;
    224272    }
    225273
  • probo-connect/trunk/languages/probo-connect-de_DE.po

    r3494752 r3495455  
    15721572msgstr "Nein"
    15731573
    1574 #: includes/admin/class-probo-settings.php:1569
     1574#: includes/admin/class-probo-settings.php:1116
     1575msgid "Show summary in mini cart"
     1576msgstr "Zusammenfassung im Miniwarenkorb anzeigen"
     1577
     1578#: includes/admin/class-probo-settings.php:1118
     1579msgid "Show the selected configurator options below the product name in the mini cart."
     1580msgstr "Zeigt die ausgewählten Konfigurator-Optionen unterhalb des Produktnamens im Miniwarenkorb an."
     1581
     1582#: includes/admin/class-probo-settings.php:1575
    15751583msgid "Logging"
    15761584msgstr ""
  • probo-connect/trunk/languages/probo-connect-nl_BE.po

    r3494752 r3495455  
    11981198msgstr "Ontwikkelaar"
    11991199
     1200#: includes/admin/class-probo-settings.php
     1201msgid "Show summary in mini cart"
     1202msgstr "Samenvatting tonen in minicart"
     1203
     1204#: includes/admin/class-probo-settings.php
     1205msgid "Show the selected configurator options below the product name in the mini cart."
     1206msgstr "Toon de geselecteerde configurator-opties onder de productnaam in de minicart."
     1207
    12001208#: includes/admin/class-probo-settings.php:970
    12011209msgid "Auto load the configurator"
  • probo-connect/trunk/languages/probo-connect-nl_NL.po

    r3494752 r3495455  
    15271527msgstr "Nee"
    15281528
    1529 #: includes/admin/class-probo-settings.php:1569
     1529#: includes/admin/class-probo-settings.php:1116
     1530msgid "Show summary in mini cart"
     1531msgstr "Samenvatting tonen in minicart"
     1532
     1533#: includes/admin/class-probo-settings.php:1118
     1534msgid "Show the selected configurator options below the product name in the mini cart."
     1535msgstr "Toon de geselecteerde configurator-opties onder de productnaam in de minicart."
     1536
     1537#: includes/admin/class-probo-settings.php:1575
    15301538msgid "Logging"
    15311539msgstr ""
  • probo-connect/trunk/probo-connect.php

    r3495422 r3495455  
    1313 * Plugin URI:        https://www.probo.nl/
    1414 * Description:       Plugin to connect Probo API to WooCommerce.
    15  * Version:           1.2.1
     15 * Version:           1.2.2
    1616 * Requires at least: 6.7
    1717 * Requires PHP:      8.0
  • probo-connect/trunk/readme.txt

    r3495422 r3495455  
    33Requires at least: 6.7
    44Tested up to: 6.9
    5 Stable tag: 1.2.1
     5Stable tag: 1.2.2
    66Requires PHP: 8.0
    77License: GPLv2 or later
     
    3939Service Provider: [Probo Print BV](https://www.probo.nl)
    4040
    41 Data Transmitted
     41Data Transmitted:
    4242
    4343* Customer name and shipping address
     
    6464
    6565== 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
    6670= 1.2.1 =
    6771* Fixed Bug in calculation checkout
    6872
    6973= 1.2.0 =
    70 * Added Menu for easy Probo related navigation
    71 * Added New uploader type; Files after order. Initiates an probo uploader session
    72 * 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.
    7579* Fixed Bugs
    7680
Note: See TracChangeset for help on using the changeset viewer.