Allyson
Forum Replies Created
-
Forum: Plugins
In reply to: [Registrations for WooCommerce] Campo adicional data de aniversarioOlá @leogartner,
Para adicionar novos campos você pode utilizar como exemplo essa página na wiki: https://github.com/HasteDesign/Registrations-for-WooCommerce/wiki/Custom-checkout-fields
I didn’t change a line of code, but cleared the cache, restarted the browser and updated the WordPress, and then everything worked, so, that’s the insight if someone come with the same issue.
Thaks, you have clarified my question, I forget I could simply use $_SERVER to check the referer and determine if I have to put something or not into the_content callback.
Solved:
add_filter( 'the_content', 'filter_content', 999 ); function filter_content( $content ) { if ( 'www.test.com' !== $_SERVER['HTTP_REFERER'] ) { return $content; } else { // Insert my ads } return $content; }
- This reply was modified 5 years, 5 months ago by Allyson.
But, in which hook I can make that check? I’m trying something like that now:
if ( ! defined( 'REST_REQUEST' ) ) { add_filter( 'the_content', array( __class__, 'filter_content' ), 999 ); } add_filter( 'rest_pre_dispatch', array( __class__, 'rest_check_referer' ), 10, 3 );
If REST_REQUEST is not defined, I add my filter to the_content, and then I’m trying to check the referer in
rest_pre_dispatch
, and if it’s from the specific referer, I try to add my calback to the_content, but I guess it’s too late to fire the filter.Hi @irenejs, I was doing things in the wrong way, followed your basic video tutorial and figured out: https://www.youtube.com/watch?time_continue=497&v=A0kQ6P4cgaM
Thank you
Hi, I’ve followed the instructions but nothing changed, still getting a lot of notices and an error on saving a match: https://imgur.com/a/O8BaoE0
And I feel that it’s strange, I have to add a match term, and then click in the number of posts associated to the term (0) to see the post type joomsport_match list… And so, click in add new. It feels like I’m doing something really wrong.
Forum: Plugins
In reply to: [Advanced Ads –?Ad Manager & AdSense] Conflict with wordpress customizerSorry man, I know the guidelines very well, since I’m a moderator of Brazilian forum for almost 5 years – I wasn’t trying to change the purpose of the thread, I’m trying to add more info and insights to it, I’m having the same problem. But since I’m using Advanced Ads Pro, I’ll try to reach the customer support trough the site.
Thanks
Forum: Plugins
In reply to: [Advanced Ads –?Ad Manager & AdSense] Conflict with wordpress customizerBut, we have this error in console while in customizer:
uncaught exception: TagError: adsbygoogle.push() error: No slot size for availableWidth=0
Searching trough the web, I guess we can tell that’s something related to how the code is triggered: https://stackoverflow.com/questions/33465168/google-adsense-error-tagerror-adsbygoogle-push-error-no-slot-size-for-avail
Maybe the
adsbygoogle.push()
is been triggered before the <iframe> with the preview page has been loaded? (just an assumption)Forum: Plugins
In reply to: [Advanced Ads –?Ad Manager & AdSense] Conflict with wordpress customizerYes, you’re right @webzunft, it’s probably something caused by Google Ads. I figured out that it’s only occurring on Chrome (normal/anonymous tab) and Firefox (normal), but using Firefox in anonymous window the error didn’t occur.
Forum: Plugins
In reply to: [Advanced Ads –?Ad Manager & AdSense] Conflict with wordpress customizerI’m having the exac same problem here, and I’m using Advanced Ads. It’s causing that problem with customizer and Elementor. If I use my browser in incognito mode this doesn’t happen, pointing me to think it really is something with ads.
- This reply was modified 5 years, 6 months ago by Allyson.
Forum: Plugins
In reply to: [Delivery Date System for WooCommerce] Make delivery time field not requiredOlá @kensuke3k,
Infelizmente no momento n?o há op??es para desativar o calendário, mas é um ótima ideia para uma vers?o futura. Se você tiver conhecimentos de programa??o, é possível remover os hooks que registram e validam os campos e recria-los em seu functions.php sem campo de data:
function delivery_date_system_echo_fields_without_calendar( $checkout ) { echo '<div class="delivery-options">'; if ( ! empty( delivery_time_options() ) ) { woocommerce_form_field( 'delivery_time', array( 'type' => 'select', 'class' => array('form-row-wide'), 'id' => 'delivery-time', 'required' => true, 'label' => __( 'Select a delivery time', 'delivery-date-system' ), 'options' => delivery_time_options() )); } echo '</div>'; } remove_action( 'woocommerce_before_order_notes', 'delivery_date_system_echo_fields', 5 ); add_action( 'woocommerce_before_order_notes', 'delivery_date_system_echo_fields_without_calendar', 5 ); function delivery_date_system_validate_new_checkout_fields_without_calendar() { if ( empty( $_POST['delivery_time'] ) ) wc_add_notice( __( 'Select an available delivery time.', 'delivery-date-system' ), 'error' ); } remove_action( 'woocommerce_checkout_process', 'delivery_date_system_validate_new_checkout_fields' ); add_action( 'woocommerce_checkout_process', 'delivery_date_system_validate_new_checkout_fields_without_calendar' );
Agrade?o a compreens?o
Forum: Plugins
In reply to: [Delivery Date System for WooCommerce] Make delivery time field not requiredHi @marcoandrei, it’s been a while since we get from you, any updates on this issue? The snippet helped you?
Thanks!
Forum: Plugins
In reply to: [Delivery Date System for WooCommerce] Make delivery time field not requiredHi Marco,
The easiest way I though you could do that is unregistering the hook where we create the fields in the plugin, and then recreating it without the
required
option, like that:remove_action( 'woocommerce_before_order_notes', 'delivery_date_system_echo_fields', 5 ); function delivery_date_system_echo_non_required_fields( $checkout ) { echo '<div class="delivery-options">'; woocommerce_form_field( 'delivery_date', array( 'type' => 'text', 'class' => array('form-row-wide'), 'id' => 'datepicker', 'required' => false, 'label' => __( 'Select one of the available delivery days', 'delivery-date-system' ), 'placeholder' => __( 'Open calendar', 'delivery-date-system' ), 'autocomplete' => 'off', )); if ( ! empty( delivery_time_options() ) ) { woocommerce_form_field( 'delivery_time', array( 'type' => 'select', 'class' => array('form-row-wide'), 'id' => 'delivery-time', 'required' => false, 'label' => __( 'Select a delivery time', 'delivery-date-system' ), 'options' => delivery_time_options() )); } echo '</div>'; } add_action( 'woocommerce_before_order_notes', 'delivery_date_system_echo_non_required_fields', 5 );
I hope this can help you!
Best regards,
Allyson SouzaForum: Plugins
In reply to: [Registrations for WooCommerce] Problem with serialized participantsHi @websonica,
Thank you for your report, we have put this fix in your tasks for our minor release that should be done soon.
Thanks,
Forum: Plugins
In reply to: [Registrations for WooCommerce] Registration products not “virtual”Hi @xnau,
That’s strange, Registrations for WooCommerce do not hide the virtual checkbox from variations, it only come with it marked by default, are you sure no other plugin is causing that error? Which version of the plugin and WooCommerce you’re using? (So I can test it here)
Thanks you