Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restricting shipping methods for payment gateway cause Onboarding error #39996

Open
5 tasks done
RedBuld opened this issue Sep 1, 2023 · 3 comments
Open
5 tasks done
Labels
focus: payment Issues related to payments. focus: shipping Issues related to shipping. needs: triage feedback Issues for which we requested feedback from the author and received it. team: Transact type: bug The issue is a confirmed bug. type: community contribution

Comments

@RedBuld
Copy link

RedBuld commented Sep 1, 2023

Prerequisites

  • I have carried out troubleshooting steps and I believe I have found a bug.
  • I have searched for similar bugs in both open and closed issues and cannot find a duplicate.

Describe the bug

Restricting payment gateway for some shipping method on site where not finished "onboarding" lead to error on admin pages
As example:
Cash on Delivery
#178 $chosen_shipping_methods_session = WC()->session->get( 'chosen_shipping_methods' );
Should be
#178 $chosen_shipping_methods_session = WC()->session ? WC()->session->get( 'chosen_shipping_methods' ) : [];
Because we dont have active session on admin page

Expected behavior

Working site

Actual behavior

Site crashes on admin pages

Steps to reproduce

  1. Clean site with installed WooCommercec
  2. Setup some shipping methods
  3. Enable Cash on Delivery ans select some shipping methods
  4. Maybe do 1st Onboarding step

WordPress Environment

`

WordPress Environment

WordPress address (URL): http://autosoundlab.ru
Site address (URL): https://autosoundlab.ru
WC Version: 8.0.3
REST API Version: ✔ 8.0.3
WC Blocks Version: ✔ 10.6.6
Action Scheduler Version: ✔ 3.6.1
Log Directory Writable: ✔
WP Version: 6.3.1
WP Multisite: –
WP Memory Limit: 512 МБ
WP Debug Mode: ✔
WP Cron: ✔
Language: ru_RU
External object cache: –

Server Environment

Server Info: Apache/2.4.52 (Ubuntu)
PHP Version: 8.0.28
PHP Post Max Size: 8 МБ
PHP Time Limit: 3600
PHP Max Input Vars: 100000
cURL Version: 7.81.0
OpenSSL/3.0.2

SUHOSIN Installed: –
MySQL Version: 8.0.34-0ubuntu0.22.04.1
Max Upload Size: 8 МБ
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

Database

WC Database Version: 8.0.3
WC Database Prefix: wp_
Общий размер базы данных: 11.39MB
Размер данных в базе данных: 8.46MB
Размер индекса базы данных: 2.93MB
wp_woocommerce_sessions: Данные: 0.05MB + Индекс: 0.02MB + Движок InnoDB
wp_woocommerce_api_keys: Данные: 0.02MB + Индекс: 0.03MB + Движок InnoDB
wp_woocommerce_attribute_taxonomies: Данные: 0.02MB + Индекс: 0.02MB + Движок InnoDB
wp_woocommerce_downloadable_product_permissions: Данные: 0.02MB + Индекс: 0.06MB + Движок InnoDB
wp_woocommerce_order_items: Данные: 0.02MB + Индекс: 0.02MB + Движок InnoDB
wp_woocommerce_order_itemmeta: Данные: 0.06MB + Индекс: 0.03MB + Движок InnoDB
wp_woocommerce_tax_rates: Данные: 0.02MB + Индекс: 0.06MB + Движок InnoDB
wp_woocommerce_tax_rate_locations: Данные: 0.02MB + Индекс: 0.03MB + Движок InnoDB
wp_woocommerce_shipping_zones: Данные: 0.02MB + Индекс: 0.00MB + Движок InnoDB
wp_woocommerce_shipping_zone_locations: Данные: 0.02MB + Индекс: 0.03MB + Движок InnoDB
wp_woocommerce_shipping_zone_methods: Данные: 0.02MB + Индекс: 0.00MB + Движок InnoDB
wp_woocommerce_payment_tokens: Данные: 0.02MB + Индекс: 0.02MB + Движок InnoDB
wp_woocommerce_payment_tokenmeta: Данные: 0.02MB + Индекс: 0.03MB + Движок InnoDB
wp_woocommerce_log: Данные: 0.02MB + Индекс: 0.02MB + Движок InnoDB
wp_actionscheduler_actions: Данные: 0.38MB + Индекс: 0.50MB + Движок InnoDB
wp_actionscheduler_claims: Данные: 0.02MB + Индекс: 0.02MB + Движок InnoDB
wp_actionscheduler_groups: Данные: 0.02MB + Индекс: 0.02MB + Движок InnoDB
wp_actionscheduler_logs: Данные: 0.36MB + Индекс: 0.22MB + Движок InnoDB
wp_commentmeta: Данные: 0.02MB + Индекс: 0.03MB + Движок InnoDB
wp_comments: Данные: 0.02MB + Индекс: 0.09MB + Движок InnoDB
wp_dgwt_wcas_index: Данные: 0.17MB + Индекс: 0.02MB + Движок InnoDB
wp_dgwt_wcas_invindex_cache: Данные: 0.02MB + Индекс: 0.03MB + Движок InnoDB
wp_dgwt_wcas_invindex_doclist: Данные: 0.11MB + Индекс: 0.11MB + Движок InnoDB
wp_dgwt_wcas_invindex_info: Данные: 0.02MB + Индекс: 0.00MB + Движок InnoDB
wp_dgwt_wcas_invindex_wordlist: Данные: 0.05MB + Индекс: 0.02MB + Движок InnoDB
wp_dgwt_wcas_tax_index: Данные: 0.02MB + Индекс: 0.05MB + Движок InnoDB
wp_dgwt_wcas_var_index: Данные: 0.02MB + Индекс: 0.06MB + Движок InnoDB
wp_duplicator_packages: Данные: 0.02MB + Индекс: 0.02MB + Движок InnoDB
wp_links: Данные: 0.02MB + Индекс: 0.02MB + Движок InnoDB
wp_options: Данные: 4.20MB + Индекс: 0.08MB + Движок InnoDB
wp_postmeta: Данные: 0.39MB + Индекс: 0.22MB + Движок InnoDB
wp_posts: Данные: 1.52MB + Индекс: 0.13MB + Движок InnoDB
wp_term_relationships: Данные: 0.06MB + Индекс: 0.05MB + Движок InnoDB
wp_term_taxonomy: Данные: 0.02MB + Индекс: 0.03MB + Движок InnoDB
wp_termmeta: Данные: 0.02MB + Индекс: 0.03MB + Движок InnoDB
wp_terms: Данные: 0.02MB + Индекс: 0.03MB + Движок InnoDB
wp_usermeta: Данные: 0.02MB + Индекс: 0.03MB + Движок InnoDB
wp_users: Данные: 0.02MB + Индекс: 0.05MB + Движок InnoDB
wp_wc_admin_note_actions: Данные: 0.08MB + Индекс: 0.02MB + Движок InnoDB
wp_wc_admin_notes: Данные: 0.09MB + Индекс: 0.00MB + Движок InnoDB
wp_wc_category_lookup: Данные: 0.02MB + Индекс: 0.00MB + Движок InnoDB
wp_wc_customer_lookup: Данные: 0.02MB + Индекс: 0.03MB + Движок InnoDB
wp_wc_download_log: Данные: 0.02MB + Индекс: 0.03MB + Движок InnoDB
wp_wc_order_addresses: Данные: 0.02MB + Индекс: 0.06MB + Движок InnoDB
wp_wc_order_coupon_lookup: Данные: 0.02MB + Индекс: 0.03MB + Движок InnoDB
wp_wc_order_operational_data: Данные: 0.02MB + Индекс: 0.03MB + Движок InnoDB
wp_wc_order_product_lookup: Данные: 0.02MB + Индекс: 0.06MB + Движок InnoDB
wp_wc_order_stats: Данные: 0.02MB + Индекс: 0.05MB + Движок InnoDB
wp_wc_order_tax_lookup: Данные: 0.02MB + Индекс: 0.03MB + Движок InnoDB
wp_wc_orders: Данные: 0.02MB + Индекс: 0.11MB + Движок InnoDB
wp_wc_orders_meta: Данные: 0.02MB + Индекс: 0.03MB + Движок InnoDB
wp_wc_product_attributes_lookup: Данные: 0.06MB + Индекс: 0.05MB + Движок InnoDB
wp_wc_product_download_directories: Данные: 0.02MB + Индекс: 0.02MB + Движок InnoDB
wp_wc_product_meta_lookup: Данные: 0.02MB + Индекс: 0.09MB + Движок InnoDB
wp_wc_rate_limits: Данные: 0.02MB + Индекс: 0.02MB + Движок InnoDB
wp_wc_reserved_stock: Данные: 0.02MB + Индекс: 0.00MB + Движок InnoDB
wp_wc_tax_rate_classes: Данные: 0.02MB + Индекс: 0.02MB + Движок InnoDB
wp_wc_webhooks: Данные: 0.02MB + Индекс: 0.02MB + Движок InnoDB

Post Type Counts

acf-field: 35
acf-field-group: 8
attachment: 171
certificates: 7
customize_changeset: 8
nav_menu_item: 10
page: 16
post: 3
product: 131
revision: 94
stock: 3
wp_global_styles: 1

Security

Secure connection (HTTPS): ✔
Hide errors from visitors: ❌Не стоит отображать для посетителей сообщения об ошибках.

Active Plugins (16)

Breadcrumb NavXT: от John Havlik – 7.2.0
Checkout Field Editor for WooCommerce (Pro): от ThemeHigh – 3.1.7
Classic Widgets: от Команда разработки WordPress – 0.3
Пользовательский тип записи: от WebDevStudios – 1.14.0
Duplicate Page: от mndpsingh287 – 4.5.2
Duplicator: от Duplicator – 1.5.5.1
FiboSearch - AJAX Search for WooCommerce (Pro): от FiboSearch Team – 1.13.0
Grampus Studio: от Grampus Studio – 2.1.8
Simple Custom Post Order: от Colorlib – 2.5.6
Поддержка SVG: от Benbodhi – 2.5.5
WooCommerce: от Automattic – 8.0.3
WooCommerce AJAX добавление в корзину: от Grampus Studio – 1.0.0
WooCommerce Виджет: Фильтр товаров: от Grampus Studio – 1.0.0
WooCommerce Избранные товары: от Grampus Studio – 1.0.0
Сравнение товаров для woocommerce: от grampus – 1.0.0
Duplicator: от Duplicator – 1.5.5.1

Inactive Plugins (1)

Autoptimize: от Frank Goossens (futtta) – 3.1.8.1

Settings

API Enabled: –
Force SSL: –
Currency: RUB (₽)
Currency Position: right_space
Thousand Separator:
Decimal Separator: .
Number of Decimals: 0
Taxonomies: Product Types: external (external)
grouped (grouped)
simple (simple)
variable (variable)

Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
exclude-from-search (exclude-from-search)
featured (featured)
outofstock (outofstock)
rated-1 (rated-1)
rated-2 (rated-2)
rated-3 (rated-3)
rated-4 (rated-4)
rated-5 (rated-5)

Connected to WooCommerce.com: –
Enforce Approved Product Download Directories: ✔
HPOS feature screen enabled: –
HPOS feature enabled: –
Order datastore: WC_Order_Data_Store_CPT
HPOS data sync enabled: –

WC Pages

Ссылка магазина: #12 - /shop/
Корзина: #13 - /cart/
Оформление заказа: #14 - /checkout/
Мой аккаунт: #15 - /my-account/
Правила и условия: ❌ Страница не задана

Theme

Name: kontrukt
Version: (доступно обновление до версии 0)
Author URL:
Child Theme: ❌ – Если вы хотите оформить WooCommerce родительской темой
которую создал кто-то другой
мы рекомендуем воспользоваться дочерней темой. См. "Как создать дочернюю тему"

WooCommerce Support: ✔

Templates

Overrides: kontrukt/woocommerce/archive-product.php
Есть обновления для kontrukt/woocommerce/cart/cart-empty.php версии 3.5.0. Версия ядра — 7.0.1
kontrukt/woocommerce/cart/cart-totals.php
Есть обновления для kontrukt/woocommerce/cart/cart.php версии 3.8.0. Версия ядра — 7.9.0
kontrukt/woocommerce/checkout/form-billing.php
kontrukt/woocommerce/checkout/form-checkout.php
kontrukt/woocommerce/checkout/form-shipping.php
kontrukt/woocommerce/checkout/payment-method.php
Есть обновления для kontrukt/woocommerce/checkout/payment.php версии 3.5.3. Версия ядра — 7.8.0
kontrukt/woocommerce/checkout/review-order.php
kontrukt/woocommerce/checkout/thankyou.php
kontrukt/woocommerce/content-product-cat.php
kontrukt/woocommerce/content-product.php
kontrukt/woocommerce/content-single-product.php
Есть обновления для kontrukt/woocommerce/global/quantity-input.php версии 4.0.0. Версия ядра — 7.8.0
kontrukt/woocommerce/loop/orderby.php
kontrukt/woocommerce/loop/pagination.php
kontrukt/woocommerce/single-product/product-attributes.php
Есть обновления для kontrukt/woocommerce/single-product/product-image.php версии 3.5.1. Версия ядра — 7.8.0
kontrukt/woocommerce/single-product/product-thumbnails.php
kontrukt/woocommerce/single-product/related.php
kontrukt/woocommerce/single-product/up-sells.php
kontrukt/woocommerce/single-product.php

Outdated Templates: ❌

					Узнайте

как обновить

Admin

Enabled Features: activity-panels
analytics
product-block-editor
coupons
core-profiler
customer-effort-score-tracks
import-products-task
experimental-fashion-sample-products
shipping-smart-defaults
shipping-setting-tour
homescreen
marketing
mobile-app-banner
navigation
onboarding
onboarding-tasks
remote-inbox-notifications
remote-free-extensions
payment-gateway-suggestions
shipping-label-banner
subscriptions
store-alerts
transient-notices
woo-mobile-welcome
wc-pay-promotion
wc-pay-welcome-page

Disabled Features: minified-js
new-product-management-experience
product-variation-management
settings
async-product-editor-category-field

Daily Cron: ✔ Next scheduled: 2023-09-01 07:55:50 +03:00
Options: ✔
Notes: 145
Onboarding: completed

Action Scheduler

Выполнено: 1 206
Oldest: 2023-08-01 08:57:58 +0000
Newest: 2023-09-01 06:49:56 +0000

В ожидании: 1
Oldest: 2023-09-01 08:36:01 +0000
Newest: 2023-09-01 08:36:01 +0000

Status report information

Generated at: 2023-09-01 10:02:36 +03:00
`

Isolating the problem

  • I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active.
  • This bug happens with a default WordPress theme active, or Storefront.
  • I can reproduce this bug consistently using the steps above.
@github-actions github-actions bot added status: awaiting triage This is a newly created issue waiting for triage. type: community contribution labels Sep 1, 2023
@RedBuld RedBuld changed the title Restricting shipping methods for payment gateway cause Oboarding error Restricting shipping methods for payment gateway cause Onboarding error Sep 1, 2023
@rrennick rrennick added focus: shipping Issues related to shipping. focus: onboarding [team:Ghidorah] team: Ghidorah and removed status: awaiting triage This is a newly created issue waiting for triage. labels Sep 6, 2023
@adrianduffell
Copy link
Contributor

Hi @RedBuld ,

Unfortunately I wasn't able to reproduce this with the instructions provided. Is it possible one of your active plugins is creating a conflict?

Can you provide the error details and the screen it appears on? Thank you

@adrianduffell adrianduffell added team: TBD Issues in areas where there is no team doing active development. needs: author feedback The issue/PR needs a response from any of the parties involved in the issue. and removed focus: onboarding [team:Ghidorah] team: Ghidorah labels Sep 7, 2023
@RedBuld
Copy link
Author

RedBuld commented Sep 12, 2023

Hello, sorry for long delay
image

@github-actions github-actions bot added needs: triage feedback Issues for which we requested feedback from the author and received it. and removed needs: author feedback The issue/PR needs a response from any of the parties involved in the issue. labels Sep 12, 2023
@RedBuld
Copy link
Author

RedBuld commented Sep 12, 2023

More readable version
image

This error exists with this state, even any other plugins deactivated:
image
image

@rrennick rrennick added focus: payment Issues related to payments. team: Transact and removed team: TBD Issues in areas where there is no team doing active development. labels Feb 13, 2024
@vbelolapotkov vbelolapotkov added the type: bug The issue is a confirmed bug. label Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: payment Issues related to payments. focus: shipping Issues related to shipping. needs: triage feedback Issues for which we requested feedback from the author and received it. team: Transact type: bug The issue is a confirmed bug. type: community contribution
Projects
None yet
Development

No branches or pull requests

4 participants