2016-09-27 4 views

Antwort

0

Für diese Aufgabe gibt es einen Filterhaken. Fügen Sie das zu Ihren functions.php hinzu:

add_filter('woocommerce_get_availability_text', 'my_woocommerce_get_availability_text', 10, 2); 
function my_woocommerce_get_availability_text($availability, $product) { 
    if (! $product->is_in_stock()) { 
     if (function_exists('iphorm_popup')) { 
      $availability = iphorm_popup(4, 'Change this to the text or HTML that will trigger the popup'); 
     } else { 
      $availability = 'Your out of stock text here'; 
     } 
    } 
    return $availability; 
} 
+0

Danke. Wie zeige ich diesen Text + Shortcode Formular dort an? kimizito

+0

Ich habe meine Antwort aktualisiert. Ich denke, das sollte funktionieren. –

+0

zeigt einen Fehler in Dreamweaver, wenn ich es in der Funktionsdatei einfügen. Ich habe ein Komma nach 'my_woocommerce_get_availability_text' (erste Zeile) hinzugefügt, aber als ich online hochgeladen habe, wurde die Seite leer. – kimizito

Verwandte Themen