1
Im ayant un problème avec l'expédition de woocommerce, voici l'erreur im obtenant sur la page de chariot.ERREUR FATALE get_label() woocommerce expédition
Fatal error: Call to a member function get_label() on null in public_html/wp-content/plugins/woocommerce/includes/wc-cart-functions.php on line 327
La capture d'écran est également jointe.
wc cart-functions.php
function wc_cart_totals_shipping_method_label($method) {
$label = $method->get_label();
if ($method->cost > 0) {
if (WC()->cart->tax_display_cart == 'excl') {
$label .= ': ' . wc_price($method->cost);
if ($method->get_shipping_tax() > 0 && WC()->cart->prices_include_tax) {
$label .= ' <small class="tax_label">' . WC()->countries->ex_tax_or_vat() . '</small>';
}
} else {
$label .= ': ' . wc_price($method->cost + $method->get_shipping_tax());
if ($method->get_shipping_tax() > 0 && ! WC()->cart->prices_include_tax) {
$label .= ' <small class="tax_label">' . WC()->countries->inc_tax_or_vat() . '</small>';
}
}
}
return apply_filters('woocommerce_cart_shipping_method_full_label', $label, $method);
}
get_label()
public function get_label() {
return apply_filters('woocommerce_shipping_rate_label', $this->label);
}
Toute aide sera très appréciée.
pouvez-vous copier coller la partie de code à l'origine du problème? peut-être comme la ligne 320 à la ligne 335 –
question mise à jour – Kevin
rechercher des fichiers woocommerce et trouver le corps de get_label() –