最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

The orders in WooCommerce admin are hidden (they have the "hidden" CSS class)

programmeradmin3浏览0评论

I have recently moved one WordPress site from an online hosting to a VPS where I have full root access. Everything seems to be working fine. However, on the WooCommerce admin, the orders are hidden - that is, they have the "hidden" CSS class and thus they are not displayed.

Here is a screenshot WooCommerce orders page:

Here is the HTML code of one table row, with sensitive information removed:

<tr id="post-CENSORED" class="iedit author-other level-0 post-CENSORED type-shop_order status-wc-pending post-password-required hentry">
<th scope="row" class="check-column"> <label class="screen-reader-text" for="cb-select-CENSORED">Elige Order –
        diciembre 28, 2018 @ 12:43 AM</label>
    <input id="cb-select-CENSORED" type="checkbox" name="post[]" value="CENSORED">
    <div class="locked-indicator">
        <span class="locked-indicator-icon" aria-hidden="true"></span>
        <span class="screen-reader-text">“Order – diciembre 28, 2018 @ 12:43 AM” está bloqueado</span>
    </div>
</th>
<td class="order_number column-order_number has-row-actions column-primary hidden" data-colname="Pedido"><a href="#"
        class="order-preview" data-order-id="CENSORED" title="Vista previa">Vista previa</a><a href="/wp-admin/post.php?post=CENSORED&amp;action=edit"
        class="order-view"><strong>CENSORED</strong></a></td>
<td class="order_date column-order_date hidden" data-colname="Fecha"><time datetime="2018-12-28T00:43:20+00:00"
        title="28/12/2018 00:43">28 Dic, 2018</time></td>
<td class="order_status column-order_status hidden" data-colname="Estado"><mark class="order-status status-pending tips"><span>Pendiente
            de pago</span></mark></td>
<td class="billing_address column-billing_address hidden" data-colname="Facturación">CENSORED<span class="description">vía Pago con
        tarjeta (opcionalmente con IUPAY)</span></td>
<td class="shipping_address column-shipping_address hidden" data-colname="Enviar a"><a target="_blank" href="">CENSORED</a><span
        class="description">CENSORED</span></td>
<td class="order_total column-order_total hidden" data-colname="Total"><span class="tips"><span class="woocommerce-Price-amount amount">CENSORED<span
                class="woocommerce-Price-currencySymbol">€</span></span></span></td>
<td class="wc_actions column-wc_actions hidden" data-colname="Acciones">
    <p><a class="button wc-action-button wc-action-button-processing processing" href="/wp-admin/admin-ajax.php?action=woocommerce_mark_order_status&amp;status=processing&amp;order_id=CENSORED&amp;_wpnonce=5132b30a6c"
            aria-label="Procesando">Procesando</a><a class="button wc-action-button wc-action-button-complete complete"
            href="/wp-admin/admin-ajax.php?action=woocommerce_mark_order_status&amp;status=completed&amp;order_id=CENSORED&amp;_wpnonce=5132b30a6c"
            aria-label="Completar">Completar</a> <a href="/wp-admin/admin-ajax.php?action=generate_wpo_wcpdf&amp;document_type=invoice&amp;order_ids=CENSORED&amp;_wpnonce=99660cf9c8"
            class="button tips wpo_wcpdf exists invoice" target="_blank" alt="PDF Factura">
            <img src="/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/assets/images/invoice.png"
                alt="PDF Factura" width="16">
        </a>
        <a href="/wp-admin/admin-ajax.php?action=generate_wpo_wcpdf&amp;document_type=packing-slip&amp;order_ids=CENSORED&amp;_wpnonce=99660cf9c8"
            class="button tips wpo_wcpdf exists packing-slip" target="_blank" alt="PDF Albarán de entrega">
            <img src="/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/assets/images/packing-slip.png"
                alt="PDF Albarán de entrega" width="16">
        </a>
    </p>
</td>

As you can see, the td elements have the hidden class for some reason.

In order to solve this, I have added this code to my wp-admin/edit.php file:

<script type="text/javascript">
/*
 * This is a huge hack!
 * This removes the hidden class from the WooCommerce order list, which for
 * some unkown reason appear as hidden...
 */
[
    ...document.querySelectorAll("th.hidden"),
    ...document.querySelectorAll("tr.hidden"),
    ...document.querySelectorAll("td.hidden"),
]
        .forEach(it => {it.className = it.className.replace("hidden", "")});
</script>

This fixes the issue, and the orders page renders as usual. However, this does not seem like a good long term solution.

Here is the system status information, with sensitive information removed:

### WordPress Environment ###

Home URL: 
Site URL: 
WC Version: 3.5.3
Log Directory Writable: ✔
WP Version: 5.0.2
WP Multisite: –
WP Memory Limit: 256 MB
WP Debug Mode: –
WP Cron: ✔
Language: es_ES
External object cache: –

### Server Environment ###

Server Info: nginx/1.14.0
PHP Version: 7.2.10-0ubuntu0.18.04.1
PHP Post Max Size: 8 MB
PHP Time Limit: 30
PHP Max Input Vars: 1000
cURL Version: 
SUHOSIN Installed: –
MySQL Version: 5.7.24-0ubuntu0.18.04.1
Max Upload Size: 2 MB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

### Database ###

WC Database Version: 3.5.3
WC Database Prefix: bdeds_
MaxMind GeoIP Database: ✔
Tamaño total de la base de datos: 80.30MB
Tamaño de los datos de la base de datos: 53.74MB
Tamaño del índice de la base de datos: 26.56MB
bdeds_woocommerce_sessions: Datos: 9.02MB + Índice: 0.17MB
bdeds_woocommerce_api_keys: Datos: 0.02MB + Índice: 0.03MB
bdeds_woocommerce_attribute_taxonomies: Datos: 0.02MB + Índice: 0.02MB
bdeds_woocommerce_downloadable_product_permissions: Datos: 0.02MB + Índice: 0.05MB
bdeds_woocommerce_order_items: Datos: 0.08MB + Índice: 0.02MB
bdeds_woocommerce_order_itemmeta: Datos: 0.20MB + Índice: 0.27MB
bdeds_woocommerce_tax_rates: Datos: 0.02MB + Índice: 0.06MB
bdeds_woocommerce_tax_rate_locations: Datos: 0.02MB + Índice: 0.05MB
bdeds_woocommerce_shipping_zones: Datos: 0.02MB + Índice: 0.00MB
bdeds_woocommerce_shipping_zone_locations: Datos: 0.02MB + Índice: 0.03MB
bdeds_woocommerce_shipping_zone_methods: Datos: 0.02MB + Índice: 0.00MB
bdeds_woocommerce_payment_tokens: Datos: 0.02MB + Índice: 0.02MB
bdeds_woocommerce_payment_tokenmeta: Datos: 0.02MB + Índice: 0.03MB
bdeds_woocommerce_log: Datos: 0.02MB + Índice: 0.02MB
aux_modelos_unificados: Datos: 0.09MB + Índice: 0.06MB
bdeds_commentmeta: Datos: 0.02MB + Índice: 0.03MB
bdeds_comments: Datos: 0.08MB + Índice: 0.09MB
bdeds_layerslider: Datos: 0.14MB + Índice: 0.00MB
bdeds_layerslider_revisions: Datos: 0.02MB + Índice: 0.00MB
bdeds_links: Datos: 0.02MB + Índice: 0.02MB
bdeds_options: Datos: 3.36MB + Índice: 0.34MB
bdeds_postmeta: Datos: 16.55MB + Índice: 23.06MB
bdeds_posts: Datos: 13.52MB + Índice: 0.77MB
bdeds_termmeta: Datos: 0.13MB + Índice: 0.06MB
bdeds_terms: Datos: 0.02MB + Índice: 0.03MB
bdeds_term_relationships: Datos: 1.52MB + Índice: 0.38MB
bdeds_term_taxonomy: Datos: 0.02MB + Índice: 0.03MB
bdeds_usermeta: Datos: 0.17MB + Índice: 0.14MB
bdeds_users: Datos: 0.02MB + Índice: 0.05MB
bdeds_wcpdf_invoice_number: Datos: 0.02MB + Índice: 0.00MB
bdeds_wc_download_log: Datos: 0.02MB + Índice: 0.03MB
bdeds_wc_webhooks: Datos: 0.02MB + Índice: 0.02MB
bdeds_wfBadLeechers: Datos: 0.02MB + Índice: 0.00MB
bdeds_wfBlockedCommentLog: Datos: 0.02MB + Índice: 0.00MB
bdeds_wfBlockedIPLog: Datos: 0.05MB + Índice: 0.00MB
bdeds_wfBlocks: Datos: 0.02MB + Índice: 0.02MB
bdeds_wfBlocks7: Datos: 0.02MB + Índice: 0.05MB
bdeds_wfBlocksAdv: Datos: 0.02MB + Índice: 0.00MB
bdeds_wfConfig: Datos: 0.44MB + Índice: 0.00MB
bdeds_wfCrawlers: Datos: 0.02MB + Índice: 0.00MB
bdeds_wfFileChanges: Datos: 0.02MB + Índice: 0.00MB
bdeds_wfFileMods: Datos: 4.52MB + Índice: 0.00MB
bdeds_wfHits: Datos: 1.02MB + Índice: 0.20MB
bdeds_wfHoover: Datos: 0.02MB + Índice: 0.02MB
bdeds_wfIssues: Datos: 0.02MB + Índice: 0.06MB
bdeds_wfKnownFileList: Datos: 1.52MB + Índice: 0.00MB
bdeds_wfLeechers: Datos: 0.20MB + Índice: 0.00MB
bdeds_wfLiveTrafficHuman: Datos: 0.02MB + Índice: 0.02MB
bdeds_wfLockedOut: Datos: 0.02MB + Índice: 0.00MB
bdeds_wfLocs: Datos: 0.02MB + Índice: 0.00MB
bdeds_wfLogins: Datos: 0.08MB + Índice: 0.03MB
bdeds_wfNet404s: Datos: 0.02MB + Índice: 0.02MB
bdeds_wfNotifications: Datos: 0.02MB + Índice: 0.00MB
bdeds_wfPendingIssues: Datos: 0.02MB + Índice: 0.06MB
bdeds_wfReverseCache: Datos: 0.02MB + Índice: 0.00MB
bdeds_wfScanners: Datos: 0.02MB + Índice: 0.00MB
bdeds_wfSNIPCache: Datos: 0.02MB + Índice: 0.05MB
bdeds_wfStatus: Datos: 0.13MB + Índice: 0.11MB
bdeds_wfThrottleLog: Datos: 0.02MB + Índice: 0.02MB
bdeds_wfTrafficRates: Datos: 0.02MB + Índice: 0.00MB
bdeds_wfVulnScanners: Datos: 0.02MB + Índice: 0.00MB
bdeds_yoast_seo_links: Datos: 0.02MB + Índice: 0.02MB
bdeds_yoast_seo_meta: Datos: 0.08MB + Índice: 0.00MB

### Post Type Counts ###

attachment: 431
fusion_element: 1
nav_menu_item: 16
page: 16
post: 1
product: 5236
revision: 49
shop_order: 98
wpcf7_contact_form: 1

### Security ###

Secure connection (HTTPS): ✔
Hide errors from visitors: ✔

### Active Plugins (15) ###

Contact Form 7: por Takayuki Miyoshi – 5.0.4
Fusion Builder: por ThemeFusion – 1.7.2
Fusion Core: por ThemeFusion – 3.7.2
Insert PHP: por Will Bontrager Software
LLC  – 1.3

Login No Captcha reCAPTCHA: por Robert Peake – 1.2.5
Redsys WooCommerce: por Redsys – 3.0.1 – No probado con la versión activa de WooCommerce
RGPD: por Avanhost
S.L. – 1.0.0

WooCommerce Weight Based Shipping: por weightbasedshipping – 5.2.2
WooCommerce Blocks: por Automattic – 1.2.0
WooCommerce Checkout Manager: por Visser Labs – 4.2.3 – No probado con la versión activa de WooCommerce
WooCommerce PDF Invoices & Packing Slips: por Ewout Fernhout – 2.2.5
WooCommerce: por Automattic – 3.5.3
Wordfence Security: por Wordfence – 7.1.18
Yoast SEO: por Equipo Yoast – 9.3
WP Mail SMTP: por WPForms – 1.4.1

### Settings ###

API Enabled: ✔
Force SSL: ✔
Currency: EUR (€)
Currency Position: right
Thousand Separator: .
Decimal Separator: ,
Number of Decimals: 2
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)


### WC Pages ###

Base de la tienda: #4 - /tienda/
Carrito: #5 - /carro/
Finalizar compra: #6 - /finalizar-comprar/
Mi cuenta: #7 - /mi-cuenta/
Términos y condiciones: #36 - /tienda/informacion-y-terminos-de-envio/

### Theme ###

Name: Avada Child
Version: 1.0.0
Author URL: 
Child Theme: ✔
Parent Theme Name: Avada
Parent Theme Version: 5.7.2
Parent Theme Author URL: 
WooCommerce Support: ✔

### Templates ###

Overrides: Avada/woocommerce/cart/cart.php
Avada/woocommerce/checkout/form-pay.php
Avada/woocommerce/checkout/review-order.php
Avada/woocommerce/checkout/thankyou.php
Avada/woocommerce/loop/loop-start.php
Avada/woocommerce/single-product/add-to-cart/variable.php
Avada/woocommerce/single-product/short-description.php
Avada/woocommerce/single-product/tabs/additional-information.php
Avada/woocommerce/single-product/tabs/description.php

Thank you for your help!

发布评论

评论列表(0)

  1. 暂无评论