Plugin Directory

Changeset 3407048


Ignore:
Timestamp:
12/01/2025 04:34:44 PM (4 months ago)
Author:
printess
Message:
  • Changed save token live time extension from old deprecated api call to newer api's (internal technical change).
    • Fixed user id forwarding to use strings instead of numbers (internal technical change).
Location:
printess-editor/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • printess-editor/trunk/includes/js/printessEditor.js

    r3389052 r3407048  
    777777                translationKey: "auto", //"en"
    778778                basketId: await PrintessEditor.getOrGenerateBasketId(),
    779                 shopUserId: await PrintessEditor.getUserId(),
     779                shopUserId: "" + (await PrintessEditor.getUserId()),
    780780                // mobileMargin: {left: 20, right: 40, top: 30, bottom: 40},
    781781                // allowZoomAndPan: false,
     
    11761176    }
    11771177}
    1178 PrintessEditor.visible = false; function initPrintessEditor(shopToken, editorUrl, editorVersion, startupLogoUrl, showStartupAnimation, theme, startupBackgroundColor = "") {
     1178PrintessEditor.visible = false;function initPrintessEditor(shopToken, editorUrl, editorVersion, startupLogoUrl, showStartupAnimation, theme, startupBackgroundColor = "") {
    11791179    let editorSettings;
    11801180    if (shopToken && typeof shopToken !== "string") {
  • printess-editor/trunk/printess.php

    r3389051 r3407048  
    55 * Plugin URI: https://printess.com/kb/integrations/woo-commerce/index.html
    66 * Developer: Bastian Kröger (support@printess.com); Alexander Oser (support@printess.com)
    7  * Version: 1.6.69
     7 * Version: 1.6.70
    88 * Author: Printess
    99 * Author URI: https://printess.com
     
    1414 * Tested up to: 6.8.3
    1515 *
    16  * Woo: 10000:924026dfsfhsf8429842386wdff234sfd
     16 * Woo: 10000:924027dfsfhsf8429842386wdff234sfd
    1717 * WC requires at least: 5.8
    1818 * WC tested up to: 10.3.0
     
    575575                        basketItemId: basketItemId,
    576576                        basektId: <?php echo wp_json_encode( $cart_id ); ?>,
    577                         userId: <?php echo wp_json_encode( get_current_user_id() ); ?>,
     577                        userId: <?php echo wp_json_encode( "" . get_current_user_id() ); ?>,
    578578                        optionValueMappings: <?php echo wp_json_encode( $product->get_meta( 'printess_custom_formfield_mappings', true ) ); ?>,
    579579                        legalText: <?php echo wp_json_encode( PrintessAdminSettings::get_legal_text()  ); ?>,
     
    14191419
    14201420    $payload = array(
    1421         'id'          => $save_token,
    1422         'expiresOn'   => $expiration_date_string,
    1423         'dataOnly'    => true,
    1424         'buyerImages' => true,
     1421        'saveToken' => $save_token,
     1422        'expiresOn'   => $expiration_date_string
    14251423    );
    14261424
    1427     $result = PrintessApi::send_post_request( "$printess_host/shop/template/unexpire", PrintessAdminSettings::get_service_token(), $payload );
     1425    $result = PrintessApi::send_post_request( "$printess_host/savetoken/lifetime/extend", PrintessAdminSettings::get_service_token(), $payload );
    14281426}
    14291427
     
    28782876                        product: product,
    28792877                        basektId: <?php echo wp_json_encode( uniqid( '', true ) ); ?>,
    2880                         userId: <?php echo wp_json_encode( $order->get_user_id() ); ?>,
     2878                        userId: <?php echo wp_json_encode( "" . $order->get_user_id() ); ?>,
    28812879                        optionValueMappings: <?php echo wp_json_encode( $product->get_meta( 'printess_custom_formfield_mappings', true ) ); ?>,
    28822880                        legalText: <?php echo wp_json_encode( PrintessAdminSettings::get_legal_text() ); ?>
  • printess-editor/trunk/readme.txt

    r3389055 r3407048  
    55Tested up to: 6.8.3
    66WC Tested up to: 10.3.0
    7 Stable tag: 1.6.69
     7Stable tag: 1.6.70
    88Requires PHP: 8.1
    99License: GPLv2 or later
     
    356356 = 1.6.69 =
    357357 - Added basic tracking events to dom: "printess:editor_opened_new_design", "printess:editor_opened_save_token", "printess:editor_closed_without_add_to_cart","printess:design_saved","printess:add_to_cart_clicked" are now sent to DOM via window.dispatchEvent and can be received using document.addEventListener
     358
     359 = 1.6.70 =
     360 - Changed save token live time extension from old deprecated api call to newer api's  (internal technical change).
     361 - Fixed user id forwarding to use strings instead of numbers (internal technical change).
Note: See TracChangeset for help on using the changeset viewer.