Luca
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] import_id when creating products via PHPIt worked.
Forum: Plugins
In reply to: [WooCommerce] import_id when creating products via PHPAh okay, I already have some custom fields.
Is it possible to store data into these fields when creating the product?
Like this:$data = [ 'name' => 'fancy name', 'type' => 'simple', 'regular_price' => '0', 'my_custom_field' => 'some id' ];- This reply was modified 7 years, 10 months ago by Luca.
Forum: Plugins
In reply to: [WP Fastest Cache - WordPress Cache Plugin] Cache deletes itselfI have no timeout rules, but I found the cache logs and saw, a different plugin is updating a post every 10 seconds. That’s why the cash always emtied “itself”.
@lafilg The behavior with the posts is intentional and can be turned off in the settings!
Forum: Plugins
In reply to: [The Events Calendar] CSS for past events ONLYHey Ed,
thank you for your help. Could’t find td.tribe-events-past.
So I did something rather complicated via PHP. It worked. Heres how I did it for everyone else:I added this code to the functions.php of my child theme:
add_action( 'loop_start', 'tribe_events_insertion' ); // adds code inside the loop function tribe_events_insertion() { if ( get_post_type( get_the_ID() ) == 'tribe_events' ) { // checking for the correct post type // checking start time of the current event $thisID = get_the_ID(); $eventdate = get_post_meta( $thisID, $key = '_EventStartDate', true ); // setting the timezone date_default_timezone_set('Europe/Berlin'); $today = date("Y-m-d H:i:s"); if ($eventdate < $today) { // executing the code if event is in the past echo "<style type=\"text/css\">.tribe-events-cal-links{display:none!important;}</style>"; // this css removes the buttons } } }Enjoy!
You’re the man!
It works fine now!Looking forward to the updates! THANK YOU 🙂
Just tested it, I don’t know if it’s just me but when the E-Mail is correct and the user submits the form the script changes the opacity of the form to “.1” and shows the loader gif.
BUT in the time the loader is showing the button can still be clicked and the E-Mail gets put in several times: http://puu.sh/xsTaQ/fbe2b4e2b5.png (Even if the success message is showing it’s still clickable http://puu.sh/xsTmf/d25de5ced1.png).
I think it would be a more elegant way to hide the form completely and just showing the loader gif 🙂
Great! Thank you!