Forum Replies Created

Viewing 15 replies - 1 through 15 (of 65 total)
  • Thread Starter Leo.Lin

    (@bi1012037)

    I added the following code to prevent non-logged-in users from frequently making GET requests:

    add_action('wp', function() {
    // Check if the user is not logged in and is using the add_to_wishlist parameter.
    if (!is_user_logged_in() && isset($_GET['add_to_wishlist'])) {
    //Stop execution and display "403 Forbidden
    wp_die('You must log in to add items to your wishlist.', '403 Forbidden', array('response' => 403));
    }
    });
    Thread Starter Leo.Lin

    (@bi1012037)

    @nsinelnikov Alright, I will first change the status to resolved.

    Thread Starter Leo.Lin

    (@bi1012037)

    Movie url:https://imgur.com/a/CnUWvNh
    @heateor I used a physical phone to record through Chrome’s inspect mode, and the issue only occurs on the physical phone!

    Update: This abnormal situation usually first triggers the input box for the email, and it occurs more frequently after it has been closed. Currently, I’m re-excluding the JS included in ajax.php, as it conflicts with the setTimeout() from other JS files. I will also investigate whether the issue arises from switching back from the LINE app. If users log in using LINE through Chrome, it defaults to the browser login, which restores the normal display of the inbox. I’ll close this issue for now and advise users to register and log in using the desktop version. I will monitor if others encounter the same problem and then decide whether to fix it.

    • This reply was modified 1 month, 1 week ago by Leo.Lin.
    • This reply was modified 1 month, 1 week ago by Leo.Lin.
    Thread Starter Leo.Lin

    (@bi1012037)

    Sometimes, after allowing login on mobile devices, LINE displays normally for the first time. However, if the user cancels or clicks to close in between, it often leads to unresponsive click registration for login, and even using updates doesn’t prompt the inbox for entering an email!

    Thread Starter Leo.Lin

    (@bi1012037)

    @subratamal
    Hi, we have not changed any settings, nor are we using using WooCommerce High-performance order storage.

    Thread Starter Leo.Lin

    (@bi1012037)

    I found that the severe error was caused by changing the function in the file woo-wallet-util.php. I have already rolled it back for now!

    File PATH:woo-wallet/includes/helper/woo-wallet-util.php
    Code rollback portion

    if ( ! function_exists( 'get_wallet_rechargeable_orders' ) ) {

    /**
    * Return wallet rechargeable order id.
    *
    * @param array $args args.
    * @return array
    */
    function get_wallet_rechargeable_orders( $args = array() ) {
    $default_args = array(
    'posts_per_page' => -1,
    'meta_key' => '_wc_wallet_purchase_credited', // @codingStandardsIgnoreLine
    'meta_value' => true, // @codingStandardsIgnoreLine
    'post_type' => 'shop_order',
    'post_status' => array( 'completed', 'processing', 'on-hold' ),
    'suppress_filters' => true,
    );
    $args = wp_parse_args( $args, $default_args );
    $orders = get_posts( $args );
    return wp_list_pluck( $orders, 'ID' );
    /*$order_ids = wc_get_orders(
    array(
    'limit' => -1,
    'meta_query' => array(
    array(
    'key' => '_wc_wallet_purchase_credited',
    'value' => true,
    ),
    ),
    'return' => 'ids',
    )
    );
    return $order_ids;*/
    }
    }

    Thread Starter Leo.Lin

    (@bi1012037)

    Okay, I will check the third-party plugins again. I’ll turn them off for now. Thank you for the tip!

    Thread Starter Leo.Lin

    (@bi1012037)

    error log

    [error] 294169#0: *1827 FastCGI sent in stderr: "PHP message: WC_Order_Data_Store_CPT::query was called incorrectly. 目前的訂單資料存放區不支援訂單查詢引數 (meta_query)。 Backtrace: require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, WC_REST_Report_Sales_V1_Controller->get_items, WC_REST_Report_Sales_V1_Controller->prepare_item_for_response, WC_Report_Sales_By_Date->get_report_data, WC_Report_Sales_By_Date->query_report_data, WC_Admin_Report->get_order_report_data, apply_filters('woocommerce_reports_get_order_report_query'), WP_Hook->apply_filters, WooWallet->woocommerce_reports_get_order_report_query, get_wallet_rechargeable_orders, wc_get_orders, WC_Order_Query->get_orders, WC_Data_Store->__call, WC_Order_Data_Store_CPT->query, wc_doing_it_wrong. This message was added in version 9.2.0.PHP message: WC_Order_Data_Store_CPT::query was called incorrectly. 目前的訂單資料存放區不支援訂單查詢引數 (meta_query)。 Backtrace: require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, WC_REST_Report_Sales_V1_Controller->get_items, WC_REST_Report_Sales_V1_Controller->prepare_item_for_response, WC_Report_Sales_By_Date->get_report_data, WC_Report_Sales_By_Date->query_report_data, WC_Admin_Report->get_order_report_data, apply_filters('woocommerce_reports_get_order_report_query'), WP_Hook->apply_filters, WooWallet->woocommerce_reports_get_order_report_query, get_wallet_rechargeable_orders, wc_get_orders, WC_Order_Query->get_orders, WC_Data_Store->__call, WC_Order_Data_Store_CPT->query, wc_doing_it_wrong. This message was added in version 9.2.0.PHP message: WC_Order_Data_Sto

    [error] 294169#0: *1827 FastCGI sent in stderr: "pond_to_request, WC_REST_Report_Sales_V1_Controller->get_items, WC_REST_Report_Sales_V1_Controller->prepare_item_for_response, WC_Report_Sales_By_Date->get_report_data, WC_Report_Sales_By_Date->query_report_data, WC_Admin_Report->get_order_report_data, apply_filters('woocommerce_reports_get_order_report_query'), WP_Hook->apply_filters, WooWallet->woocommerce_reports_get_order_report_query, get_wallet_rechargeable_orders, wc_get_orders, WC_Order_Query->get_orders, WC_Data_Store->__call, WC_Order_Data_Store_CPT->query, wc_doing_it_wrong. This message was added in version 9.2.0.PHP message: WC_Order_Data_Store_CPT::query was called incorrectly. 目前的訂單資料存放區不支援訂單查詢引數 (meta_query)。 Backtrace: require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, WC_REST_Report_Sales_V1_Controller->get_items, WC_REST_Report_Sales_V1_Controller->prepare_item_for_response, WC_Report_Sales_By_Date->get_report_data, WC_Report_Sales_By_Date->query_report_data, WC_Admin_Report->get_order_report_data, apply_filters('woocommerce_reports_get_order_report_query'), WP_Hook->apply_filters, WooWallet->woocommerce_reports_get_order_report_query, get_wallet_rechargeable_orders, wc_get_orders, WC_Order_Query->get_orders, WC_Data_Store->__call, WC_Order_Data_Store_CPT->query, wc_doing_it_wrong. This message was added in version 9.2.0.PHP message: WC_Order_Data_Store_CPT::query was called incorrectly. 目前的訂單資料存放區不支援訂單查詢引數 (meta_query)。 Backtrace: require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, WC_REST_Repor...
    • This reply was modified 2 months, 2 weeks ago by Leo.Lin.
    • This reply was modified 2 months, 2 weeks ago by Leo.Lin.
    Thread Starter Leo.Lin

    (@bi1012037)

    I have already solved this issue by using jQuery to automatically refresh this block.

    jQuery(".main-content-page").load(location.href + " .main-content-page:first")
    Thread Starter Leo.Lin

    (@bi1012037)

    Here are the changes in the cookies:

    1.Just logged in before clicking the order button

      Successfully redirected to the thank you page

      Failed, login window pops up

      Thread Starter Leo.Lin

      (@bi1012037)

      @omarfpg
      I am using the Newebpay plugin.
      Location: https://tw.www.ads-software.com/plugins/newebpay-payment/

      I have already contacted the plugin developers. We didn’t have these issues before, but they started occurring after updating WooCommerce and the database. I noticed that others have experienced the same problem previously, and it still hasn’t been resolved. The issue is not that non-logged-in members can place orders, but rather that when logged-in members are redirected back to the website from the payment gateway, WooCommerce mistakenly identifies them as not logged in and displays the login screen. Refreshing the page or logging in again shows the correct status. We tested for conflicts with other plugins sequentially, and the problem consistently occurs after updating WooCommerce!

      Scenario:
      After logging in, members can use the site normally. However, approximately 5-10 minutes later, when they return from the third-party payment site to the thank-you page, a message appears indicating that they are not logged in. Refreshing the page confirms that they are logged in. If this were a plugin issue, it would display every time the site redirects back to WooCommerce. To temporarily resolve this issue, members need to log in again. We speculate that the problem arises because the cookie or session does not successfully load when returning to the WooCommerce site from the third-party site.


      • This reply was modified 4 months, 1 week ago by Leo.Lin.
      Thread Starter Leo.Lin

      (@bi1012037)

      I tried adding the following code, but unfortunately, within a few minutes, the redirect to the thank you page still prompts for login, requiring a new login each time to restore normal operation.

      //Function.php
      add_filter('auth_cookie_expiration', 'extend_auth_cookie_expiration', 99, 3);
      //Set the cookie to one week.
      function extend_auth_cookie_expiration($expiration, $user_id, $remember) {
      return 604800;
      }
      Thread Starter Leo.Lin

      (@bi1012037)

      @malchickay
      After this update, I cleared the cache in two places.
      First:Server.(Apache or Nginx…)
      Second:Domain provider.
      If you have a testing site, you can install the “Loco Translate” plugin to check if your language path is correct or up to date. If it’s outdated, you should synchronize it immediately.
      My Language path:?languages/plugins/woocommerce-zh_TW.po

      Final note: Although the new version of my shopping cart interface has successfully reverted to fetching local language, I still prefer the shortcodes generated by the old version. If you encounter any other language conversion issues, please provide more detailed server status to the plugin developers so they can assist you in troubleshooting the problem.

      [woocommerce_cart] Very good!!!
      URL:https://test3.lugeshop.com/購物車/

      New version: Normal operation has been restored. However, editing pages with the Elementor editor will cause the entire page to break. In the production environment, I will still provide members with the old version of the shopping cart page.
      URL:https://test3.lugeshop.com/cart/



      The new shopping cart page breaks immediately after saving with Elementor. Remember to back up before using Elementor to edit.
      URL:https://test3.lugeshop.com/test/

      The code after saving with Elementor’s editor will automatically be converted to the following code.

      <!-- wp:woocommerce/cart -->
      <div class="wp-block-woocommerce-cart alignwide is-loading"><!-- wp:woocommerce/filled-cart-block -->
      <div class="wp-block-woocommerce-filled-cart-block"><!-- wp:woocommerce/cart-items-block -->
      <div class="wp-block-woocommerce-cart-items-block"><!-- wp:woocommerce/cart-line-items-block -->
      <div class="wp-block-woocommerce-cart-line-items-block">?</div>
      <!-- /wp:woocommerce/cart-line-items-block -->
      
      <!-- wp:woocommerce/cart-cross-sells-block -->
      <div class="wp-block-woocommerce-cart-cross-sells-block"><!-- wp:heading {"fontSize":"large"} -->
      <h2 class="wp-block-heading has-large-font-size">你可能對這些產品感興趣:</h2>
      <!-- /wp:heading -->
      
      <!-- wp:woocommerce/cart-cross-sells-products-block -->
      <div class="wp-block-woocommerce-cart-cross-sells-products-block">?</div>
      <!-- /wp:woocommerce/cart-cross-sells-products-block --></div>
      <!-- /wp:woocommerce/cart-cross-sells-block --></div>
      <!-- /wp:woocommerce/cart-items-block -->
      
      <!-- wp:woocommerce/cart-totals-block -->
      <div class="wp-block-woocommerce-cart-totals-block"><!-- wp:woocommerce/cart-order-summary-block -->
      <div class="wp-block-woocommerce-cart-order-summary-block"><!-- wp:woocommerce/cart-order-summary-heading-block -->
      <div class="wp-block-woocommerce-cart-order-summary-heading-block">?</div>
      <!-- /wp:woocommerce/cart-order-summary-heading-block -->
      
      <!-- wp:woocommerce/cart-order-summary-coupon-form-block -->
      <div class="wp-block-woocommerce-cart-order-summary-coupon-form-block">?</div>
      <!-- /wp:woocommerce/cart-order-summary-coupon-form-block -->
      
      <!-- wp:woocommerce/cart-order-summary-subtotal-block -->
      <div class="wp-block-woocommerce-cart-order-summary-subtotal-block">?</div>
      <!-- /wp:woocommerce/cart-order-summary-subtotal-block -->
      
      <!-- wp:woocommerce/cart-order-summary-fee-block -->
      <div class="wp-block-woocommerce-cart-order-summary-fee-block">?</div>
      <!-- /wp:woocommerce/cart-order-summary-fee-block -->
      
      <!-- wp:woocommerce/cart-order-summary-discount-block -->
      <div class="wp-block-woocommerce-cart-order-summary-discount-block">?</div>
      <!-- /wp:woocommerce/cart-order-summary-discount-block -->
      
      <!-- wp:woocommerce/cart-order-summary-shipping-block -->
      <div class="wp-block-woocommerce-cart-order-summary-shipping-block">?</div>
      <!-- /wp:woocommerce/cart-order-summary-shipping-block -->
      
      <!-- wp:woocommerce/cart-order-summary-taxes-block -->
      <div class="wp-block-woocommerce-cart-order-summary-taxes-block">?</div>
      <!-- /wp:woocommerce/cart-order-summary-taxes-block --></div>
      <!-- /wp:woocommerce/cart-order-summary-block -->
      
      <!-- wp:woocommerce/cart-express-payment-block -->
      <div class="wp-block-woocommerce-cart-express-payment-block">?</div>
      <!-- /wp:woocommerce/cart-express-payment-block -->
      
      <!-- wp:woocommerce/proceed-to-checkout-block -->
      <div class="wp-block-woocommerce-proceed-to-checkout-block">?</div>
      <!-- /wp:woocommerce/proceed-to-checkout-block -->
      
      <!-- wp:woocommerce/cart-accepted-payment-methods-block -->
      <div class="wp-block-woocommerce-cart-accepted-payment-methods-block">?</div>
      <!-- /wp:woocommerce/cart-accepted-payment-methods-block --></div>
      <!-- /wp:woocommerce/cart-totals-block --></div>
      <!-- /wp:woocommerce/filled-cart-block -->
      
      <!-- wp:woocommerce/empty-cart-block -->
      <div class="wp-block-woocommerce-empty-cart-block"><!-- wp:heading {"textAlign":"center","className":"with-empty-cart-icon wc-block-cart__empty-cart__title"} -->
      <h2 class="wp-block-heading has-text-align-center with-empty-cart-icon wc-block-cart__empty-cart__title">你的購物車目前是空的!</h2>
      <!-- /wp:heading -->
      
      <!-- wp:separator {"className":"is-style-dots"} --><hr class="wp-block-separator has-alpha-channel-opacity is-style-dots" /><!-- /wp:separator -->
      
      <!-- wp:heading {"textAlign":"center"} -->
      <h2 class="wp-block-heading has-text-align-center">新品到貨</h2>
      <!-- /wp:heading -->
      
      <!-- wp:woocommerce/product-new {"columns":4,"rows":1} /--></div>
      <!-- /wp:woocommerce/empty-cart-block --></div>
      <!-- /wp:woocommerce/cart -->
      Thread Starter Leo.Lin

      (@bi1012037)

      Upgraded to 8.9.0 today, and the issue has been resolved.

      Thread Starter Leo.Lin

      (@bi1012037)

      @subratamal

      Thank you, I achieved the filtering of empty values and values equal to 0 like this.

      Additionally,I also need to add additional SQL to complete this functionality.

      This issue has been successfully resolved.

      #SQL Script
      TRUNCATE TABLE wp_woo_wallet_transactions;
      TRUNCATE TABLE wp_woo_wallet_transaction_meta;
      UPDATE wp_usermeta SET meta_value = '0' WHERE meta_key = '_current_woo_wallet_balance';
      
      //Close cache. PHP Script
      $nocache =true; //Prevent cleared transaction records from reappearing.
      
      //The modified filtering method. PHP Script
                          $args = array_merge(
                              $args,
                              array(
                                  'meta_query' => array(
                                      'relation' => 'AND',
                                      array(
                                          'key' => '_current_woo_wallet_balance',
                                          'value' => '',
                                          'compare' => '!=', //meta_value != null
                                          'type' => 'CHAR',  
                                      ),
                                      array(
                                          'key' => '_current_woo_wallet_balance',
                                          'value' => '0',
                                          'compare' => '>', 
                                          'type' => 'NUMERIC', 
                                      ),
                                  ),
                              )
                          );
      • This reply was modified 6 months, 1 week ago by Leo.Lin.
      • This reply was modified 6 months, 1 week ago by Leo.Lin.
    Viewing 15 replies - 1 through 15 (of 65 total)