Fake sale popup time - by Fantasy - on WordPress WooCommerce support

This topic has 3 replies, 3 voices, and was last updated 11 months ago ago by Andrew Mitchell

  • Avatar: Fantasy
    Fantasy
    Participant
    December 28, 2024 at 21:59

    Hi Dear,
    I want to change to till 6 or 12 hours in fake sale popup how can i change it please help me or you can do it from may side please it showing only in minutes.

    Files is visible for topic creator and
    support staff only.
    2 Answers
    Avatar: Justin
    Luca Rossi
    Support staff
    December 30, 2024 at 08:18

    Dear @Fantasy,

    Currently, there is no hooks to edit the number yet. It’s random for now.

    To edit the number of hours, please go to this file: /wp-content/plugins/et-core-plugin/packages/sales-booster/sales-booster.php at the line 797:

    – Change:

    
    $product_options['time_ago'] = rand( 2, 59 );
    

    – To:

    
    $product_options['time_ago'] = rand( 6, 12 );
    

    After that, add the following code under functions.php file locates in your child theme:

    
    function n2t_text_strings( $translated_text, $text, $domain ) {
    	switch ( $translated_text ) {
    		case 'minutes ago' :
    			$translated_text = 'hours ago';
    			break;
    	}
    	return $translated_text;
    }
    add_filter( 'gettext', 'n2t_text_strings', 20, 3 );
    

    Hope it helps!

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    January 20, 2025 at 11:18

    Dear Fantasy,

    Choosing our theme reflects your commitment to quality, and for that, we’re genuinely grateful. As we constantly strive to elevate your experience, your feedback is an invaluable gift. Could you kindly take a moment to rate our product with 5 stars on ThemeForest?

    Click here to share your insights: https://themeforest.net/downloads

    Your support fuels our journey, and we appreciate it more than words can express.

    Best Regards,
    The 8Theme Team

  • Viewing 3 results - 1 through 3 (of 3 total)

The issue related to '‘fake sale popup time’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.