currentStage=null; $this->Loader=$loader; $this->stages=array( array( 'Threshold'=>50, 'content'=>__("Hello!, you have created %s orders using custom fields, that's Great! Could you do me a BIG favor and give it a 5-star rating on WordPress? Good reviews really help to spread the word and keep me motivated to continuing maintaining and improving the plugin =)",'additional-product-fields-for-woocommerce'), 'Reviewlink'=>__('Sure, keep up the good work','additional-product-fields-for-woocommerce'), 'Remindmelink'=>__('Nope, maybe later','additional-product-fields-for-woocommerce'), 'DontShowAgain'=>__('I already did','additional-product-fields-for-woocommerce') ), array( 'Threshold'=>100, 'content'=>__("Hello! Its me again =), you have generated %s orders using custom fields, so i was wondering, would you have time to 5 star review the plugin really quick? I know you are busy and i don't like to bother you but reviewing the plugin is really important and ensure the continuation of its development.",'additional-product-fields-for-woocommerce'), 'Reviewlink'=>__('Sure, i will review the plugin really quick','additional-product-fields-for-woocommerce'), 'Remindmelink'=>__('Sorry but i am not ready yet, maybe later','additional-product-fields-for-woocommerce'), 'DontShowAgain'=>__('I already did','additional-product-fields-for-woocommerce') ), array( 'Threshold'=>200, 'content'=>__("Hello! sorry to bother you again (this is the last time i do it), i just wanted to tell you that you have generated %s orders using custom fields which is amazing. Could you please help me and 5-star review the plugin? it will take you less than 1 minutes and will greatly help me promote and keep growing this plugin that i love and i hope it has been useful for you.",'additional-product-fields-for-woocommerce'), 'Reviewlink'=>__('Alright, i will review the plugin quickly','additional-product-fields-for-woocommerce'), 'DontShowAgain'=>__('I don\'t want to review it =(','additional-product-fields-for-woocommerce') ) ); } private $currentStage; private $count=0; public function Start() { $this->GetCurrentStage(); if($this->currentStage==null) return; $this->PrintNotice(); } private function GetCurrentStage() { if(get_option('rednaowooextraproduct_dont_show_again',0)==1) return -1; $orderCount=\get_option('rednaowooextraproduct_order_count',0); $orderCount=105; $thresholdNumber=-1; for($i=count($this->thresholds)-1;$i>=0;$i--) if($orderCount>=$this->thresholds[$i]) { $thresholdNumber = $i; $this->currentStage=$this->stages[$i]; $this->count=$orderCount; break; } return $thresholdNumber; } private function GetContent() { return sprintf($this->currentStage['content'],$this->count); } private function PrintNotice() { ?>
|
|
GetContent()?> -Edgar Rojas
|