boriskamp1991
Forum Replies Created
-
Forum: Plugins
In reply to: [Yoast SEO] wpseo_title filter not workingNevermind, I need the
wpseo_opengraph_title
filter as well, thanks!Forum: Plugins
In reply to: [Advanced Custom Fields: reCAPTCHA Field] reCAPTCHA V3Does your V2 checkbox version work @johnny18sg ?
Mine does not, I actually have the V2 checkbox one since I expected the plugin not to support V3.
I does work with the demo keys (third question here: https://developers.google.com/recaptcha/docs/faq) So that’s weird to me.Do you have any clue on what I’m missing here?
Forum: Plugins
In reply to: [Advanced Custom Fields: reCAPTCHA Field] reCAPTCHA V3@johnny18sg have you found a solution yet for this? I have the exact same issue.
Forum: Plugins
In reply to: [WooCommerce] make checkout field mandatory ifThanks for the line Mike,
sorry for another question, but Im still stuck on how to progress with this.
I have no idea where to start creating a function that I can hook intodo_action( 'woocommerce_before_checkout_process' );
can you create somekind of steplist so I can start working on what I need?
Thanks Mike!
Forum: Plugins
In reply to: [WooCommerce] make checkout field mandatory ifThanks for the answer Mike!
I made it non-required by default.Any tips on where to look for the right hooks and how to do this?
or tips on how I might find this out myself.thanks for the help!
Forum: Plugins
In reply to: [WooCommerce] added checkout fields not saving to post_metaThanks for clearing up Mike!
the file I want to add to is
class-wc-emails.php
, however, this is not in the templates folder, so I cannot safely override this right?
let me elaborate, this is the current piece of code inclass-wc-emails.php
:public function customer_details( $order, $sent_to_admin = false, $plain_text = false ) { $fields = array(); if ( $order->customer_note ) { $fields['customer_note'] = array( 'label' => __( 'Note', 'woocommerce' ), 'value' => wptexturize( $order->customer_note ) ); } if ( $order->billing_email ) { $fields['billing_email'] = array( 'label' => __( 'Email', 'woocommerce' ), 'value' => wptexturize( $order->billing_email ) ); } if ( $order->billing_phone ) { $fields['billing_phone'] = array( 'label' => __( 'Tel', 'woocommerce' ), 'value' => wptexturize( $order->billing_phone ) ); } $fields = array_filter( apply_filters( 'woocommerce_email_customer_details_fields', $fields, $sent_to_admin, $order ), array( $this, 'customer_detail_field_is_valid' ) ); if ( $plain_text ) { wc_get_template( 'emails/plain/email-customer-details.php', array( 'fields' => $fields ) ); } else { wc_get_template( 'emails/email-customer-details.php', array( 'fields' => $fields ) ); } }
this is what I would like:
public function customer_details( $order, $sent_to_admin = false, $plain_text = false ) { $fields = array(); if ( $order->customer_note ) { $fields['customer_note'] = array( 'label' => __( 'Note', 'woocommerce' ), 'value' => wptexturize( $order->customer_note ) ); } if ( $order->billing_email ) { $fields['billing_email'] = array( 'label' => __( 'Email', 'woocommerce' ), 'value' => wptexturize( $order->billing_email ) ); } if ( $order->billing_phone ) { $fields['billing_phone'] = array( 'label' => __( 'Tel', 'woocommerce' ), 'value' => wptexturize( $order->billing_phone ) ); } //I added this if statement: if ( $order->billing_type_klant ) { $fields['billing_type_klant'] = array( 'label' => __( 'Customer Type', 'woocommerce' ), 'value' => wptexturize( $order->billing_type_klant ) ); } //and more new array items $fields = array_filter( apply_filters( 'woocommerce_email_customer_details_fields', $fields, $sent_to_admin, $order ), array( $this, 'customer_detail_field_is_valid' ) ); if ( $plain_text ) { wc_get_template( 'emails/plain/email-customer-details.php', array( 'fields' => $fields ) ); } else { wc_get_template( 'emails/email-customer-details.php', array( 'fields' => $fields ) ); } }
Forum: Plugins
In reply to: [WooCommerce] added checkout fields not saving to post_metaIm sorry Mike, but I lost you there.
Please read my last question without my previous ones in mind:is there no way I can add or remove to the $fields array in email-customer-details.php without editing template files?
I can edit class-wc-email.php after line 340 but that would not be that smart with updating right?
Do you mind to elaborate a little bit on that question?
Thanks Mike!
Forum: Plugins
In reply to: [WooCommerce] added checkout fields not saving to post_metais there no way I can add or remove to the
$fields
array inemail-customer-details.php
without editing template files?I can edit
class-wc-email.php
after line 340 but that would not be that smart with updating right?Forum: Plugins
In reply to: [WooCommerce] added checkout fields not saving to post_metaHi Mike,
that worked perfectly!
Might be worth updating the docs to make that more clear right?I would like to add those fields to the
woocommerce_email_customer_details_fields
filter.
I tried this but it did not work, any ideas?// Add fields to Email #2 add_filter('woocommerce_email_customer_details_fields', 'my_custom_order_meta_keys'); function my_custom_order_meta_keys( $fields, $sent_to_admin, $order ) { $fields['_billing_type_klant'] = array( 'label' => 'Type Klant_', 'value' => wptexturize( $order->_billing_type_klant ) ); $fields['_billing_type_klant'] = array( 'label' => 'Type Klant', 'value' => wptexturize( $order->billing_type_klant ) ); return $keys; }
when using
add_filter('woocommerce_email_order_meta_fields', 'custom_email_order_meta_fields', 10, 3 ); function custom_email_order_meta_fields( $fields, $sent_to_admin, $order ) { $fields['_billing_type_klant'] = array( 'label' => __( 'Type Klant' ), 'value' => get_post_meta( $order->id, '_billing_type_klant', true ), ); $fields['_billing_factuur_email'] = array( 'label' => __( 'Factuur Email' ), 'value' => get_post_meta( $order->id, '_billing_factuur_email', true ), ); $fields['_billing_kvk_nr'] = array( 'label' => __( 'KvK Nummer' ), 'value' => get_post_meta( $order->id, '_billing_kvk_nr', true ), ); $fields['_billing_functie'] = array( 'label' => __( 'Functie' ), 'value' => get_post_meta( $order->id, '_billing_functie', true ), ); $fields['_billing_aanhef'] = array( 'label' => __( 'Aanhef (voornaam)' ), 'value' => get_post_meta( $order->id, '_billing_aanhef', true ), ); return $fields; }
they get added above the customer details, I need them in the list
Thanks Mike!
Forum: Plugins
In reply to: [WooCommerce] added checkout fields not saving to post_metaHi Mike,
Thanks for helping out!
This is it, the quoted part in my question states there’s no need to save it because the field is auto-processed and saved?
Seems like I’m completely missing something here….Forum: Plugins
In reply to: [WooCommerce] Search resultsNevermind!
I looked at
product-searchform.php
and adjusted my own so that it appends.
ended up adding this input field:
‘<input type=”hidden” name=”post_type” value=”product” />`Thanks Mike!
Forum: Plugins
In reply to: [WooCommerce] Search resultsAwersome!!
thanks for letting me know Mike!I got stuck on how to add this to the url though, any ideas?
Forum: Plugins
In reply to: [WooCommerce] Tax ToggleThanks for clearing that out Mike!
I was able to modify the plugin in such a way it works the way I want it to.
Forum: Plugins
In reply to: [WooCommerce] which extension to chooseThanks Mike!
Forum: Plugins
In reply to: [WooCommerce] Tax ToggleIm sorry for not being clear enough.
What I meant is that the developers will probably know more what direction I should go.
very theoretically said, all I need is a radio button that toggles the WooCommerce>setting>taxes>show prices in store from excluding taxes to including taxes and vice versa
right? that cant be to difficult