bmz1
Forum Replies Created
-
Mi sembra che facendo così funzioni!
Inserisco in woocommerce-pdf-italian-add-on.php un controllo nella tua funzione:
public function piva_checkout_field_process() {
global $woocommerce;// inserisco questo controllo
if ( is_checkout() && WC()->cart->needs_payment() || is_checkout() && WC()->cart->needs_shipping() ) { //BMZ
poi prosegue la tua funzione
// Verifica se è presente quando cliccano su acquista
... }ho fatto questa prova:
inserisco la tua remove_action, rendo invisibili i campi conunset($fields['billing_invoice_type']);
unset($fields['billing_cf']);
e ottengo: i campi non sono visibili (ok), quando clicco “Ordina” appare messaggio
SyntaxError: JSON Parse error: Unrecognized token '<'.purtroppo no, continuano ad apparire e a funzionare.
Se ti vengono in mente altre proposte … rimango in attesa di tue info.
Grazie, BrunoSe usi wp è naturale anche per chi non è programmatore provare a fargli fare ciò che ti passa per la testa … quindi ho cercato su internet qualche idea e questo è il codice che uso
function bmz_billing_fields( $fields ) {
if ( is_checkout() && WC()->cart->needs_payment() || is_checkout() && WC()->cart->needs_shipping() ) {
...
return $fields;
}
remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form', 10 );
add_filter( 'woocommerce_enable_order_notes_field', '__return_false' );remove_action( 'woocommerce_checkout_process', 'piva_checkout_field_process');
//unset( $fields['billing_first_name'] );
//unset( $fields['billing_last_name'] );
//unset( $fields['billing_email'] );
unset( $fields['billing_country'] );
unset( $fields['billing_company'] );
....return $fields;
}Come vedi non so come trattare la tua action per non farla vedere nel frontend ma soprattutto per non farla funzionare (se uso unset sui tuoi campi la funzione è attiva e: se su ricevuta allora procedo, se su fattura chiede piva).
Grazie per l’aiuto che mi potrai dare, credo che il tuo plugin sia ottimo, a me serve che funzioni anche per le situazioni di gratuità (prodotti virtuali e gratuiti da scaricare senza troppe formalità).
Grazie,
BrunoWow, questa è velocità! 5 stelle!
Come detto non sono un programmatore, e quindi ho capito ciò che vuoi dirmi ma non so metterlo in pratica.
Sono andato a vedere alla riga 58 come è costruita l’action e ho provato a rimuoverla, indicando il tag e poi la funzione. Ma non succede niente.Hai ancora un minuto da dedicarmi? Grazie, Bruno
Hi,
thanks for you quickly reply!I appreciate your works!
Regards,
BrunoForum: Plugins
In reply to: [Calculated Fields Form] Shortcodes in Instructional FieldHi,
I’m sorry too!Thanks for your wonderful work,
BrunoForum: Plugins
In reply to: [WooCommerce] wp 3.8.1 update: edit product not working@splashingpixels,
I found that AAM plugin was responsible. I deactivate it and now it’s all ok.I found this behaviour in my sites (WP 3.8.1 – WooCommerce 2.0.20 -AAM 2.1): can’t see but one widget in Appearance>Widgets (and can’t edit) and the Product Page (woocommerce product) is half uploaded and can’t edit it.
After deactivation of AMM, always works fine.
But I need AAm (see why @radovan in another forum post) so I hope you can help me.
Thanks,
BrunoForum: Plugins
In reply to: [Woocommerce CSV importer] Products not showing up in categoriesHi Allaerd,
I have the same problem, the file is ok, the category/tags are uploaded, but when I click on Category this is the answer: “No products found which match your selection.”.But if I open the product page, deselect the uploaded category, save, then re-select the category, boom … it works!
Any suggestion?
Thanks,
Bruno