<code>function action_wpo_wcpdf_after_document_label( $wpo_wcpdf_export_template_type, $order ) { if ('packing-slip' != $wpo_wcpdf_export_template_type) { return; } $billing_email = $order->get_billing_email(); if (!$billing_email) { return; } $customer_orders = get_posts( array( 'numberposts' => -1, 'exclude' => array($order->get_id()), 'meta_key' => '_billing_email', 'meta_value' => $billing_email, 'post_type' => wc_get_order_types(), 'post_status' => array_keys( wc_get_order_statuses() ), ) ); if (empty($customer_orders)) { print "\n" . '<p class="form-field form-field-wide" style="font-weight: bold;margin-top: -60px;border: 1px solid;width: 90px;padding: 3px 10px 5px 10px;line-height: 1;text-align: center;">New Customer</p>' . "\n"; return; } else { print "\n" . '<p class="form-field form-field-wide" style="font-weight: bold;margin-top: -60px;border: 1px solid;width: 90px;padding: 3px 10px 5px 10px;line-height: 1;text-align: center;">Existing Customer</p>' . "\n"; return; } return; } add_action( 'wpo_wcpdf_after_document_label', 'action_wpo_wcpdf_after_document_label', 10, 2 ); </code>

问题描述 投票:0回答:1
启用

-High-performance Order Storageed启用了启用,您需要使用WooCommerce CRUD方法

(或函数)

(或函数)

,请参见

HPOSESTEMensionforcipebook

.
在您的代码中,您应该用兼容
php woocommerce
1个回答
最新问题
© www.soinside.com 2019 - 2024. All rights reserved.