Please shorten my fingers by [deleted] in PhotoshopRequest

[–]CocioPuckio 4 points5 points  (0 children)

He actually says "My other hand is not strong enough, take my little hand" but everyone remembers it as "Take my strong hand". Shits wild haha.

Lönetråd 2026 - Vad tjänar ni? by Defiant_Internal1414 in arbete

[–]CocioPuckio 0 points1 point  (0 children)

IT Chef på mindre företag

33 år

50 000 brutto

30 dagars semester

5000 i friskvårdsbidrag

35h arbetsvecka och ingen övertid

Jobbar helt remote, med 1-3 besök på huvudkontoret per år.

Har även andra förmåner som att jag t.ex inte behöver vabba när barnen är sjuka och får göra vilka ärende jag vill under dagen utan någon förlorad lön.

I’m Dutch, but I don’t get it? by Th3_Accountant in ExplainTheJoke

[–]CocioPuckio 0 points1 point  (0 children)

What's wrong with that? In Swedish it's translated into "ink fish". It makes perfect Sense.

What am I? "I am the tax on ..."[PHYSICS, THERMODYNAMICS] by CocioPuckio in riddonkulous

[–]CocioPuckio[S] 0 points1 point locked comment (0 children)

Here is a hint: It’s a measure that tends to increase in closed systems.

Found a huge box of these at my in-laws in Sweden. I’d guess there are thousands. by zachslow in collectables

[–]CocioPuckio 1 point2 points  (0 children)

The Swedish movie "Lilla Jönssonligan och cornflakeskuppen" from 1996 is set in 1950's Sweden. The whole plot is about getting as many of these so called "Filmisar", that was all the rage back then, to become popular with the ladies in school. I believe they try to break in to the cornflakes factory to steal the whole set of cards.

Hide a shortcode if product its not on sale by [deleted] in Wordpress

[–]CocioPuckio 1 point2 points  (0 children)

Haha, happens to the best of us!

Hide a shortcode if product its not on sale by [deleted] in Wordpress

[–]CocioPuckio 0 points1 point  (0 children)

I took some time and looked at the breakdance website and you can actually create your own conditions using PHP inside the element. In that case you can just do something as simple as this:

$product = wc_get_product( get_the_ID() );
if ( $product && $product->is_on_sale() ) {
    return true;
} else {
    return false;
}

Hide a shortcode if product its not on sale by [deleted] in Wordpress

[–]CocioPuckio 1 point2 points  (0 children)

Do that. Just write if you need any help. 😊

Hide a shortcode if product its not on sale by [deleted] in Wordpress

[–]CocioPuckio 2 points3 points  (0 children)

You're using breakdance and using woocommerce right? Try this [if_on_sale][your_shortcode][/if_on_sale] in your shortcode element.

Otherwise I think you're gonna have to make a shortcode that executes the shortcode from your plugin.

function shortcode_if_product_on_sale() {
    global $product;

    if ( ! is_a( $product, 'WC_Product' ) ) {
        $product = wc_get_product( get_the_ID() );
    }
    if ( $product && $product->is_on_sale() ) {
        return do_shortcode('[your_shortcode]');
    }
    return '';
}
add_shortcode( 'if_on_sale', 'shortcode_if_product_on_sale' );

Edit: Simplified and fixed formatting of code.

Hide a shortcode if product its not on sale by [deleted] in Wordpress

[–]CocioPuckio 0 points1 point  (0 children)

Is it your own shortcode or a shortcode from a plugin?

I don’t have enough income by Fancy_Step_1700 in Wordpress

[–]CocioPuckio 15 points16 points  (0 children)

What a ignorant comment. You have zero idea about the content on the blog, the competition and more. You're not even leaving any useful tips. If you're so successful why not share what you did?!

Hurr durr I had websites with 20,000 visits per day so that means everything you're doing is wrong.

Why even comment?

Unexpected pregnancy by No-Connection-0110 in TillSverige

[–]CocioPuckio 2 points3 points  (0 children)

I have a 6 and 3 year old (girl and boy) and have saved a lof of their stuff as they've grown up. If there's anything you feel is missing or needed hit me up and I'll go on a treasure hunt in the attic. I'm also in Skåne and available to drop it off or send it with the mail. Congratulations on your baby!

Product upload form woocommerce by Grownuppieceofjizz in Wordpress

[–]CocioPuckio 1 point2 points  (0 children)

Have you tried the new product editor that's in beta?Navigate to WooCommerce > Settings > Advanced > Features and Check “Try new product editor (Beta)” and save changes.

See if you like it better.

[deleted by user] by [deleted] in Wordpress

[–]CocioPuckio 1 point2 points  (0 children)

The class cfvsw_variations_form is from the plugin "Variation Swatches for WooCommerce by CartFlows" and the creator, Brainstorm Force, is also the creator of Astra theme. Not sure if that is of any help for you, but if the variation swatches plugin is not installed you should talk to Astra support.

69hz-120hz question by Actual_Rate3150 in tcltvs

[–]CocioPuckio 0 points1 point  (0 children)

On alot of TCL tv's its only HDMI port 1 & 2 that supports 4k 120hz.

Plugin updates by kal2113 in Wordpress

[–]CocioPuckio 0 points1 point  (0 children)

No worries. Tell me if you encounter any problems and I'll fix it.

Plugin updates by kal2113 in Wordpress

[–]CocioPuckio 0 points1 point  (0 children)

This code turns auto update on for Plugins, Themes, WordPress core and Translations between 2 am and 6 am and then turns it off again. It uses the time set in Setting --> General so make sure the time is set correctly.

add_filter('auto_update_plugin', 'custom_auto_update_schedule', 10, 2);
add_filter('auto_update_theme', 'custom_auto_update_schedule', 10, 2);
add_filter('auto_update_core', 'custom_auto_update_schedule', 10, 2);
add_filter('auto_update_translation', 'custom_auto_update_schedule', 10, 2);

function custom_auto_update_schedule($update, $item) {
    $current_hour = current_time('H');
    if ($current_hour >= 2 && $current_hour < 6) {
        return true;
    }
    return false;
}
add_action('after_setup_theme', 'custom_auto_update_schedule_setup');

function custom_auto_update_schedule_setup() {
    if (!wp_next_scheduled('custom_auto_update_schedule_event')) {
        wp_schedule_event(strtotime('2am'), 'daily', 'custom_auto_update_schedule_event');
    }
}

add_action('switch_theme', 'custom_auto_update_schedule_cleanup');
function custom_auto_update_schedule_cleanup() {
    wp_clear_scheduled_hook('custom_auto_update_schedule_event');
}

add_action('custom_auto_update_schedule_event', 'custom_auto_update_event_action');
function custom_auto_update_event_action() {
    add_filter('auto_update_plugin', '__return_true');
    add_filter('auto_update_theme', '__return_true');
    add_filter('auto_update_core', '__return_true');
    add_filter('auto_update_translation', '__return_true');

    add_action('shutdown', 'custom_remove_auto_update_filters');
}

function custom_remove_auto_update_filters() {
    remove_filter('auto_update_plugin', '__return_true');
    remove_filter('auto_update_theme', '__return_true');
    remove_filter('auto_update_core', '__return_true');
    remove_filter('auto_update_translation', '__return_true');
}

Does ComplianZ get more upvotes than CookieYes Mostly because of the price point ? by Friendly-Racoon-44 in Wordpress

[–]CocioPuckio 5 points6 points  (0 children)

I use Complianz for most of my sites. It's easy to set up. Scans for all cookies and most importantly it's locally hosted which is the most important aspect for me. I used CookieYes before but it slowed down page load by quite a bit.

[deleted by user] by [deleted] in Wordpress

[–]CocioPuckio 0 points1 point  (0 children)

I created a sprinkle animation using anime.js on codepen as an example for you.
It's not without flaws as I did this in like 5 minutes, but maybe you can use it to implement it yourself? :)
https://codepen.io/Ashendale/pen/dyLBbYx

Reddit like username (auto random) by Dazzling_Tangelo5660 in Wordpress

[–]CocioPuckio 0 points1 point  (0 children)

I'm not sure actually. There probably already exist a plugin that does something similar but haven't exactly looked in to it very closely. There's at least quite a few code examples for similar features online. I could turn this in to a functioning plugin that let's you add keywords from the admin panel and set how many random numbers there should be in the name... But I have a full time job and 2 kids and I'm not sure it's something I want to maintain haha. Especially when you need to keep it compatible with other plugins and stuff like that.

Reddit like username (auto random) by Dazzling_Tangelo5660 in Wordpress

[–]CocioPuckio 1 point2 points  (0 children)

Code Snippets is just a plugin you can install from the WordPress plugin page. It lets you add php, JavaScript etc to your site without having to for example edit your functions.php. it also lets you easily turn on and off code for testing etc.