From a849c35831ed4e23f976953d45bc5b36bea8a4d3 Mon Sep 17 00:00:00 2001 From: Tech No Freaky Date: Fri, 11 Sep 2015 15:02:38 +0530 Subject: [PATCH] Released 12.1 * Notice in single product page [https://wordpress.org/support/topic/undefined-index-show_js?replies=1] * Fixed Javascript Issue With Variable Product Quick Buy [Conflict With Some Theme / Other Plugin] * Update To latest WooCommerce [WC 2.3.11] And Latest WordPress [WP 4.2.2] * Minor Bug Fix. * Added Support For i18n Text Domain: woocommerce-quick-buy --- lang/WooCommerce_Quick_Buy_en_US.po | 142 ++++++++++++++++++++++ lang/en_US.mo | Bin 0 -> 3744 bytes lang/woocommerce-quick-buy.pot | 151 +++++++++++++++++++++++ readme.txt | 37 ++++-- uninstall.php | 8 +- woocommerce-quick-buy.php | 181 ++++++++++++++++------------ 6 files changed, 430 insertions(+), 89 deletions(-) create mode 100644 lang/WooCommerce_Quick_Buy_en_US.po create mode 100644 lang/en_US.mo create mode 100644 lang/woocommerce-quick-buy.pot diff --git a/lang/WooCommerce_Quick_Buy_en_US.po b/lang/WooCommerce_Quick_Buy_en_US.po new file mode 100644 index 0000000..29b6ebe --- /dev/null +++ b/lang/WooCommerce_Quick_Buy_en_US.po @@ -0,0 +1,142 @@ +msgid "" +msgstr "" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: POEditor.com\n" +"Project-Id-Version: WooCommerce Quick Buy\n" +"Language: en-us\n" + +#: woocommerce-quick-buy.php:106 +msgid "WC Quick Buy" +msgstr "WC Quick Buy" + +#: woocommerce-quick-buy.php:139 +msgid "WC Quick Buy Settings" +msgstr "WC Quick Buy Settings" + +#: woocommerce-quick-buy.php:141 +msgid "The following options are used to configure WC Quick Buy" +msgstr "The following options are used to configure WC Quick Buy" + +#: woocommerce-quick-buy.php:144 +msgid "Redirect Location" +msgstr "Redirect Location" + +#: woocommerce-quick-buy.php:145 +msgid "After Add To Cart Where To Redirect The user" +msgstr "After Add To Cart Where To Redirect The user" + +#: woocommerce-quick-buy.php:149 +msgid "Cart Page" +msgstr "Cart Page" + +#: woocommerce-quick-buy.php:149 +msgid "Checkout Page" +msgstr "Checkout Page" + +#: woocommerce-quick-buy.php:153 +msgid "Automatically Add Button " +msgstr "Automatically Add Button " + +#: woocommerce-quick-buy.php:154 +msgid "Automaticaly Adds Button After Add To Cart In Single Product View" +msgstr "Automaticaly Adds Button After Add To Cart In Single Product View" + +#: woocommerce-quick-buy.php:161 +msgid "Position" +msgstr "Position" + +#: woocommerce-quick-buy.php:162 +msgid "Where the button need to be added in single page .. before / after" +msgstr "Where the button need to be added in single page .. before / after" + +#: woocommerce-quick-buy.php:169 +msgid "Show Quick Buy Button For " +msgstr "Show Quick Buy Button For " + +#: woocommerce-quick-buy.php:170 +msgid "For Which Products To Show Quick Buy Button [eg to show for simple products select only simple products]" +msgstr "For Which Products To Show Quick Buy Button [eg to show for simple products select only simple products]" + +#: woocommerce-quick-buy.php:178 +msgid "Quick Buy Button Style" +msgstr "Quick Buy Button Style" + +#: woocommerce-quick-buy.php:179 +msgid "Directly Add Button CSS" +msgstr "Directly Add Button CSS" + +#: woocommerce-quick-buy.php:187 +msgid "Quick Buy Button Text" +msgstr "Quick Buy Button Text" + +#: woocommerce-quick-buy.php:188 +msgid "You Can Change The Quick Buy Button Lable" +msgstr "You Can Change The Quick Buy Button Lable" + +#: woocommerce-quick-buy.php:193 +msgid "Quick Buy Button Class" +msgstr "Quick Buy Button Class" + +#: woocommerce-quick-buy.php:194 +msgid "You Can Change The Quick Buy Button Class" +msgstr "You Can Change The Quick Buy Button Class" + +#: woocommerce-quick-buy.php:201 +msgid "Debug / Troubleshoot" +msgstr "Debug / Troubleshoot" + +#: woocommerce-quick-buy.php:203 +msgid "if JS is not running please use the below fields to fix it." +msgstr "if JS is not running please use the below fields to fix it." + +#: woocommerce-quick-buy.php:207 +msgid "Simple Product Form Class" +msgstr "Simple Product Form Class" + +#: woocommerce-quick-buy.php:208 +msgid "Enter The Form Class for simple product add to cart form" +msgstr "Enter The Form Class for simple product add to cart form" + +#: woocommerce-quick-buy.php:215 +msgid "Variable Product Form Class" +msgstr "Variable Product Form Class" + +#: woocommerce-quick-buy.php:216 +msgid "Enter The Form Class for Variable product add to cart form" +msgstr "Enter The Form Class for Variable product add to cart form" + +#: woocommerce-quick-buy.php:223 +msgid "WC Quick Buy Short Code" +msgstr "WC Quick Buy Short Code" + +#: woocommerce-quick-buy.php:225 +msgid "[wc_quick_buy] Use Inside of product loop \n" +" [wc_quick_buy product=\"2\"] Outside loop With manual Product ID
To remove the js embeded by shortcode use [wc_quick_buy product=\"2\" show_js=\"false\"]

Note : Do not add this shortcode in a form. as this shortcode itself generates a html form

." +msgstr "[wc_quick_buy] Use Inside of product loop \n" +" [wc_quick_buy product=\"2\"] Outside loop With manual Product ID
To remove the js embeded by shortcode use [wc_quick_buy product=\"2\" show_js=\"false\"]

Note : Do not add this shortcode in a form. as this shortcode itself generates a html form

." + +#. Plugin Name of the plugin/theme +#: +msgid "Woocommerce Quick Buy" +msgstr "Woocommerce Quick Buy" + +#. #-#-#-#-# plugin.pot (Woocommerce Quick Buy 0.12) #-#-#-#-# +#. Plugin URI of the plugin/theme +#. #-#-#-#-# plugin.pot (Woocommerce Quick Buy 0.12) #-#-#-#-# +#. Author URI of the plugin/theme +#: +msgid "http://varunsridharan.in/" +msgstr "http://varunsridharan.in/" + +#. Description of the plugin/theme +#: +msgid "Add Quick buy button to redirect user to checkout / cart immediately when he click quick buy button" +msgstr "Add Quick buy button to redirect user to checkout / cart immediately when he click quick buy button" + +#. Author of the plugin/theme +#: +msgid "Varun Sridharan" +msgstr "Varun Sridharan" + diff --git a/lang/en_US.mo b/lang/en_US.mo new file mode 100644 index 0000000000000000000000000000000000000000..08b861f2332b560b7d2563967daefec5a173f29c GIT binary patch literal 3744 zcmeH|&ue2<6vwaHu^NA&_yd0o911Q3llTLqWYR*Lc1nhh(`hoTGeapi@7?6x&da^= z-TNk!KR`rq>vBMFKj3E2jo`)~xN#+jAc9L>2!cDo?|JW~O-w7|%0&aoC->Jm_j}H{ z_x||A+y??5!uJLK-h&_Jy+`~AeP_`Q(DnI!Lc9#VI48uj;5N7d#^8hC9q{>vci-v`;h2U-97An*H2koEIsS-%EZe^T&0koW%~$olVstp6*J z{r(KHoj*a={|210{%sIlq66}J3$p)rK-Pb|=>G|1{eKjsM~k?EtUm-rJ+Pr#zCH~0 z-%fRKW51J*_UhHFldd>LP2+T^$aZOv*f0$|#nuj}ME~t`jJvVnrG?iP4qabLedafF zwyS+aeQ8n|(^j#I<{DAGlT??fZ7ETGdsC5*6dgEH{f-J%NSzV6$R?h}Pzo)Sd#5S2 zlkR!`aR0z9Ep%n<)WRN(Ly^0xN3SoxX}zKv)m>l4@iNhxC1X9wFob{YCR}PmlDanO zS4g^kzP4WjeI}O=EG}ly`JVp-u9)}0YWg!7Om!+njFan92Fz8_M3)U+Vo;|nA07th9dL5C3{LV#%i+Gn(CxI z2x})c?ZgV1vRWd!MA(|H?xpD2Z5#ze946!#qZmt3B#90qnMfn17EU&(rM!n@H#LQ0kE}Lu z{6${Od_fe)$EbW;9mOSp|2VBKFUJ9jk17@FC=`T3$w@vNV%OTh;y@*Vn%MtUo8q__ zYDCgt8OPy-wEUZyn_QbB@_taOR&TO=H&$QKrYdxoF0=@@3|~1IH5_eJrNr&VH(VxA zAq&*iDh_e$Sp2(1+E>KI=Ee2$j!GO-Q=?Zauap`V$He$@do)lr@+gPuAeP#k!$l$! zr~J~D_WAPS(L5xs}2lL~@WLQ)S<$mM2u z=DRFpaM$eiu(4rqhS%#5ZmFftY>KP9LVzhw1\n" +"Language-Team: LANGUAGE \n" + +#: woocommerce-quick-buy.php:106 +msgid "WC Quick Buy" +msgstr "" + +#: woocommerce-quick-buy.php:139 +msgid "WC Quick Buy Settings" +msgstr "" + +#: woocommerce-quick-buy.php:141 +msgid "The following options are used to configure WC Quick Buy" +msgstr "" + +#: woocommerce-quick-buy.php:144 +msgid "Redirect Location" +msgstr "" + +#: woocommerce-quick-buy.php:145 +msgid "After Add To Cart Where To Redirect The user" +msgstr "" + +#: woocommerce-quick-buy.php:149 +msgid "Cart Page" +msgstr "" + +#: woocommerce-quick-buy.php:149 +msgid "Checkout Page" +msgstr "" + +#: woocommerce-quick-buy.php:153 +msgid "Automatically Add Button " +msgstr "" + +#: woocommerce-quick-buy.php:154 +msgid "Automaticaly Adds Button After Add To Cart In Single Product View" +msgstr "" + +#: woocommerce-quick-buy.php:161 +msgid "Position" +msgstr "" + +#: woocommerce-quick-buy.php:162 +msgid "Where the button need to be added in single page .. before / after" +msgstr "" + +#: woocommerce-quick-buy.php:169 +msgid "Show Quick Buy Button For " +msgstr "" + +#: woocommerce-quick-buy.php:170 +msgid "" +"For Which Products To Show Quick Buy Button [eg to show for simple products " +"select only simple products]" +msgstr "" + +#: woocommerce-quick-buy.php:178 +msgid "Quick Buy Button Style" +msgstr "" + +#: woocommerce-quick-buy.php:179 +msgid "Directly Add Button CSS" +msgstr "" + +#: woocommerce-quick-buy.php:187 +msgid "Quick Buy Button Text" +msgstr "" + +#: woocommerce-quick-buy.php:188 +msgid "You Can Change The Quick Buy Button Lable" +msgstr "" + +#: woocommerce-quick-buy.php:193 +msgid "Quick Buy Button Class" +msgstr "" + +#: woocommerce-quick-buy.php:194 +msgid "You Can Change The Quick Buy Button Class" +msgstr "" + +#: woocommerce-quick-buy.php:201 +msgid "Debug / Troubleshoot" +msgstr "" + +#: woocommerce-quick-buy.php:203 +msgid "if JS is not running please use the below fields to fix it." +msgstr "" + +#: woocommerce-quick-buy.php:207 +msgid "Simple Product Form Class" +msgstr "" + +#: woocommerce-quick-buy.php:208 +msgid "Enter The Form Class for simple product add to cart form" +msgstr "" + +#: woocommerce-quick-buy.php:215 +msgid "Variable Product Form Class" +msgstr "" + +#: woocommerce-quick-buy.php:216 +msgid "Enter The Form Class for Variable product add to cart form" +msgstr "" + +#: woocommerce-quick-buy.php:223 +msgid "WC Quick Buy Short Code" +msgstr "" + +#: woocommerce-quick-buy.php:225 +msgid "" +"[wc_quick_buy] Use Inside of product loop \n" +" [wc_quick_buy " +"product=\"2\"] Outside loop With manual Product ID
To remove " +"the js embeded by shortcode use [wc_quick_buy product=\"2\" show_js=" +"\"false\"]

Note : Do not add this shortcode in a " +"form. as this shortcode itself generates a html form

." +msgstr "" + +#. Plugin Name of the plugin/theme +msgid "Woocommerce Quick Buy" +msgstr "" + +#. #-#-#-#-# plugin.pot (Woocommerce Quick Buy 0.12) #-#-#-#-# +#. Plugin URI of the plugin/theme +#. #-#-#-#-# plugin.pot (Woocommerce Quick Buy 0.12) #-#-#-#-# +#. Author URI of the plugin/theme +msgid "http://varunsridharan.in/" +msgstr "" + +#. Description of the plugin/theme +msgid "" +"Add Quick buy button to redirect user to checkout / cart immediately when he " +"click quick buy button" +msgstr "" + +#. Author of the plugin/theme +msgid "Varun Sridharan" +msgstr "" diff --git a/readme.txt b/readme.txt index 91e3645..2ca21d7 100644 --- a/readme.txt +++ b/readme.txt @@ -5,12 +5,12 @@ Plugin URL: https://wordpress.org/plugins/woocommerce-quick-buy/ Tags: Woocommerce,wc,Quick buy,add to cart,affiliate, cart, checkout, commerce, configurable, digital, download, downloadable, e-commerce, ecommerce, inventory, reports, sales, sell, shipping, shop, shopping, stock, store, tax, variable, widgets, woothemes, wordpress ecommerce Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YUBNEPWZMGTTQ Requires at least: 3.0 -Tested up to: 4.1.1 +Tested up to: 4.2.2 WC requires at least: 1.0 -WC tested up to: 2.3.7 -Stable tag: 0.11 +WC tested up to: 2.3.11 +Stable tag: 0.12.1 License: GPLv2 or later -License URI: http://www.gnu.org/licenses/gpl-2.0.html +License URI: http://www.gnu.org/licenses/gpl-2.0.html Add Quick buy button to redirect user to checkout / cart immediately when he click quick buy button @@ -18,6 +18,8 @@ Add Quick buy button to redirect user to checkout / cart immediately when he cli Add Quick buy button to redirect user to checkout / cart immediately when he click quick buy button. When User Clicks This Button. The Current product Will Be Added To Cart And The User Will Be Redirected To Cart Page +***Now we support language translation. if you are intreasted. please contact us*** Translate Now + [youtube https://www.youtube.com/watch?v=z_RgdNVZvj4] **Settings Available Under** @@ -82,16 +84,24 @@ The manual installation method involves downloading our plugin and uploading it 3. For Settings Look at your `Woocommerce => Settings => Product => WC Quick Buy` == Frequently Asked Questions == + +** How I Can Get Support For This Plugin** +http://varunsridharan.in/plugin-support/ +https://wordpress.org/support/plugin/woocommerce-quick-buy +https://github.com/technofreaky/WooCommerce-Quick-Buy +Email : varunsridharan23@gmail.com +Email : plugin@varunsridharan.in + **I have an idea for your plugin!** That's great. We are always open to your input, and we would like to add anything we think will be useful to a lot of people. Please send your comment/idea to varunsridharan23@gmail.com **I found a bug!** Oops. Please User github / WordPress to post bugs. Open an Issue -**How To Call This Plugin in a template ?** -This Plugin Can Be Called Using `[wc_quick_buy]` short code +**How To Call This Plugin in a template File ?** +This Plugin Can Be Called Using `` short code -**Settings Available Under** +**Where Are The Plugin Settings Available ?** `Woo Commerce Settings ==> Products ==> WC Quick Buy` **Short Code With Product ID** @@ -107,11 +117,19 @@ This Plugin Can Be Called Using `[wc_quick_buy]` short code `[wc_quick_buy product="1" echo="false"]` **Where can I request new features** - Please open an issue at GitHub and we will look into it == Changelog == += 0.12.1 - 29/06/2015 = +* Notice in single product page [https://wordpress.org/support/topic/undefined-index-show_js?replies=1] + += 0.12 - 29/06/2015 = +* Fixed Javascript Issue With Variable Product Quick Buy [Conflict With Some Theme / Other Plugin] +* Update To latest WooCommerce [WC 2.3.11] And Latest WordPress [WP 4.2.2] +* Minor Bug Fix. +* Added Support For i18n Text Domain: woocommerce-quick-buy + = 0.11 - 03/04/2015 = * Adds Product ID As a html attribute in Quick Buy Button : data-productid * Adds Dynimic Class Based On Product ID in Quick Buy Button : wc_quick_buy_product_{product_id} & quick_buy_{product_id} @@ -161,5 +179,4 @@ Please open an issue at product_types = array('simple' => 'Simple Products','variable'=>'Variable Products'); + register_activation_hook( __FILE__, array( 'wc_quick_buy', 'install' ) ); + add_filter( 'woocommerce_get_sections_products', array($this,'wc_quick_buy_add_section' )); add_filter( 'woocommerce_get_settings_products', array($this,'wc_quick_buy_all_settings'), 10, 2 ); - add_filter('add_to_cart_redirect',array($this,'wc_quick_buy_add_to_cart_redirect_check')); - add_action( 'woocommerce_update_options_settings_tab_demo', array($this,'update_settings' )); - add_shortcode( 'wc_quick_buy', array($this,'wc_quick_buy_shortcode_handler' )); + add_filter( 'add_to_cart_redirect',array($this,'wc_quick_buy_add_to_cart_redirect_check')); add_filter( 'plugin_row_meta', array( $this, 'plugin_row_links' ), 10, 2 ); + + add_action( 'woocommerce_update_options_settings_tab_demo', array($this,'update_settings' )); + add_shortcode( 'wc_quick_buy', array($this,'wc_quick_buy_shortcode_handler' )); + + add_action('plugins_loaded', array( $this, 'langs' )); + add_filter('load_textdomain_mofile', array( $this, 'replace_my_plugin_default_language_files' ), 10, 2); + $this->settings = array(); $this->get_db_data(); } + public function langs(){ + load_plugin_textdomain(lang_dom, false, dirname(plugin_basename(__FILE__)).'/lang/' ); + } + + public function replace_my_plugin_default_language_files($mofile, $domain) { + if (lang_dom === $domain) + return dirname(plugin_basename(__FILE__)).'/lang/'.get_locale().'.mo'; + + return $mofile; + } + /** * Retrives Stored Values From DB */ @@ -73,7 +93,7 @@ private function get_db_data(){ * @since 0.4 */ function wc_quick_buy_failed_settings() { - echo ''; + echo __( '

Woocommerce Quick Buy Settings Is Not Configured... click here to configure

',lang_dom) ; } /** @@ -83,7 +103,7 @@ function wc_quick_buy_failed_settings() { * @return Array List Of Sections In WC Settings Page */ public function wc_quick_buy_add_section( $sections ) { - $sections['wc_quick_buy'] = __( 'WC Quick Buy', 'text-domain' ); + $sections['wc_quick_buy'] = __( 'WC Quick Buy',lang_dom); return $sections; } @@ -97,12 +117,12 @@ public static function install(){ add_option('wc_quick_buy_lable','Quick Buy'); add_option('wc_quick_buy_class','quick_buy_button'); add_option('wc_quick_buy_redirect','checkout'); - add_option('wc_quick_buy_product_types',''); - add_option('wc_quick_buy_simple_product_form_class','form.cart'); - add_option('wc_quick_buy_variable_product_form_class','form.variations_form'); - add_option('wc_quick_buy_btn_css','.wc_quick_buy_btn {} - .wc_quick_buy_btn:hover {} - '); + add_option('wc_quick_buy_product_types',array('simple','variable')); + add_option('wc_quick_buy_simple_product_form_class',' form.cart[data-product_id={product_id}]'); + add_option('wc_quick_buy_variable_product_form_class',' form.variations_form[data-product_id={product_id}]'); + add_option('wc_quick_buy_btn_css','.wc_quick_buy_btn {} +.wc_quick_buy_btn:hover {}'); + return true; } @@ -114,104 +134,98 @@ public static function install(){ * @return String Refer WC.ORG */ public function wc_quick_buy_all_settings( $settings, $current_section ) { - if ( $current_section == 'wc_quick_buy' ) { - + if ( $current_section == 'wc_quick_buy' ) { $wc_quick_buy = array(); - $wc_quick_buy[] = array( 'name' => __( 'WC Quick Buy Settings', 'text-domain' ), + $wc_quick_buy[] = array( 'name' => __( 'WC Quick Buy Settings', lang_dom ), 'type' => 'title', - 'desc' => __( 'The following options are used to configure WC Quick Buy', 'text-domain' ), + 'desc' => __( 'The following options are used to configure WC Quick Buy',lang_dom ), 'id' => 'wc_quick_buy' ); $wc_quick_buy[] = array( - 'name' => __( 'Redirect Location', 'text-domain' ), - 'desc_tip' => __( 'After Add To Cart Where To Redirect The user', 'text-domain' ), + 'name' => __( 'Redirect Location', lang_dom ), + 'desc_tip' => __( 'After Add To Cart Where To Redirect The user',lang_dom ), 'id' => 'wc_quick_buy_redirect', 'type' => 'select', 'class' =>'chosen_select', - 'options' => array('cart' => 'Cart Page','checkout'=>'Checkout Page') + 'options' => array('cart' => __( 'Cart Page', lang_dom ) ,'checkout'=> __( 'Checkout Page', lang_dom ) ) ); $wc_quick_buy[] = array( - 'name' => __( 'Automatically Add Button ', 'text-domain' ), - 'desc_tip' => __( 'Automaticaly Adds Button After Add To Cart In Single Product View', 'text-domain' ), + 'name' => __( 'Automatically Add Button ', lang_dom ), + 'desc_tip' => __( 'Automaticaly Adds Button After Add To Cart In Single Product View', lang_dom ), 'id' => 'wc_quick_buy_auto', 'type' => 'select', 'class' =>'chosen_select', 'options' => array('true' => 'Yes','false'=>'No') ); $wc_quick_buy[] = array( - 'name' => __( 'Position', 'text-domain' ), - 'desc_tip' => __( 'Where the button need to be added in single page .. before / after', 'text-domain' ), + 'name' => __( 'Position', lang_dom ), + 'desc_tip' => __( 'Where the button need to be added in single page .. before / after',lang_dom ), 'id' => 'wc_quick_buy_position', 'type' => 'select', 'class' =>'chosen_select', 'options' => array('after' => 'After Add To Cart','before'=>'Before Add To Cart') ); $wc_quick_buy[] = array( - 'name' => __( 'Show Quick Buy Button For ', 'text-domain' ), - 'desc_tip' => __( 'For Which Products To Show Quick Buy Button [eg to show for simple products select only simple products]', 'text-domain' ), + 'name' => __( 'Show Quick Buy Button For ', lang_dom ), + 'desc_tip' => __( 'For Which Products To Show Quick Buy Button [eg to show for simple products select only simple products]',lang_dom ), 'id' => 'wc_quick_buy_product_types', 'type' => 'multiselect', 'class' =>'chosen_select', - 'options' => array('simple' => 'Simple Products','variable'=>'Variable Products') + 'options' => $this->product_types ); $wc_quick_buy[] = array( - 'name' => __( 'Quick Buy Button Style', 'text-domain' ), - 'desc_tip' => __( 'Directly Add Button CSS', 'text-domain' ), + 'name' => __( 'Quick Buy Button Style', lang_dom), + 'desc_tip' => __( 'Directly Add Button CSS', lang_dom), 'id' => 'wc_quick_buy_btn_css', 'type' => 'textarea', 'class'=>'large-text', - 'css'=>'height:200px;' + 'css'=>'height:100px;' ); $wc_quick_buy[] = array( - 'name' => __( 'Quick Buy Button Text', 'text-domain' ), - 'desc_tip' => __( 'You Can Change The Quick Buy Button Lable', 'text-domain' ), + 'name' => __( 'Quick Buy Button Text',lang_dom ), + 'desc_tip' => __( 'You Can Change The Quick Buy Button Lable',lang_dom ), 'id' => 'wc_quick_buy_lable', 'type' => 'text', ); $wc_quick_buy[] = array( - 'name' => __( 'Quick Buy Button Class', 'text-domain' ), - 'desc_tip' => __( 'You Can Change The Quick Buy Button Class', 'text-domain' ), + 'name' => __( 'Quick Buy Button Class',lang_dom ), + 'desc_tip' => __( 'You Can Change The Quick Buy Button Class', lang_dom ), 'id' => 'wc_quick_buy_class', 'type' => 'text', ); - - $wc_quick_buy[] = array( 'type' => 'sectionend', 'id' => 'wc_quick_buy' ); - - $wc_quick_buy[] = array( 'name' => __( 'WC Quick Buy Short Code', 'text-domain' ), - 'type' => 'title', - 'desc' => __( 'You can also use [wc_quick_buy] short code to call where ever you want in your template
- You can also set product id manually by [wc_quick_buy product="2"]
- To remove the js embeded by shortcode use [wc_quick_buy product="2" show_js="false"]
-

Note Do not add this shortcode in a form. as this shortcode itself generates a html form

. - - - ', 'text-domain' ), - 'id' => 'wc_quick_buy_shortcode' ); - - $wc_quick_buy[] = array( 'name' => '','type' => 'title','desc' => '
', 'id' => 'wc_quick_buy_troubleshoot' ); - $wc_quick_buy[] = array( 'type' => 'sectionstart', 'id' => 'wc_quick_buy' ); - $wc_quick_buy[] = array( 'name' => 'Debug / Troubleshoot', + + $wc_quick_buy[] = array( 'type' => 'sectionend', 'id' => 'wc_quick_buy' ); + + $wc_quick_buy[] = array( 'name' => __( 'Debug / Troubleshoot', lang_dom ), 'type' => 'title', - 'desc' => 'if JS is not running please use the below fields to fix it.', + 'desc' => __( 'if JS is not running please use the below fields to fix it.', lang_dom ), 'id' => 'wc_quick_buy_troubleshoot' ); $wc_quick_buy[] = array( - 'name' => __( 'Simple Product Form Class', 'text-domain' ), - 'desc_tip' => __( 'Enter The Form Class for simple product add to cart form', 'text-domain' ), + 'name' => __( 'Simple Product Form Class',lang_dom ), + 'desc_tip' => __( 'Enter The Form Class for simple product add to cart form',lang_dom ), 'id' => 'wc_quick_buy_simple_product_form_class', 'type' => 'text', ); $wc_quick_buy[] = array( - 'name' => __( 'Variable Product Form Class', 'text-domain' ), - 'desc_tip' => __( 'Enter The Form Class for Variable product add to cart form', 'text-domain' ), + 'name' => __( 'Variable Product Form Class', lang_dom ), + 'desc_tip' => __( 'Enter The Form Class for Variable product add to cart form', lang_dom ), 'id' => 'wc_quick_buy_variable_product_form_class', 'type' => 'text', - ); + ); + $wc_quick_buy[] = array( 'type' => 'sectionend', 'id' => 'wc_quick_buy' ); + + $wc_quick_buy[] = array( 'name' => __( 'WC Quick Buy Short Code', lang_dom ), + 'type' => 'title', + 'desc' => __( '[wc_quick_buy] Use Inside of product loop + [wc_quick_buy product="2"] Outside loop With manual Product ID
To remove the js embeded by shortcode use [wc_quick_buy product="2" show_js="false"]

Note : Do not add this shortcode in a form. as this shortcode itself generates a html form

.', lang_dom ), + 'id' => 'wc_quick_buy_shortcode' ); + return $wc_quick_buy; } else { @@ -247,7 +261,7 @@ public function wc_quick_buy_add_to_cart_redirect_check(){ * @return string [[Description]] */ public function wc_quick_buy_after_add_to_cart_form_add(){ - global $product; + global $product; if($product->is_type( 'simple' ) && in_array('simple',$this->settings['where_to_show'])){ echo $this->wc_quick_buy_add_form_simple_product($product->id); } @@ -314,14 +328,20 @@ public function wc_quick_buy_add_form_simple_product($productid,$add_js=true){ - '; - if($add_js === true){$form .= '
';} + '; $form .= ''; + add_action('wp_footer',array($this,'wc_quick_buy_button_style')); - if($add_js === true){$form .= '