diff --git a/README.md b/README.md index fd41e24..0ff71b6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -WooCommerce Payment Methods 1.0.1 +WooCommerce Payment Methods 1.1.2 ================================= Easily display your accepted payment methods @@ -9,7 +9,7 @@ Easily display your accepted payment methods ##Description -WooCommerce Payment Methods allows you to display your accepted payment methods. By default the plugin shows all available payment methods, but you can also specify them manually. +WooCommerce Payment Methods allows you to display your accepted payment methods. By default the plugin shows all available payment methods, but you can also specify or override them manually. You can display them via shortcode, widget or template tag in three available styles (default, inverse and outline). We've added several classes, so you can easily style the output to your pleasure. diff --git a/assets/css/payment-methods.css b/assets/css/payment-methods.css index c1d1793..1193368 100644 --- a/assets/css/payment-methods.css +++ b/assets/css/payment-methods.css @@ -5,11 +5,11 @@ * @subpackage Payment Methods * * @since 2014-09-08 - * @version 2014-12-17 + * @version 2015-04-24 * - * @author Poellmann Alexander Manfred - * @copyright Copyright 2014 vendocrat. All Rights Reserved. - * @link http://vendocr.at/ + * @author Poellmann Alexander Manfred (@AMPoellmann) + * @copyright Copyright 2015 vendocrat. All Rights Reserved. + * @link https://vendocr.at/ */ /**** Base Styles */ @@ -29,10 +29,12 @@ cursor:default; padding:4px; - border-radius:4px; + font-size:1.5em; + line-height:1; background:transparent; - border:1px solid transparent;} + border:1px solid transparent; + border-radius:4px;} .payment-methods-inverse > li > i, .payment-methods-i > li > i { @@ -44,10 +46,6 @@ .payment-methods-o > li > i { border-color:#777;} - .payment-methods > li > i { - font-size:1.5em; - line-height:1;} - /**** Widget */ .widget_vendocrat_payment_methods {} diff --git a/assets/css/paymentfont.css b/assets/css/paymentfont.css index 7c47689..ac432ec 100644 --- a/assets/css/paymentfont.css +++ b/assets/css/paymentfont.css @@ -1,12 +1,12 @@ /** - * PaymentFont Styles 1.0.0 + * PaymentFont Styles 1.1.0 * * @since 2014-09-21 - * @version 2014-12-17 + * @version 2015-04-24 * - * @author Poellmann Alexander Manfred - * @copyright Copyright 2014 vendocrat. All Rights Reserved. - * @link http://vendocr.at/ + * @author Poellmann Alexander Manfred (@AMPoellmann) + * @copyright Copyright 2015 vendocrat. All Rights Reserved. + * @link https://vendocr.at/ * * @license Font: SIL OFL 1.1, CSS: MIT License */ @@ -15,6 +15,7 @@ font-family:'PaymentFont'; src:url('../fonts/paymentfont-webfont.eot'); src:url('../fonts/paymentfont-webfont.eot?#iefix') format('embedded-opentype'), + url('../fonts/paymentfont-webfont.woff') format('woff2'), url('../fonts/paymentfont-webfont.woff') format('woff'), url('../fonts/paymentfont-webfont.ttf') format('truetype'), url('../fonts/paymentfont-webfont.svg#paymentfont-webfont') format('svg'); @@ -312,7 +313,10 @@ .pf-six:before { content: "\f05d"; } +.pf-cashcloud:before { + content: "\f05e"; +} /* - * E fatto! + * Finito! */ \ No newline at end of file diff --git a/assets/css/paymentfont.min.css b/assets/css/paymentfont.min.css index 3dcde07..166ced8 100644 --- a/assets/css/paymentfont.min.css +++ b/assets/css/paymentfont.min.css @@ -1,9 +1,9 @@ /** - * PaymentFont Styles 1.0.0 by @vendocrat/@AMPoellmann - * http://vendocr.at or @vendocrat + * PaymentFont Styles 1.1.0 by @vendocrat/@AMPoellmann + * https://vendocr.at or @vendocrat * License Font: SIL OFL 1.1, CSS: MIT License */ -@font-face{font-family:PaymentFont;src:url(../fonts/paymentfont-webfont.eot);src:url(../fonts/paymentfont-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/paymentfont-webfont.woff) format('woff'),url(../fonts/paymentfont-webfont.ttf) format('truetype'),url(../fonts/paymentfont-webfont.svg#paymentfont-webfont) format('svg');font-weight:400;font-style:normal}.pf{display:inline-block;font:normal normal normal 14px/1 PaymentFont;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.pf-amazon:before{content:"\f000"}.pf-american-express:before{content:"\f001"}.pf-american-express-alt:before{content:"\f002"}.pf-atm:before{content:"\f003"}.pf-bankomat:before{content:"\f004"}.pf-bank-transfer:before{content:"\f005"}.pf-bitcoin:before{content:"\f006"}.pf-bitcoin-sign:before{content:"\f007"}.pf-braintree:before{content:"\f008"}.pf-btc:before{content:"\f009"}.pf-card:before{content:"\f00a"}.pf-carta-si:before{content:"\f00b"}.pf-cash:before{content:"\f00c"}.pf-cash-on-delivery:before{content:"\f00d"}.pf-cb:before{content:"\f00e"}.pf-cirrus:before{content:"\f00f"}.pf-cirrus-alt:before{content:"\f010"}.pf-clickandbuy:before{content:"\f011"}.pf-credit-card:before{content:"\f012"}.pf-diners:before{content:"\f013"}.pf-discover:before{content:"\f014"}.pf-ec:before{content:"\f015"}.pf-eps:before{content:"\f016"}.pf-eur:before{content:"\f017"}.pf-facture:before{content:"\f018"}.pf-fattura:before{content:"\f019"}.pf-flattr:before{content:"\f01a"}.pf-giropay:before{content:"\f01b"}.pf-gittip:before,.pf-gratipay:before{content:"\f01c"}.pf-google-wallet:before{content:"\f01d"}.pf-google-wallet-alt:before{content:"\f01e"}.pf-gpb:before{content:"\f01f"}.pf-ideal:before{content:"\f020"}.pf-ils:before{content:"\f021"}.pf-inr:before{content:"\f022"}.pf-invoice:before{content:"\f023"}.pf-invoice-sign:before{content:"\f024"}.pf-invoice-sign-alt:before{content:"\f025"}.pf-invoice-sign-alt-o:before{content:"\f026"}.pf-invoice-sign-o:before{content:"\f027"}.pf-jcb:before{content:"\f028"}.pf-jpy:before{content:"\f029"}.pf-krw:before{content:"\f02a"}.pf-maestro:before{content:"\f02b"}.pf-maestro-alt:before{content:"\f02c"}.pf-mastercard:before{content:"\f02d"}.pf-mastercard-alt:before{content:"\f02e"}.pf-mastercard-securecode:before{content:"\f02f"}.pf-ogone:before{content:"\f030"}.pf-paybox:before{content:"\f031"}.pf-paylife:before{content:"\f032"}.pf-paypal:before{content:"\f033"}.pf-paypal-alt:before{content:"\f034"}.pf-paysafecard:before{content:"\f035"}.pf-postepay:before{content:"\f036"}.pf-quick:before{content:"\f037"}.pf-rechnung:before{content:"\f038"}.pf-ripple:before{content:"\f039"}.pf-rub:before{content:"\f03a"}.pf-skrill:before{content:"\f03b"}.pf-sofort:before{content:"\f03c"}.pf-square:before{content:"\f03d"}.pf-stripe:before{content:"\f03e"}.pf-truste:before{content:"\f03f"}.pf-try:before{content:"\f040"}.pf-unionpay:before{content:"\f041"}.pf-usd:before{content:"\f042"}.pf-verified-by-visa:before{content:"\f043"}.pf-verisign:before{content:"\f044"}.pf-visa:before{content:"\f045"}.pf-visa-electron:before{content:"\f046"}.pf-western-union:before{content:"\f047"}.pf-western-union-alt:before{content:"\f048"}.pf-wirecard:before{content:"\f049"}.pf-sepa:before{content:"\f04a"}.pf-sepa-alt:before{content:"\f04b"}.pf-apple-pay:before{content:"\f04c"}.pf-interac:before{content:"\f04d"}.pf-paymill:before{content:"\f04e"}.pf-dankort:before{content:"\f04f"}.pf-bancontact-mister-cash:before{content:"\f050"}.pf-moip:before{content:"\f051"}.pf-pagseguro:before{content:"\f052"}.pf-cash-on-pickup:before{content:"\f053"}.pf-sage:before{content:"\f054"}.pf-elo:before{content:"\f055"}.pf-elo-alt:before{content:"\f056"}.pf-payu:before{content:"\f057"}.pf-mercado-pago:before{content:"\f058"}.pf-mercado-pago-sign:before{content:"\f059"}.pf-payshop:before{content:"\f05a"}.pf-multibanco:before{content:"\f05b"}.pf-gratipay-sign:before{content:"\f05c"}.pf-six:before{content:"\f05d"} +@font-face{font-family:PaymentFont;src:url(../fonts/paymentfont-webfont.eot);src:url(../fonts/paymentfont-webfont.eot?#iefix) format('embedded-opentype'),url('../fonts/paymentfont-webfont.woff') format('woff2'),url(../fonts/paymentfont-webfont.woff) format('woff'),url(../fonts/paymentfont-webfont.ttf) format('truetype'),url(../fonts/paymentfont-webfont.svg#paymentfont-webfont) format('svg');font-weight:400;font-style:normal}.pf{display:inline-block;font:normal normal normal 14px/1 PaymentFont;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.pf-amazon:before{content:"\f000"}.pf-american-express:before{content:"\f001"}.pf-american-express-alt:before{content:"\f002"}.pf-atm:before{content:"\f003"}.pf-bankomat:before{content:"\f004"}.pf-bank-transfer:before{content:"\f005"}.pf-bitcoin:before{content:"\f006"}.pf-bitcoin-sign:before{content:"\f007"}.pf-braintree:before{content:"\f008"}.pf-btc:before{content:"\f009"}.pf-card:before{content:"\f00a"}.pf-carta-si:before{content:"\f00b"}.pf-cash:before{content:"\f00c"}.pf-cash-on-delivery:before{content:"\f00d"}.pf-cb:before{content:"\f00e"}.pf-cirrus:before{content:"\f00f"}.pf-cirrus-alt:before{content:"\f010"}.pf-clickandbuy:before{content:"\f011"}.pf-credit-card:before{content:"\f012"}.pf-diners:before{content:"\f013"}.pf-discover:before{content:"\f014"}.pf-ec:before{content:"\f015"}.pf-eps:before{content:"\f016"}.pf-eur:before{content:"\f017"}.pf-facture:before{content:"\f018"}.pf-fattura:before{content:"\f019"}.pf-flattr:before{content:"\f01a"}.pf-giropay:before{content:"\f01b"}.pf-gittip:before,.pf-gratipay:before{content:"\f01c"}.pf-google-wallet:before{content:"\f01d"}.pf-google-wallet-alt:before{content:"\f01e"}.pf-gpb:before{content:"\f01f"}.pf-ideal:before{content:"\f020"}.pf-ils:before{content:"\f021"}.pf-inr:before{content:"\f022"}.pf-invoice:before{content:"\f023"}.pf-invoice-sign:before{content:"\f024"}.pf-invoice-sign-alt:before{content:"\f025"}.pf-invoice-sign-alt-o:before{content:"\f026"}.pf-invoice-sign-o:before{content:"\f027"}.pf-jcb:before{content:"\f028"}.pf-jpy:before{content:"\f029"}.pf-krw:before{content:"\f02a"}.pf-maestro:before{content:"\f02b"}.pf-maestro-alt:before{content:"\f02c"}.pf-mastercard:before{content:"\f02d"}.pf-mastercard-alt:before{content:"\f02e"}.pf-mastercard-securecode:before{content:"\f02f"}.pf-ogone:before{content:"\f030"}.pf-paybox:before{content:"\f031"}.pf-paylife:before{content:"\f032"}.pf-paypal:before{content:"\f033"}.pf-paypal-alt:before{content:"\f034"}.pf-paysafecard:before{content:"\f035"}.pf-postepay:before{content:"\f036"}.pf-quick:before{content:"\f037"}.pf-rechnung:before{content:"\f038"}.pf-ripple:before{content:"\f039"}.pf-rub:before{content:"\f03a"}.pf-skrill:before{content:"\f03b"}.pf-sofort:before{content:"\f03c"}.pf-square:before{content:"\f03d"}.pf-stripe:before{content:"\f03e"}.pf-truste:before{content:"\f03f"}.pf-try:before{content:"\f040"}.pf-unionpay:before{content:"\f041"}.pf-usd:before{content:"\f042"}.pf-verified-by-visa:before{content:"\f043"}.pf-verisign:before{content:"\f044"}.pf-visa:before{content:"\f045"}.pf-visa-electron:before{content:"\f046"}.pf-western-union:before{content:"\f047"}.pf-western-union-alt:before{content:"\f048"}.pf-wirecard:before{content:"\f049"}.pf-sepa:before{content:"\f04a"}.pf-sepa-alt:before{content:"\f04b"}.pf-apple-pay:before{content:"\f04c"}.pf-interac:before{content:"\f04d"}.pf-paymill:before{content:"\f04e"}.pf-dankort:before{content:"\f04f"}.pf-bancontact-mister-cash:before{content:"\f050"}.pf-moip:before{content:"\f051"}.pf-pagseguro:before{content:"\f052"}.pf-cash-on-pickup:before{content:"\f053"}.pf-sage:before{content:"\f054"}.pf-elo:before{content:"\f055"}.pf-elo-alt:before{content:"\f056"}.pf-payu:before{content:"\f057"}.pf-mercado-pago:before{content:"\f058"}.pf-mercado-pago-sign:before{content:"\f059"}.pf-payshop:before{content:"\f05a"}.pf-multibanco:before{content:"\f05b"}.pf-gratipay-sign:before{content:"\f05c"}.pf-six:before{content:"\f05d"}.pf-cashcloud:before{content:"\f05e"} /* - * E fatto! + * Finito! */ \ No newline at end of file diff --git a/assets/fonts/paymentfont-webfont.eot b/assets/fonts/paymentfont-webfont.eot index a989ef5..205b0f1 100644 Binary files a/assets/fonts/paymentfont-webfont.eot and b/assets/fonts/paymentfont-webfont.eot differ diff --git a/assets/fonts/paymentfont-webfont.svg b/assets/fonts/paymentfont-webfont.svg index 7f309fd..30c2822 100644 --- a/assets/fonts/paymentfont-webfont.svg +++ b/assets/fonts/paymentfont-webfont.svg @@ -10,12 +10,12 @@ - + - + - + @@ -55,7 +55,7 @@ - + @@ -64,7 +64,7 @@ - + @@ -78,8 +78,8 @@ - - + + @@ -101,4 +101,5 @@ + \ No newline at end of file diff --git a/assets/fonts/paymentfont-webfont.ttf b/assets/fonts/paymentfont-webfont.ttf index 3480990..4916fc1 100644 Binary files a/assets/fonts/paymentfont-webfont.ttf and b/assets/fonts/paymentfont-webfont.ttf differ diff --git a/assets/fonts/paymentfont-webfont.woff b/assets/fonts/paymentfont-webfont.woff index 85bdf20..2f99893 100644 Binary files a/assets/fonts/paymentfont-webfont.woff and b/assets/fonts/paymentfont-webfont.woff differ diff --git a/assets/fonts/paymentfont-webfont.woff2 b/assets/fonts/paymentfont-webfont.woff2 new file mode 100644 index 0000000..8c38d08 Binary files /dev/null and b/assets/fonts/paymentfont-webfont.woff2 differ diff --git a/classes/class-wc-payment-methods.php b/classes/class-wc-payment-methods.php index 026442b..292021b 100644 --- a/classes/class-wc-payment-methods.php +++ b/classes/class-wc-payment-methods.php @@ -2,15 +2,15 @@ /** * Payment Methods * - * @package vendocrat - * @subpackage Payment Methods + * @package vendocrat + * @subpackage Payment Methods * - * @since 2014-09-08 - * @version 2014-12-17 + * @since 2014-09-08 + * @version 2015-04-24 * - * @author Poellmann Alexander Manfred - * @copyright Copyright 2014 vendocrat. All Rights Reserved. - * @link http://vendocr.at/ + * @author Poellmann Alexander Manfred (@AMPoellmann) + * @copyright Copyright 2015 vendocrat. All Rights Reserved. + * @link https://vendocr.at/ */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly @@ -227,14 +227,14 @@ class vendocrat_WC_Payment_Methods { * Woo Accepted Payment Methods * * @since 2014-09-07 - * @version 2014-09-21 + * @version 2015-04-24 **************************************************/ function get_payment_methods( $atts = array(), $content = null ) { extract( shortcode_atts( array( 'methods' => false, // comma separated list of payment methods icon slugs to be displayed, see http://paymentfont.io for available icons (new since 0.2.0) - 'style' => 'default', // default, inverse, o/outline + 'style' => 'default', // default, i/inverse, o/outline 'tooltip' => false, // adds data attributes to icon to be used for diplaying tooltips (made for Bootstrap) 'placement' => 'bottom', // set tooltip placement (new since 0.1.2) 'xclass' => false, // add any extra classes, seperated by a space @@ -263,60 +263,72 @@ class vendocrat_WC_Payment_Methods { $methods = array_flip( $methods ); } - if ( count($methods) > 0 ) { - // remove duplicate methods - $methods = array_unique($methods); + // Filter for methods (new as of v1.1.0) + $methods = apply_filters( 'vendocrat_filter_wc_payment_methods', $methods ); - // sort array - ksort($methods); + if ( ! is_array($methods) OR count($methods) <= 0 ) + return __( 'No Payment Methods available or specified.', 'woocommerce-payment-methods' ); - // let the magic happen - $icons = ''; - foreach ( $methods as $slug ) { - $icon = ''; + // remove duplicate methods + $methods = array_unique($methods); - // continue if we have no corresponding icon - if ( ! array_key_exists ( $slug, $this->available_methods ) ) - continue; + // sort array + ksort($methods); - // retrieve title - $title = $this->available_methods[$slug]; + // let the magic happen + $icons = ''; + foreach ( $methods as $slug ) { + $icon = ''; - // build icon class - $iclass = 'pf pf-'. $slug .' '. $slug; + // continue if we have no corresponding icon + if ( ! array_key_exists ( $slug, $this->available_methods ) ) + continue; - // icon markup - $icon = 'available_methods[$slug]; - // wrap in list item tags and append to $icons - $icons.= '
  • '. $icon .'
  • '; - } + // build icon class + $iclass = 'pf pf-'. $slug .' '. $slug; - // return $output if we have icons - if ( $icons ) { - $output = ''; + // icon markup + $icon = ''. $icon .''; + } + + $icons = apply_filters( 'vendocrat_filter_wc_payment_methods_icons', $icons ); + + // return $output if we have icons + if ( $icons ) { + $output = ''; + + return $output; } } /** * Get available gateways * + * @todo refactor automatic display of payment methods, eg. for PayPal & Stripe + * * @since 2014-09-07 - * @version 2014-09-08 + * @version 2015-04-24 **************************************************/ function get_available_gateways() { $gateways = array(); $methods = ''; + // check dependencies + if ( ! in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) + return $gateways; + if ( $available_gateways = WC()->payment_gateways->get_available_payment_gateways() ) { foreach ( $available_gateways as $gateway ) { @@ -336,46 +348,46 @@ class vendocrat_WC_Payment_Methods { case 'paymill' : $methods.= ' paymill'; - $methods.= ' credit-card'; + /* $methods.= ' credit-card'; $methods.= ' visa'; $methods.= ' mastercard'; $methods.= ' american-express'; $methods.= ' discover'; $methods.= ' diners'; - $methods.= ' jcb'; + $methods.= ' jcb';*/ break; case 'paypal' : - $methods.= ' credit-card'; + // $methods.= ' credit-card'; $methods.= ' paypal'; - $methods.= ' visa'; + /* $methods.= ' visa'; $methods.= ' mastercard'; $methods.= ' american-express'; $methods.= ' discover'; $methods.= ' diners'; - $methods.= ' jcb'; + $methods.= ' jcb';*/ break; case 'stripe' : $methods.= ' stripe'; - $methods.= ' visa'; + /* $methods.= ' visa'; $methods.= ' mastercard'; $methods.= ' american-express'; $methods.= ' discover'; $methods.= ' diners'; - $methods.= ' jcb'; + $methods.= ' jcb';*/ break; case 'wirecard' : $options = get_option('woocommerce_wirecard_settings'); - if ( array_key_exists( 'paymenttype_available', $options ) AND is_array( $options['paymenttype_available'] ) ) { + if ( is_array($options) AND array_key_exists( 'paymenttype_available', $options ) AND is_array( $options['paymenttype_available'] ) ) { $wirecard_gateways = $options['paymenttype_available']; } else { $wirecard_gateways = array(); } - if ( array_key_exists( 'subs_paymenttype_options', $options ) AND is_array( $options['subs_paymenttype_options'] ) ) { + if ( is_array($options) AND array_key_exists( 'subs_paymenttype_options', $options ) AND is_array( $options['subs_paymenttype_options'] ) ) { $wirecard_gateways_subscription = $options['subs_paymenttype_options']; } else { $wirecard_gateways_subscription = array(); @@ -393,8 +405,8 @@ class vendocrat_WC_Payment_Methods { case 'ccard' : $methods.= ' credit-card'; - $methods.= ' visa'; - $methods.= ' mastercard'; + // $methods.= ' visa'; + // $methods.= ' mastercard'; break; case 'idl' : @@ -403,24 +415,24 @@ class vendocrat_WC_Payment_Methods { case 'paymill' : $methods.= ' paymill'; - $methods.= ' credit-card'; + /* $methods.= ' credit-card'; $methods.= ' visa'; $methods.= ' mastercard'; $methods.= ' american-express'; $methods.= ' discover'; $methods.= ' diners'; - $methods.= ' jcb'; + $methods.= ' jcb';*/ break; case 'paypal' : - $methods.= ' credit-card'; + // $methods.= ' credit-card'; $methods.= ' paypal'; - $methods.= ' visa'; + /* $methods.= ' visa'; $methods.= ' mastercard'; $methods.= ' american-express'; $methods.= ' discover'; $methods.= ' diners'; - $methods.= ' jcb'; + $methods.= ' jcb';*/ break; case 'pbx' : diff --git a/classes/class-widget-wc-payment-methods.php b/classes/class-widget-wc-payment-methods.php index d434b9e..260eac3 100644 --- a/classes/class-widget-wc-payment-methods.php +++ b/classes/class-widget-wc-payment-methods.php @@ -2,15 +2,15 @@ /** * Payment Methods widget * - * @package vendocrat - * @subpackage Payment Methods + * @package vendocrat + * @subpackage Payment Methods * - * @since 2014-09-08 - * @version 2014-10-21 + * @since 2014-09-08 + * @version 2015-04-24 * - * @author Poellmann Alexander Manfred - * @copyright Copyright 2014 vendocrat. All Rights Reserved. - * @link http://vendocr.at/ + * @author Poellmann Alexander Manfred (@AMPoellmann) + * @copyright Copyright 2015 vendocrat. All Rights Reserved. + * @link https://vendocr.at/ */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly @@ -135,6 +135,11 @@ class vendocrat_Widget_WC_Payment_Methods extends WP_Widget {

    +

    + + + '. __( 'Optional', 'woocommerce-payment-methods' ) . ': ' . sprintf( __( 'Specify payment methods to be shown manually by entering their slugs comma separated (eg. "paypal,visa,mastercard" for PayPal, Visa and MasterCard). See %s for available payment methods an their slugs! If left blank the widget will try to automatically fetch available payment methods from WooCommerce.', 'woocommerce-payment-methods' ), 'PaymentFont.io' ); ?> +

    \n" -"Language-Team: Anestis Samourkasidis\n" -"Language: el\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.6.11\n" -"X-Poedit-Basepath: .\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Poedit-KeywordsList: __;_e\n" -"X-Poedit-SearchPath-0: ..\n" - -#: ../classes/class-server-monitor.php:124 -#, php-format -msgid "%s: General" -msgstr "%s: Γενικά" - -#: ../classes/class-server-monitor.php:124 -#: ../classes/class-server-monitor.php:130 -msgid "Server Monitor" -msgstr "Παρακολούθηση Διακομιστή" - -#: ../classes/class-server-monitor.php:130 -#, php-format -msgid "%s: PHP & Database" -msgstr "%s: PHP & Βάση Δεδομένων" - -#: ../classes/class-server-monitor.php:136 -msgid "System Status" -msgstr "Κατάσταση συστήματος" - -#: ../classes/class-server-monitor.php:215 -#: ../classes/class-server-monitor.php:317 -#: ../classes/class-server-monitor.php:318 -#: ../classes/class-server-monitor.php:319 -#: ../classes/class-server-monitor.php:320 -#: ../classes/class-server-monitor.php:354 -#: ../classes/class-server-monitor.php:368 -msgid "N/A" -msgstr "Μη διαθέσιμο" - -#: ../classes/class-server-monitor.php:220 -msgid "Host Name" -msgstr "Ονομα Host" - -#: ../classes/class-server-monitor.php:221 -msgid "Server IP" -msgstr "IP Διακομιστή" - -#: ../classes/class-server-monitor.php:222 -msgid "Server Path" -msgstr "Διαδρομή Διακομιστή" - -#: ../classes/class-server-monitor.php:225 -msgid "Server Load" -msgstr "Φόρτος Διακομιστή" - -#: ../classes/class-server-monitor.php:229 -msgid "Server up since" -msgstr "Ανοιχτός εδώ και" - -#: ../classes/class-server-monitor.php:232 -msgid "Server Info" -msgstr "Πληροφορίες Διακομιστή" - -#: ../classes/class-server-monitor.php:253 -msgid "PHP Version" -msgstr "Εκδοση PHP" - -#: ../classes/class-server-monitor.php:256 -msgid "PHP Time Limit" -msgstr "χρονικό όριο PHP" - -#: ../classes/class-server-monitor.php:259 -msgid "MySQL Version" -msgstr "Εκδοση MySQL" - -#: ../classes/class-server-monitor.php:260 -msgid "Database Size" -msgstr "Μέγεθος Βάσης" - -#: ../classes/class-server-monitor.php:281 -msgid "WordPress Version" -msgstr "Έκδοση Wordpress" - -#: ../classes/class-server-monitor.php:282 -msgid "Multisite?" -msgstr "Πολλαπλά site;" - -#: ../classes/class-server-monitor.php:283 -msgid "Active Plugins" -msgstr "Ενεργά πρόσθετα" - -#: ../classes/class-server-monitor.php:286 -msgid "Debug Mode" -msgstr "Λειτουργία εντοπισμού σφαλμάτων" - -#: ../classes/class-server-monitor.php:287 -msgid "Language" -msgstr "Γλώσσα" - -#: ../classes/class-server-monitor.php:288 -msgid "Timezone" -msgstr "Ζώνη ώρας" - -#: ../classes/class-server-monitor.php:328 -#: ../classes/class-server-monitor.php:332 -msgid "Yes" -msgstr "Ναί" - -#: ../classes/class-server-monitor.php:328 -#: ../classes/class-server-monitor.php:332 -msgid "No" -msgstr "Όχι" diff --git a/languages/woocommerce-payment-methods-de_AT.mo b/languages/woocommerce-payment-methods-de_AT.mo index 58519d1..2c18b3e 100644 Binary files a/languages/woocommerce-payment-methods-de_AT.mo and b/languages/woocommerce-payment-methods-de_AT.mo differ diff --git a/languages/woocommerce-payment-methods-de_AT.po b/languages/woocommerce-payment-methods-de_AT.po index 18682a8..f2f6586 100644 --- a/languages/woocommerce-payment-methods-de_AT.po +++ b/languages/woocommerce-payment-methods-de_AT.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: WooCommerce Payment Methods\n" -"POT-Creation-Date: 2014-10-23 18:11+0100\n" -"PO-Revision-Date: 2014-10-23 18:11+0100\n" +"POT-Creation-Date: 2015-04-24 19:44+0100\n" +"PO-Revision-Date: 2015-04-24 19:46+0100\n" "Last-Translator: \n" "Language-Team: vendocrat \n" "Language: de\n" @@ -15,34 +15,35 @@ msgstr "" "X-Poedit-KeywordsList: __;_e\n" "X-Poedit-SearchPath-0: ..\n" -#: ../classes/class-wc-payment-methods.php:60 +#: ../classes/class-wc-payment-methods.php:59 msgid "Bank Transfer" msgstr "Bank-Überweisung" -#: ../classes/class-wc-payment-methods.php:65 +#: ../classes/class-wc-payment-methods.php:64 msgid "Cash" msgstr "Bargeld" -#: ../classes/class-wc-payment-methods.php:66 +#: ../classes/class-wc-payment-methods.php:65 msgid "Cash on Delivery" msgstr "Nachname" -#: ../classes/class-wc-payment-methods.php:69 -msgid "Pay with Cheque" -msgstr "Mit Scheck bezahlen" - -#: ../classes/class-wc-payment-methods.php:71 +#: ../classes/class-wc-payment-methods.php:70 msgid "Credit Card" msgstr "Kreditkarte" +#: ../classes/class-wc-payment-methods.php:75 #: ../classes/class-wc-payment-methods.php:76 -#: ../classes/class-wc-payment-methods.php:77 -#: ../classes/class-wc-payment-methods.php:83 +#: ../classes/class-wc-payment-methods.php:82 #: ../classes/class-wc-payment-methods.php:95 msgid "Invoice" msgstr "Rechnung" +#: ../classes/class-wc-payment-methods.php:270 +msgid "No Payment Methods available or specified." +msgstr "Keine Zahlungsarten verfügbar oder angegeben." + #: ../classes/class-widget-wc-payment-methods.php:33 +#: ../classes/class-widget-wc-payment-methods.php:139 msgid "Payment Methods" msgstr "Zahlungsmethoden" @@ -109,3 +110,29 @@ msgstr "Links" #: ../classes/class-widget-wc-payment-methods.php:135 msgid "Extra classes" msgstr "Zusätzliche Klassen" + +#: ../classes/class-widget-wc-payment-methods.php:141 +msgid "Optional" +msgstr "Optional" + +#: ../classes/class-widget-wc-payment-methods.php:141 +#, php-format +msgid "" +"Specify payment methods to be shown manually by entering their slugs comma " +"separated (eg. \"paypal,visa,mastercard\" for PayPal, Visa and MasterCard). " +"See %s for available payment methods an their slugs! If left blank the " +"widget will try to automatically fetch available payment methods from " +"WooCommerce." +msgstr "" +"Definiere die anzuzeigenden Zahlungsmethoden indem du deren Slugs koma-" +"separiert eingibst (z.B. \"paypal,visa,mastercard\" für PayPal, Visa und " +"MasterCard). Die verfügbaren Zahlungsarten und deren Slugs findest du unter " +"%s! Wenn du das Feld leer lässt, wird das Widget versuchen die verfügbaren " +"Zahlungsarten automatisch von WooCommerce zu übernehmen." + +#, fuzzy +#~ msgid "Methods" +#~ msgstr "Zahlungsmethoden" + +#~ msgid "Pay with Cheque" +#~ msgstr "Mit Scheck bezahlen" diff --git a/languages/woocommerce-payment-methods-de_DE.mo b/languages/woocommerce-payment-methods-de_DE.mo index 58519d1..dec7456 100644 Binary files a/languages/woocommerce-payment-methods-de_DE.mo and b/languages/woocommerce-payment-methods-de_DE.mo differ diff --git a/languages/woocommerce-payment-methods-de_DE.po b/languages/woocommerce-payment-methods-de_DE.po index 18682a8..d9d7e60 100644 --- a/languages/woocommerce-payment-methods-de_DE.po +++ b/languages/woocommerce-payment-methods-de_DE.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: WooCommerce Payment Methods\n" -"POT-Creation-Date: 2014-10-23 18:11+0100\n" -"PO-Revision-Date: 2014-10-23 18:11+0100\n" +"POT-Creation-Date: 2015-04-24 19:46+0100\n" +"PO-Revision-Date: 2015-04-24 19:46+0100\n" "Last-Translator: \n" "Language-Team: vendocrat \n" "Language: de\n" @@ -15,34 +15,35 @@ msgstr "" "X-Poedit-KeywordsList: __;_e\n" "X-Poedit-SearchPath-0: ..\n" -#: ../classes/class-wc-payment-methods.php:60 +#: ../classes/class-wc-payment-methods.php:59 msgid "Bank Transfer" msgstr "Bank-Überweisung" -#: ../classes/class-wc-payment-methods.php:65 +#: ../classes/class-wc-payment-methods.php:64 msgid "Cash" msgstr "Bargeld" -#: ../classes/class-wc-payment-methods.php:66 +#: ../classes/class-wc-payment-methods.php:65 msgid "Cash on Delivery" msgstr "Nachname" -#: ../classes/class-wc-payment-methods.php:69 -msgid "Pay with Cheque" -msgstr "Mit Scheck bezahlen" - -#: ../classes/class-wc-payment-methods.php:71 +#: ../classes/class-wc-payment-methods.php:70 msgid "Credit Card" msgstr "Kreditkarte" +#: ../classes/class-wc-payment-methods.php:75 #: ../classes/class-wc-payment-methods.php:76 -#: ../classes/class-wc-payment-methods.php:77 -#: ../classes/class-wc-payment-methods.php:83 +#: ../classes/class-wc-payment-methods.php:82 #: ../classes/class-wc-payment-methods.php:95 msgid "Invoice" msgstr "Rechnung" +#: ../classes/class-wc-payment-methods.php:270 +msgid "No Payment Methods available or specified." +msgstr "Keine Zahlungsarten verfügbar oder angegeben." + #: ../classes/class-widget-wc-payment-methods.php:33 +#: ../classes/class-widget-wc-payment-methods.php:139 msgid "Payment Methods" msgstr "Zahlungsmethoden" @@ -109,3 +110,25 @@ msgstr "Links" #: ../classes/class-widget-wc-payment-methods.php:135 msgid "Extra classes" msgstr "Zusätzliche Klassen" + +#: ../classes/class-widget-wc-payment-methods.php:141 +msgid "Optional" +msgstr "Optional" + +#: ../classes/class-widget-wc-payment-methods.php:141 +#, php-format +msgid "" +"Specify payment methods to be shown manually by entering their slugs comma " +"separated (eg. \"paypal,visa,mastercard\" for PayPal, Visa and MasterCard). " +"See %s for available payment methods an their slugs! If left blank the " +"widget will try to automatically fetch available payment methods from " +"WooCommerce." +msgstr "" +"Definiere die anzuzeigenden Zahlungsmethoden indem du deren Slugs koma-" +"separiert eingibst (z.B. \"paypal,visa,mastercard\" für PayPal, Visa und " +"MasterCard). Die verfügbaren Zahlungsarten und deren Slugs findest du unter " +"%s! Wenn du das Feld leer lässt, wird das Widget versuchen die verfügbaren " +"Zahlungsarten automatisch von WooCommerce zu übernehmen." + +#~ msgid "Pay with Cheque" +#~ msgstr "Mit Scheck bezahlen" diff --git a/languages/woocommerce-payment-methods.mo b/languages/woocommerce-payment-methods.mo index d518eb3..51a0552 100644 Binary files a/languages/woocommerce-payment-methods.mo and b/languages/woocommerce-payment-methods.mo differ diff --git a/languages/woocommerce-payment-methods.pot b/languages/woocommerce-payment-methods.pot index 17e9f41..aaad818 100644 --- a/languages/woocommerce-payment-methods.pot +++ b/languages/woocommerce-payment-methods.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: WooCommerce Payment Methods\n" -"POT-Creation-Date: 2014-10-23 18:11+0100\n" -"PO-Revision-Date: 2014-10-23 18:11+0100\n" +"POT-Creation-Date: 2015-04-24 19:50+0100\n" +"PO-Revision-Date: 2015-04-24 19:50+0100\n" "Last-Translator: \n" "Language-Team: vendocrat \n" "Language: en\n" @@ -15,34 +15,35 @@ msgstr "" "X-Poedit-KeywordsList: __;_e\n" "X-Poedit-SearchPath-0: ..\n" -#: ../classes/class-wc-payment-methods.php:60 +#: ../classes/class-wc-payment-methods.php:59 msgid "Bank Transfer" msgstr "" -#: ../classes/class-wc-payment-methods.php:65 +#: ../classes/class-wc-payment-methods.php:64 msgid "Cash" msgstr "" -#: ../classes/class-wc-payment-methods.php:66 +#: ../classes/class-wc-payment-methods.php:65 msgid "Cash on Delivery" msgstr "" -#: ../classes/class-wc-payment-methods.php:69 -msgid "Pay with Cheque" -msgstr "" - -#: ../classes/class-wc-payment-methods.php:71 +#: ../classes/class-wc-payment-methods.php:70 msgid "Credit Card" msgstr "" +#: ../classes/class-wc-payment-methods.php:75 #: ../classes/class-wc-payment-methods.php:76 -#: ../classes/class-wc-payment-methods.php:77 -#: ../classes/class-wc-payment-methods.php:83 +#: ../classes/class-wc-payment-methods.php:82 #: ../classes/class-wc-payment-methods.php:95 msgid "Invoice" msgstr "" +#: ../classes/class-wc-payment-methods.php:270 +msgid "No Payment Methods available or specified." +msgstr "" + #: ../classes/class-widget-wc-payment-methods.php:33 +#: ../classes/class-widget-wc-payment-methods.php:139 msgid "Payment Methods" msgstr "" @@ -108,4 +109,18 @@ msgstr "" #: ../classes/class-widget-wc-payment-methods.php:135 msgid "Extra classes" -msgstr "" \ No newline at end of file +msgstr "" + +#: ../classes/class-widget-wc-payment-methods.php:141 +msgid "Optional" +msgstr "" + +#: ../classes/class-widget-wc-payment-methods.php:141 +#, php-format +msgid "" +"Specify payment methods to be shown manually by entering their slugs comma " +"separated (eg. \"paypal,visa,mastercard\" for PayPal, Visa and MasterCard). " +"See %s for available payment methods an their slugs! If left blank the " +"widget will try to automatically fetch available payment methods from " +"WooCommerce." +msgstr "" diff --git a/readme.txt b/readme.txt index 3c8eb85..eb5747a 100644 --- a/readme.txt +++ b/readme.txt @@ -3,20 +3,20 @@ Contributors: vendocrat, AlexanderPoellmann Donate link: http://vendocr.at/donate/ Tags: woocommerce, credit card, logo, payment Requires at least: 3.5 -Tested up to: 4.1 -Stable tag: 1.0.1 +Tested up to: 4.2 +Stable tag: 1.1.2 License: GNU General Public License v3.0 License URI: http://www.gnu.org/licenses/gpl-3.0.html -Easily display your accepted payment methods from WooCommerce via shortcode, widget or template tag. +Easily display your accepted payment methods via shortcode, widget or template tag. Of course, it also works without WooCommerce ;) == Description == -WooCommerce Payment Methods allows you to display your accepted payment methods. By default the plugin shows all available payment methods, but you can also specify them manually. +WooCommerce Payment Methods allows you to display your accepted payment methods. By default the plugin shows all available payment methods, but you can also specify or override them manually. -You can display them via shortcode, widget or template tag in three available styles (default, inverse and outline). We've added several classes, so you can easily style the output to your pleasure. +You can display them via shortcode, widget or template tag in three available styles (default, inverse and outline). We`ve added several classes, so you can easily style the output to your pleasure. -You are using the famous Bootstrap framework? Awesome, cause we've added the markup for tooltips, so that users can see the payment methods name on hover. +You are using the famous Bootstrap framework? Awesome, cause we`ve added the markup for tooltips, so that users can see the payment methods name on hover. **PaymentFont webfont** @@ -38,15 +38,15 @@ Translations included: All our plugins are fully localized/translateable by default and include a .pot-file! Please contact us via [Twitter](https://twitter.com/vendocrat) or hit us on [GitHub](https://github.com/vendocrat), if you have a translation you want to contribute! -= We'd love to hear from you! = += We`d love to hear from you! = Follow us on [Twitter](https://twitter.com/vendocrat), like us on [Facebook](https://www.facebook.com/vendocrat), circle us on [Google+](https://plus.google.com/+vendocrat) or fork us on [GitHub](https://github.com/vendocrat)! == Installation == -1. Upload 'woocommerce-payment-methods' to the '/wp-content/plugins/' directory -2. Activate the plugin through the 'Plugins' menu in WordPress -3. Display your accepted methods via: Shortcode [wc_payment_methods], Widget or template tag '. +1. Upload `woocommerce-payment-methods` to the `/wp-content/plugins/` directory +2. Activate the plugin through the `Plugins` menu in WordPress +3. Display your accepted methods via: Shortcode [wc_payment_methods], Widget or template tag `. 4. Done! == Frequently Asked Questions == @@ -55,6 +55,28 @@ Follow us on [Twitter](https://twitter.com/vendocrat), like us on [Facebook](htt Miss some payment methods? Let me have a look at it by opening an issue on GitHub or hit us at @vendocrat. += How to display the payment methods? = + +You can use the function `wc_payment_methods( $atts )`, the shortcode `[wc_payment_methods]` or the widget. + += What function/shortcode attributes are available? = + +1. `methods` => Comma separated list of payment methods icon slugs to be displayed, see http://paymentfont.io for available icons, defaults to false +2. `style` => How shall the icons be displayed? Available options are default, inverse and outline. +3. `tooltip` => Adds data attributes to icon to be used for diplaying tooltips (made for Bootstrap), defaults to false +4. `placement` => Set tooltip placement, defaults to bottom +5. `xclass` => Add any extra classes, seperated by a space, defaults to false + += How can I manually specify or override the displayed methods? = + +In the function and the shortcode use the attribute `methods`. In the widget there is a field for that. If you don`t specify any methods manually, the plugin will try to fetch the available payment methods from WooCommerce. Oh, and there are also two filters available (see beneath). + += Are Filters/Hooks available? = + +Yep, there is first of all the filter `vendocrat_filter_wc_payment_methods` which expects an array. Use this to specify/override the methods to be shown globally. + +With the filter `vendocrat_filter_wc_payment_methods_icons` you can modify the html markup for all icons to be displayed. This will look somehow like `
  • ` for the icons PayPal, Visa and MasterCard. + == Screenshots == 1. Shortcode output (top-down: default, inverse, outline style) @@ -89,4 +111,13 @@ Improved payment gateway function. Partial rewrite to fit our internal plugin st Minor fixes, updated PaymentFont and included Portuguese translation (thanks Luis Martins). = 1.0.1 = -Minor fixes, added Greek translation (thanks to Anestis Samourkasidis). \ No newline at end of file +Minor fixes, added Greek translation (thanks to Anestis Samourkasidis). + += 1.1.0 = +Minor fixes, added multiselect to widget to manually pick payment methods, update to PaymentFont v1.1.1 for better performance. + += 1.1.1 = +Minor fixes, enhanced widget. + += 1.1.2 = +Updated language files for German. \ No newline at end of file diff --git a/woocommerce-payment-methods.php b/woocommerce-payment-methods.php index 0592830..4c32c69 100644 --- a/woocommerce-payment-methods.php +++ b/woocommerce-payment-methods.php @@ -1,26 +1,22 @@ Easily display your accepted payment methods from WooCommerce. Handcrafted with ♥ by vendocrat in Vienna. - * Version: 1.0.1 + * Plugin URI: https://vendocr.at/ + * Description: Easily display your accepted payment methods from WooCommerce. Handcrafted with ♥ by vendocrat in Vienna. + * Version: 1.1.2 * Author: vendocrat - * Author URI: http://vendocr.at/ + * Author URI: https://vendocr.at/ * License: vendocrat Split License - * License URI: http://vendocr.at/legal/licenses + * License URI: https://vendocr.at/legal/licenses */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly -// check dependencies -if ( ! in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) - return; - // require classes require_once( 'classes/class-wc-payment-methods.php' ); global $vendocrat_wc_payment_methods; $vendocrat_wc_payment_methods = new vendocrat_WC_Payment_Methods( __FILE__ ); -$vendocrat_wc_payment_methods->version = '1.0.1'; +$vendocrat_wc_payment_methods->version = '1.1.2'; /* * E fatto!