• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wc_get_log_file_path函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中wc_get_log_file_path函数的典型用法代码示例。如果您正苦于以下问题:PHP wc_get_log_file_path函数的具体用法?PHP wc_get_log_file_path怎么用?PHP wc_get_log_file_path使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了wc_get_log_file_path函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: open

 /**
  * Open log file for writing.
  *
  * @access private
  * @param mixed $handle
  * @return bool success
  */
 private function open($handle)
 {
     if (isset($this->_handles[$handle])) {
         return true;
     }
     if ($this->_handles[$handle] = @fopen(wc_get_log_file_path($handle), 'a')) {
         return true;
     }
     return false;
 }
开发者ID:Ezyva2015,项目名称:SMSF-Academy-Wordpress,代码行数:17,代码来源:class-wc-logger.php


示例2: open

 /**
  * Open log file for writing.
  *
  * @param string $handle
  * @param string $mode
  * @return bool success
  */
 protected function open($handle, $mode = 'a')
 {
     if (isset($this->_handles[$handle])) {
         return true;
     }
     if ($this->_handles[$handle] = @fopen(wc_get_log_file_path($handle), $mode)) {
         return true;
     }
     return false;
 }
开发者ID:jesusmarket,项目名称:jesusmarket,代码行数:17,代码来源:class-wc-logger.php


示例3: array

<?php

if (!defined('ABSPATH')) {
    exit;
    // Exit if accessed directly
}
/**
 * Settings for TrxServices Gateway
 */
return array('enabled' => array('title' => __('Enable/Disable', 'woocommerce-trxservices'), 'label' => __('Enable TrxServices', 'woocommerce-trxservices'), 'type' => 'checkbox', 'description' => '', 'default' => 'no'), 'title' => array('title' => __('Title', 'woocommerce-trxservices'), 'type' => 'text', 'description' => __('This controls the title which the user sees during checkout.', 'woocommerce-trxservices'), 'default' => __('TrxServices', 'woocommerce-trxservices'), 'desc_tip' => true), 'description' => array('title' => __('Description', 'woocommerce-trxservices'), 'type' => 'text', 'description' => __('This controls the description which the user sees during checkout.', 'woocommerce-trxservices'), 'default' => 'Pay with TrxServices', 'desc_tip' => true), 'instructions' => array('title' => __('Instructions', 'woocommerce-trxservices'), 'type' => 'textarea', 'description' => __('Instructions that will be added to the thank you page and emails.', 'woocommerce-trxservices'), 'default' => '', 'desc_tip' => true), 'debug' => array('title' => __('Debug Log', 'woocommerce-trxservices'), 'type' => 'checkbox', 'label' => __('Enable logging', 'woocommerce-trxservices'), 'default' => 'no', 'description' => sprintf(__('Log TrxServices events inside <code>%s</code>', 'woocommerce-trxservices'), wc_get_log_file_path($this->id))), 'sandbox' => array('title' => __('Sandbox', 'woocommerce-trxservices'), 'label' => __('Enable Sandbox Mode', 'woocommerce-trxservices'), 'type' => 'checkbox', 'description' => __('Place the payment gateway in sandbox mode (real payments will not be taken).', 'woocommerce-trxservices'), 'default' => 'yes'), 'mode' => array('title' => __('Mode', 'woocommerce'), 'type' => 'select', 'class' => 'wc-enhanced-select', 'description' => __('Credit Sale performs a credit authorization and captures it for settlement in one request. Credit Auth only requests a credit authorization.', 'woocommerce'), 'default' => 'creditsale', 'desc_tip' => true, 'options' => array('creditsale' => __('Credit Sale', 'woocommerce-trxservices'), 'creditauth' => __('Credit Auth', 'woocommerce-trxservices'))));
开发者ID:hitfactory,项目名称:woocommerce-trxservices,代码行数:10,代码来源:settings-trxservices.php


示例4: init_form_fields

 /** 
  * Initialise Gateway Settings Form Fields 
  */
 public function init_form_fields()
 {
     $form = array();
     $form['enabled'] = array('title' => __('Enable/Disable', $this->td), 'type' => 'checkbox', 'label' => __('Enable Maksuturva Payment Gateway', $this->td), 'default' => 'yes');
     $form['title'] = array('title' => __('Title', $this->td), 'type' => 'text', 'description' => __('This controls the title which the user sees during checkout.', $this->td), 'default' => __('Maksuturva', $this->td), 'desc_tip' => true);
     $form['description'] = array('title' => __('Customer Message', $this->td), 'type' => 'textarea', 'default' => __('Pay via Maksuturva.', $this->td), 'desc_tip' => true);
     $form['sandbox'] = array('type' => 'checkbox', 'title' => __('Sandbox mode', $this->td), 'default' => 'no', 'description' => __('Maksuturva sandbox can be used to test payments. None of the payments will be real.', $this->td), 'options' => array('yes' => '1', 'no' => '0'));
     /*$form['sandbox_testaccount'] = array(
           'type' => 'checkbox',
           'title' => __('Use test account', $this->td ),
           'default' => 'no',
           'description' => __('Maksuturva sandbox can be used with test accounts. Use only for debugging payment integration.', $this->td ),
           'options' => array( 'yes' => '1', 'no' => '0'),
       );*/
     $form['debug'] = array('type' => 'checkbox', 'title' => __('Debug Log', $this->td), 'default' => 'no', 'description' => sprintf(__('Enable logging to <code>%s</code>', $this->td), wc_get_log_file_path($this->id)), 'options' => array('yes' => '1', 'no' => '0'));
     $form['maksuturva_sellerid'] = array('type' => 'textfield', 'title' => __('Seller id', $this->td), 'desc_tip' => true, 'description' => __('The seller identification provided by Maksuturva upon your registration.', $this->td), 'default' => get_option('maksuturva_sellerid'));
     $form['maksuturva_secretkey'] = array('type' => 'textfield', 'title' => __('Secret Key', $this->td), 'desc_tip' => true, 'description' => __('Your unique secret key provided by Maksuturva.', $this->td), 'default' => get_option('maksuturva_secretkey'));
     $form['maksuturva_keyversion'] = array('type' => 'textfield', 'title' => __('Secret Key Version', $this->td), 'desc_tip' => true, 'description' => __('The version of the secret key provided by Maksuturva.', $this->td), 'default' => get_option('maksuturva_keyversion', '001'));
     /* I don't think these are needed at the UI, but enabled it for now / JH */
     $form['maksuturva_url'] = array('type' => 'textfield', 'title' => __('Gateway URL', $this->td), 'desc_tip' => true, 'description' => __('The URL used to communicate with Maksuturva. Do not change this configuration unless you know what you are doing.', $this->td), 'default' => get_option('maksuturva_url', 'https://www.maksuturva.fi'));
     $form['maksuturva_orderid_prefix'] = array('type' => 'textfield', 'title' => __('Maksuturva Payment Prefix', $this->td), 'desc_tip' => true, 'description' => __('Prefix for order identifiers. Can be used to generate unique payment ids after e.g. reinstall.', $this->td), 'default' => get_option('maksuturva_orderid_prefix', '0'));
     /*
     $form['maksuturva_encoding'] = array(
         'type' => 'select',
         'title' => __('Communication encoding', $this->td ),
         'desc_tip'    => true,
         'description' => __('Maksuturva accepts both ISO-8859-1 and UTF-8 encodings to receive the transactions.', $this->td ),
         'options' => array(
             'UTF-8' => 'UTF-8',
             'ISO-8859-1' => 'ISO-8859-1',
         ),
         'default' => get_option('maksuturva_encoding'),
     );
     */
     $form['maksuturva_emaksut'] = array('type' => 'checkbox', 'title' => __('eMaksut', $this->td), 'description' => __('Use eMaksut payment service instead of Maksuturva', $this->td), 'options' => array('no' => '0', 'yes' => '1'), 'desc_tip' => true, 'default' => get_option('maksuturva_emaksut'));
     $this->form_fields = $form;
 }
开发者ID:jyrkih,项目名称:woocommerce_payment_module,代码行数:40,代码来源:WC_Gateway_Maksuturva_Class.php


示例5: init_form_fields

 /**
  * Initialize the fields presented on the admin/settings screen.
  *
  * @method init_form_fields
  * @return null
  */
 function init_form_fields()
 {
     $this->form_fields = array('enabled' => array('title' => __('Enable/Disable', 'woocommerce'), 'type' => 'checkbox', 'label' => __('Enable iATS Payment Gateway', 'woocommerce'), 'default' => 'yes'), 'agent_code' => array('title' => __('iATS Agent Code', 'woocommerce'), 'type' => 'text', 'description' => __('Required agent code provided by iATS.', 'woocommerce'), 'desc_tip' => true), 'password' => array('title' => __('iATS Password', 'woocommerce'), 'type' => 'password', 'description' => __('Required password provided by iATS.', 'woocommerce'), 'desc_tip' => true), 'title' => array('title' => __('Title', 'woocommerce'), 'type' => 'text', 'description' => __('This controls the title which the user sees during checkout.', 'woocommerce'), 'default' => __('iATS', 'woocommerce'), 'desc_tip' => true), 'description' => array('title' => __('Description', 'woocommerce'), 'type' => 'textarea', 'description' => __('This controls the description which the user sees during checkout.', 'woocommerce'), 'default' => __('Pay via iATS', 'woocommerce'), 'desc_tip' => true), 'cardtypes' => array('title' => __('Accepted Cards', 'woocommerce'), 'type' => 'multiselect', 'description' => __('Select which card types to accept.', 'woocommerce'), 'options' => $this->cardtypeValues), 'logging' => array('title' => __('Logging', 'woocommerce'), 'type' => 'checkbox', 'label' => __('Enable Logging', 'woocommerce'), 'default' => 'no', 'description' => sprintf(__('Log all events in <code>%s</code><br /><strong>NOTE:</strong>  This will record ALL transaction information.', 'woocommerce'), wc_get_log_file_path('blackbaud'))), 'sandbox' => array('title' => __('Sandbox Transaction', 'woocommerce'), 'type' => 'select', 'description' => __('Selecting one of these overrides the credentials, card number and total in order to generate a sandbox transaction.', 'woocommerce'), 'options' => array('' => 'DISABLED', '1.00' => '1.00 - OK: 678594', '2.00' => '2.00 - REJ: 15', '3.00' => '3.00 - OK: 678594', '4.00' => '4.00 - REJ: 15', '5.00' => '5.00 - REJ: 15', '6.00' => '6.00 - OK: 678594:X', '7.00' => '7.00 - OK: 678594:Y', '8.00' => '8.00 - OK: 678594:A', '9.00' => '9.00 - OK: 678594:Z', '10.00' => '10.00 - OK: 678594:N', '15.00' => '15.00 - OK: 678594:Y (CVV2=1234) or REJ: 19', '16.00' => '16.00 - REJ: 2', '17.00' => '17.00 - REJ: 22')));
 }
开发者ID:Blackbaud-BobbyEarl,项目名称:blackbaud-woocommerce,代码行数:10,代码来源:blackbaud-woocommerce-iats-payment-gateway.class.php


示例6: init_form_fields

 /**
  * Initialise Gateway Settings Form Fields
  *
  * @access public
  * @return void
  */
 function init_form_fields()
 {
     $this->form_fields = array('enabled' => array('title' => __('Enable/Disable', 'woocommerce'), 'type' => 'checkbox', 'label' => __('Enable 2Checkout PayPal', 'woocommerce'), 'default' => 'yes'), 'title' => array('title' => __('Title', 'woocommerce'), 'type' => 'text', 'description' => __('This controls the title which the user sees during checkout.', 'woocommerce'), 'default' => __('PayPal', 'woocommerce'), 'desc_tip' => true), 'description' => array('title' => __('Description', 'woocommerce'), 'type' => 'textarea', 'description' => __('This controls the description which the user sees during checkout.', 'woocommerce'), 'default' => __('Pay with PayPal', 'woocommerce')), 'seller_id' => array('title' => __('Seller ID', 'woocommerce'), 'type' => 'text', 'description' => __('Please enter your 2Checkout account number.', 'woocommerce'), 'default' => '', 'desc_tip' => true, 'placeholder' => ''), 'secret_word' => array('title' => __('Secret Word', 'woocommerce'), 'type' => 'text', 'description' => __('Please enter your 2Checkout Secret Word.', 'woocommerce'), 'default' => '', 'desc_tip' => true, 'placeholder' => ''), 'debug' => array('title' => __('Debug Log', 'woocommerce'), 'type' => 'checkbox', 'label' => __('Enable logging', 'woocommerce'), 'default' => 'no', 'description' => sprintf(__('Log 2Checkout events', 'woocommerce'), wc_get_log_file_path('twocheckoutpp'))));
 }
开发者ID:narendra-addweb,项目名称:MyImmoPix,代码行数:10,代码来源:wc-twocheckoutpp.php


示例7: array

<?php

if (!defined('ABSPATH')) {
    exit;
}
/**
 * Settings for PayPal Gateway.
 */
return array('enabled' => array('title' => __('Enable/Disable', 'woocommerce'), 'type' => 'checkbox', 'label' => __('Enable PayPal standard', 'woocommerce'), 'default' => 'yes'), 'title' => array('title' => __('Title', 'woocommerce'), 'type' => 'text', 'description' => __('This controls the title which the user sees during checkout.', 'woocommerce'), 'default' => __('PayPal', 'woocommerce'), 'desc_tip' => true), 'description' => array('title' => __('Description', 'woocommerce'), 'type' => 'text', 'desc_tip' => true, 'description' => __('This controls the description which the user sees during checkout.', 'woocommerce'), 'default' => __('Pay via PayPal; you can pay with your credit card if you don\'t have a PayPal account.', 'woocommerce')), 'email' => array('title' => __('PayPal Email', 'woocommerce'), 'type' => 'email', 'description' => __('Please enter your PayPal email address; this is needed in order to take payment.', 'woocommerce'), 'default' => get_option('admin_email'), 'desc_tip' => true, 'placeholder' => '[email protected]'), 'testmode' => array('title' => __('PayPal Sandbox', 'woocommerce'), 'type' => 'checkbox', 'label' => __('Enable PayPal sandbox', 'woocommerce'), 'default' => 'no', 'description' => sprintf(__('PayPal sandbox can be used to test payments. Sign up for a developer account <a href="%s">here</a>.', 'woocommerce'), 'https://developer.paypal.com/')), 'debug' => array('title' => __('Debug Log', 'woocommerce'), 'type' => 'checkbox', 'label' => __('Enable logging', 'woocommerce'), 'default' => 'no', 'description' => sprintf(__('Log PayPal events, such as IPN requests, inside <code>%s</code>', 'woocommerce'), wc_get_log_file_path('paypal'))), 'advanced' => array('title' => __('Advanced options', 'woocommerce'), 'type' => 'title', 'description' => ''), 'receiver_email' => array('title' => __('Receiver Email', 'woocommerce'), 'type' => 'email', 'description' => __('If your main PayPal email differs from the PayPal email entered above, input your main receiver email for your PayPal account here. This is used to validate IPN requests.', 'woocommerce'), 'default' => '', 'desc_tip' => true, 'placeholder' => '[email protected]'), 'identity_token' => array('title' => __('PayPal Identity Token', 'woocommerce'), 'type' => 'text', 'description' => __('Optionally enable "Payment Data Transfer" (Profile > Profile and Settings > My Selling Tools > Website Preferences) and then copy your identity token here. This will allow payments to be verified without the need for PayPal IPN.', 'woocommerce'), 'default' => '', 'desc_tip' => true, 'placeholder' => ''), 'invoice_prefix' => array('title' => __('Invoice Prefix', 'woocommerce'), 'type' => 'text', 'description' => __('Please enter a prefix for your invoice numbers. If you use your PayPal account for multiple stores ensure this prefix is unique as PayPal will not allow orders with the same invoice number.', 'woocommerce'), 'default' => 'WC-', 'desc_tip' => true), 'send_shipping' => array('title' => __('Shipping Details', 'woocommerce'), 'type' => 'checkbox', 'label' => __('Send shipping details to PayPal instead of billing.', 'woocommerce'), 'description' => __('PayPal allows us to send one address. If you are using PayPal for shipping labels you may prefer to send the shipping address rather than billing.', 'woocommerce'), 'default' => 'no'), 'address_override' => array('title' => __('Address Override', 'woocommerce'), 'type' => 'checkbox', 'label' => __('Enable "address_override" to prevent address information from being changed.', 'woocommerce'), 'description' => __('PayPal verifies addresses therefore this setting can cause errors (we recommend keeping it disabled).', 'woocommerce'), 'default' => 'no'), 'paymentaction' => array('title' => __('Payment Action', 'woocommerce'), 'type' => 'select', 'class' => 'wc-enhanced-select', 'description' => __('Choose whether you wish to capture funds immediately or authorize payment only.', 'woocommerce'), 'default' => 'sale', 'desc_tip' => true, 'options' => array('sale' => __('Capture', 'woocommerce'), 'authorization' => __('Authorize', 'woocommerce'))), 'page_style' => array('title' => __('Page Style', 'woocommerce'), 'type' => 'text', 'description' => __('Optionally enter the name of the page style you wish to use. These are defined within your PayPal account.', 'woocommerce'), 'default' => '', 'desc_tip' => true, 'placeholder' => __('Optional', 'woocommerce')), 'api_details' => array('title' => __('API Credentials', 'woocommerce'), 'type' => 'title', 'description' => sprintf(__('Enter your PayPal API credentials to process refunds via PayPal. Learn how to access your PayPal API Credentials %shere%s.', 'woocommerce'), '<a href="https://developer.paypal.com/webapps/developer/docs/classic/api/apiCredentials/#creating-classic-api-credentials">', '</a>')), 'api_username' => array('title' => __('API Username', 'woocommerce'), 'type' => 'text', 'description' => __('Get your API credentials from PayPal.', 'woocommerce'), 'default' => '', 'desc_tip' => true, 'placeholder' => __('Optional', 'woocommerce')), 'api_password' => array('title' => __('API Password', 'woocommerce'), 'type' => 'text', 'description' => __('Get your API credentials from PayPal.', 'woocommerce'), 'default' => '', 'desc_tip' => true, 'placeholder' => __('Optional', 'woocommerce')), 'api_signature' => array('title' => __('API Signature', 'woocommerce'), 'type' => 'text', 'description' => __('Get your API credentials from PayPal.', 'woocommerce'), 'default' => '', 'desc_tip' => true, 'placeholder' => __('Optional', 'woocommerce')));
开发者ID:bitoncoin,项目名称:woocommerce,代码行数:9,代码来源:settings-paypal.php


示例8: init_form_fields

 /**
  * Initialise Gateway Settings Form Fields
  */
 public function init_form_fields()
 {
     $this->log('    [Info] Entered init_form_fields()...');
     $log_file = 'bitpay-' . sanitize_file_name(wp_hash('bitpay')) . '-log';
     $logs_href = get_bloginfo('wpurl') . '/wp-admin/admin.php?page=wc-status&tab=logs&log_file=' . $log_file;
     $this->form_fields = array('enabled' => array('title' => __('Enable/Disable', 'bitpay'), 'type' => 'checkbox', 'label' => __('Enable Bitcoin Payments via BitPay', 'bitpay'), 'default' => 'yes'), 'title' => array('title' => __('Title', 'bitpay'), 'type' => 'text', 'description' => __('Controls the name of this payment method as displayed to the customer during checkout.', 'bitpay'), 'default' => __('Bitcoin', 'bitpay'), 'desc_tip' => true), 'description' => array('title' => __('Customer Message', 'bitpay'), 'type' => 'textarea', 'description' => __('Message to explain how the customer will be paying for the purchase.', 'bitpay'), 'default' => 'You will be redirected to bitpay.com to complete your purchase.', 'desc_tip' => true), 'api_token' => array('type' => 'api_token'), 'transaction_speed' => array('title' => __('Risk/Speed', 'bitpay'), 'type' => 'select', 'description' => 'Choose a transaction speed.  For details, see the API documentation at bitpay.com', 'options' => array('high' => 'High', 'medium' => 'Medium', 'low' => 'Low'), 'default' => 'high', 'desc_tip' => true), 'order_states' => array('type' => 'order_states'), 'debug' => array('title' => __('Debug Log', 'bitpay'), 'type' => 'checkbox', 'label' => sprintf(__('Enable logging <a href="%s" class="button">View Logs</a>', 'bitpay'), $logs_href), 'default' => 'no', 'description' => sprintf(__('Log BitPay events, such as IPN requests, inside <code>%s</code>', 'bitpay'), wc_get_log_file_path('bitpay')), 'desc_tip' => true), 'notification_url' => array('title' => __('Notification URL', 'bitpay'), 'type' => 'url', 'description' => __('BitPay will send IPNs for orders to this URL with the BitPay invoice data', 'bitpay'), 'default' => '', 'placeholder' => WC()->api_request_url('WC_Gateway_Bitpay'), 'desc_tip' => true), 'redirect_url' => array('title' => __('Redirect URL', 'bitpay'), 'type' => 'url', 'description' => __('After paying the BitPay invoice, users will be redirected back to this URL', 'bitpay'), 'default' => '', 'placeholder' => $this->get_return_url(), 'desc_tip' => true), 'support_details' => array('title' => __('Plugin & Support Information', 'bitpay'), 'type' => 'title', 'description' => sprintf(__('This plugin version is %s and your PHP version is %s. If you need assistance, please contact [email protected].  Thank you for using BitPay!', 'bitpay'), get_option('woocommerce_bitpay_version'), PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION)));
     $this->log('    [Info] Initialized form fields: ' . var_export($this->form_fields, true));
     $this->log('    [Info] Leaving init_form_fields()...');
 }
开发者ID:blockchain-bitcoin,项目名称:woocommerce-plugin,代码行数:12,代码来源:class-wc-gateway-bitpay.php


示例9: maybe_download_log_file

 /**
  * Force download of log file if $_GET['download_log'] is set
  *
  * @since 4.4
  */
 public static function maybe_download_log_file()
 {
     if (isset($_GET['download_log'])) {
         // If file doesn't exist, create it
         $handle = 'wootax';
         if (function_exists('wc_get_log_file_path')) {
             $log_path = wc_get_log_file_path($handle);
         } else {
             $log_path = WC()->plugin_path() . '/logs/' . $handle . '-' . sanitize_file_name(wp_hash($handle)) . '.txt';
         }
         if (!file_exists($log_path)) {
             $fh = @fopen($log_path, 'a');
             fclose($fh);
         }
         // Force download
         header('Content-Description: File Transfer');
         header('Content-Type: application/octet-stream');
         header('Content-Disposition: attachment; filename=' . basename($log_path));
         header('Expires: 0');
         header('Cache-Control: must-revalidate');
         header('Pragma: public');
         header('Content-Length: ' . filesize($log_path));
         readfile($log_path);
         exit;
     }
 }
开发者ID:sergioblanco86,项目名称:git-gitlab.com-kinivo-kinivo.com,代码行数:31,代码来源:class-wc-wootax-settings.php


示例10: init_form_fields

 /**
  * Initialise Gateway Settings Form Fields
  *
  * The standard gateway options have already been applied. 
  * Change the fields to match what the payment gateway your building requires.
  *
  * @access public
  */
 public function init_form_fields()
 {
     $this->form_fields = array('enabled' => array('title' => __('Enable/Disable', 'woocommerce-payment-gateway-boilerplate'), 'label' => __('Enable Gateway Name', 'woocommerce-payment-gateway-boilerplate'), 'type' => 'checkbox', 'description' => '', 'default' => 'no'), 'title' => array('title' => __('Title', 'woocommerce-payment-gateway-boilerplate'), 'type' => 'text', 'description' => __('This controls the title which the user sees during checkout.', 'woocommerce-payment-gateway-boilerplate'), 'default' => __('Gateway Name', 'woocommerce-payment-gateway-boilerplate'), 'desc_tip' => true), 'description' => array('title' => __('Description', 'woocommerce-payment-gateway-boilerplate'), 'type' => 'text', 'description' => __('This controls the description which the user sees during checkout.', 'woocommerce-payment-gateway-boilerplate'), 'default' => 'Pay with Gateway Name.', 'desc_tip' => true), 'instructions' => array('title' => __('Instructions', 'woocommerce-payment-gateway-boilerplate'), 'type' => 'textarea', 'description' => __('Instructions that will be added to the thank you page and emails.', 'woocommerce-payment-gateway-boilerplate'), 'default' => '', 'desc_tip' => true), 'debug' => array('title' => __('Debug Log', 'woocommerce-payment-gateway-boilerplate'), 'type' => 'checkbox', 'label' => __('Enable logging', 'woocommerce-payment-gateway-boilerplate'), 'default' => 'no', 'description' => sprintf(__('Log Gateway name events inside <code>%s</code>', 'woocommerce-payment-gateway-boilerplate'), wc_get_log_file_path($this->id))), 'sandbox' => array('title' => __('Sandbox', 'woocommerce-payment-gateway-boilerplate'), 'label' => __('Enable Sandbox Mode', 'woocommerce-payment-gateway-boilerplate'), 'type' => 'checkbox', 'description' => __('Place the payment gateway in sandbox mode using sandbox API keys (real payments will not be taken).', 'woocommerce-payment-gateway-boilerplate'), 'default' => 'yes'), 'sandbox_private_key' => array('title' => __('Sandbox Private Key', 'woocommerce-payment-gateway-boilerplate'), 'type' => 'text', 'description' => __('Get your API keys from your Gateway Name account.', 'woocommerce-payment-gateway-boilerplate'), 'default' => '', 'desc_tip' => true), 'sandbox_public_key' => array('title' => __('Sandbox Public Key', 'woocommerce-payment-gateway-boilerplate'), 'type' => 'text', 'description' => __('Get your API keys from your Gateway Name account.', 'woocommerce-payment-gateway-boilerplate'), 'default' => '', 'desc_tip' => true), 'private_key' => array('title' => __('Private Key', 'woocommerce-payment-gateway-boilerplate'), 'type' => 'text', 'description' => __('Get your API keys from your Gateway Name account.', 'woocommerce-payment-gateway-boilerplate'), 'default' => '', 'desc_tip' => true), 'public_key' => array('title' => __('Public Key', 'woocommerce-payment-gateway-boilerplate'), 'type' => 'text', 'description' => __('Get your API keys from your Gateway Name account.', 'woocommerce-payment-gateway-boilerplate'), 'default' => '', 'desc_tip' => true));
 }
开发者ID:prayas-sapkota,项目名称:WooCommerce-Payment-Gateway-Boilerplate,代码行数:12,代码来源:class-wc-gateway-payment-gateway-boilerplate.php


示例11: apply_filters

<?php

if (!defined('ABSPATH')) {
    exit;
    // Exit if accessed directly
}
/**
 * Settings for Klarna Checkout
 */
return apply_filters('klarna_checkout_form_fields', array('enabled' => array('title' => __('Enable/Disable', 'woocommerce-gateway-klarna'), 'type' => 'checkbox', 'label' => __('Enable Klarna Checkout', 'woocommerce-gateway-klarna'), 'default' => 'no'), 'title' => array('title' => __('Title', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('This controls the title which the user sees during checkout.', 'woocommerce-gateway-klarna'), 'default' => __('Klarna Checkout', 'woocommerce-gateway-klarna')), 'order_settings_title' => array('title' => __('Order management settings', 'woocommerce-gateway-klarna'), 'type' => 'title'), 'push_completion' => array('title' => __('On order completion', 'woocommerce-gateway-klarna'), 'type' => 'checkbox', 'label' => __('Activate Klarna order automatically when WooCommerce order is marked complete.', 'woocommerce-gateway-klarna'), 'default' => 'no'), 'push_cancellation' => array('title' => __('On order cancellation', 'woocommerce-gateway-klarna'), 'type' => 'checkbox', 'label' => __('Cancel Klarna order automatically when WooCommerce order is cancelled', 'woocommerce-gateway-klarna'), 'default' => 'no'), 'push_update' => array('title' => __('On order update', 'woocommerce-gateway-klarna'), 'type' => 'checkbox', 'label' => __('Update Klarna order automatically when WooCoommerce line items are updated.', 'woocommerce-gateway-klarna'), 'default' => 'no'), 'sweden_settings_title' => array('title' => __('Sweden', 'woocommerce-gateway-klarna'), 'type' => 'title'), 'eid_se' => array('title' => __('Eid - Sweden', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Please enter your Klarna Eid for Sweden. Leave blank to disable.', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'secret_se' => array('title' => __('Shared Secret - Sweden', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Please enter your Klarna Shared Secret for Sweden.', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'klarna_checkout_url_se' => array('title' => __('Custom Checkout Page - Sweden', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Please enter the URL to the page that acts as Checkout Page for Klarna Checkout Sweden. This page must contain the shortcode [woocommerce_klarna_checkout].', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'klarna_checkout_thanks_url_se' => array('title' => __('Custom Thanks Page - Sweden', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Enter the URL to the page that acts as Thanks Page for Klarna Checkout Sweden. This page must contain the shortcode [woocommerce_klarna_checkout]. Leave blank to use the Custom Checkout Page as Thanks Page.', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'norway_settings_title' => array('title' => __('Norway', 'woocommerce-gateway-klarna'), 'type' => 'title'), 'eid_no' => array('title' => __('Eid - Norway', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Please enter your Klarna Eid for Norway. Leave blank to disable.', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'secret_no' => array('title' => __('Shared Secret - Norway', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Please enter your Klarna Shared Secret for Norway.', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'klarna_checkout_url_no' => array('title' => __('Custom Checkout Page - Norway', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Please enter the URL to the page that acts as Checkout Page for Klarna Checkout Norway. This page must contain the shortcode [woocommerce_klarna_checkout].', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'klarna_checkout_thanks_url_no' => array('title' => __('Custom Thanks Page - Norway', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Enter the URL to the page that acts as Thanks Page for Klarna Checkout Norway. This page must contain the shortcode [woocommerce_klarna_checkout]. Leave blank to use the Custom Checkout Page as Thanks Page.', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'finland_settings_title' => array('title' => __('Finland', 'woocommerce-gateway-klarna'), 'type' => 'title'), 'eid_fi' => array('title' => __('Eid - Finland', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Please enter your Klarna Eid for Finland. Leave blank to disable.', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'secret_fi' => array('title' => __('Shared Secret - Finland', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Please enter your Klarna Shared Secret for Finland.', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'klarna_checkout_url_fi' => array('title' => __('Custom Checkout Page - Finland', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Please enter the URL to the page that acts as Checkout Page for Klarna Checkout Finland. This page must contain the shortcode [woocommerce_klarna_checkout].', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'klarna_checkout_thanks_url_fi' => array('title' => __('Custom Thanks Page - Finland', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Enter the URL to the page that acts as Thanks Page for Klarna Checkout Finland. This page must contain the shortcode [woocommerce_klarna_checkout]. Leave blank to use the Custom Checkout Page as Thanks Page.', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'germany_settings_title' => array('title' => __('Germany', 'woocommerce-gateway-klarna'), 'type' => 'title'), 'eid_de' => array('title' => __('Eid - Germany', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Please enter your Klarna Eid for Germany. Leave blank to disable.', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'secret_de' => array('title' => __('Shared Secret - Germany', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Please enter your Klarna Shared Secret for Germany.', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'klarna_checkout_url_de' => array('title' => __('Custom Checkout Page - Germany', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Please enter the URL to the page that acts as Checkout Page for Klarna Checkout Germany. This page must contain the shortcode [woocommerce_klarna_checkout].', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'klarna_checkout_thanks_url_de' => array('title' => __('Custom Thanks Page - Germany', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Enter the URL to the page that acts as Thanks Page for Klarna Checkout Germany. This page must contain the shortcode [woocommerce_klarna_checkout]. Leave blank to use the Custom Checkout Page as Thanks Page.', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'phone_mandatory_de' => array('title' => __('Phone Number Mandatory - Germany', 'woocommerce-gateway-klarna'), 'type' => 'checkbox', 'label' => __('Phone number is not mandatory for Klarna Checkout in Germany by default. Check this box to make it mandatory.', 'woocommerce-gateway-klarna'), 'default' => 'no', 'desc_tip' => true), 'dhl_packstation_de' => array('title' => __('DHL Packstation Functionality - Germany', 'woocommerce-gateway-klarna'), 'type' => 'checkbox', 'label' => __('Enable DHL packstation functionality for German customers.', 'woocommerce-gateway-klarna'), 'default' => 'no', 'desc_tip' => true), 'austria_settings_title' => array('title' => __('Austria', 'woocommerce-gateway-klarna'), 'type' => 'title'), 'eid_at' => array('title' => __('Eid - Austria', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Please enter your Klarna Eid for Austria. Leave blank to disable.', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'secret_at' => array('title' => __('Shared Secret - Austria', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Please enter your Klarna Shared Secret for Austria.', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'klarna_checkout_url_at' => array('title' => __('Custom Checkout Page - Austria', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Please enter the URL to the page that acts as Checkout Page for Klarna Checkout Austria. This page must contain the shortcode [woocommerce_klarna_checkout].', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'klarna_checkout_thanks_url_at' => array('title' => __('Custom Thanks Page - Austria', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Enter the URL to the page that acts as Thanks Page for Klarna Checkout Austria. This page must contain the shortcode [woocommerce_klarna_checkout]. Leave blank to use the Custom Checkout Page as Thanks Page.', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'phone_mandatory_at' => array('title' => __('Phone Number Mandatory - Austria', 'woocommerce-gateway-klarna'), 'type' => 'checkbox', 'label' => __('Phone number is not mandatory for Klarna Checkout in Austria by default. Check this box to make it mandatory.', 'woocommerce-gateway-klarna'), 'default' => 'no', 'desc_tip' => true), 'uk_settings_title' => array('title' => __('UK', 'woocommerce-gateway-klarna'), 'type' => 'title'), 'eid_uk' => array('title' => __('Eid - UK', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Please enter your Klarna Eid for UK. Leave blank to disable.', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'secret_uk' => array('title' => __('Shared Secret - UK', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Please enter your Klarna Shared Secret for UK.', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'klarna_checkout_url_uk' => array('title' => __('Custom Checkout Page - UK', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Please enter the URL to the page that acts as Checkout Page for Klarna Checkout UK. This page must contain the shortcode [woocommerce_klarna_checkout].', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'klarna_checkout_thanks_url_uk' => array('title' => __('Custom Thanks Page - UK', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Enter the URL to the page that acts as Thanks Page for Klarna Checkout UK. This page must contain the shortcode [woocommerce_klarna_checkout]. Leave blank to use the Custom Checkout Page as Thanks Page.', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'uk_ship_only_to_base' => array('title' => __('Only ship to UK', 'woocommerce-gateway-klarna'), 'type' => 'checkbox', 'label' => __('Only allow shipping to UK addresses. You need an agreement with Klarna to allow shipping to other countries.', 'woocommerce-gateway-klarna'), 'default' => 'yes'), 'us_settings_title' => array('title' => __('USA', 'woocommerce-gateway-klarna'), 'type' => 'title'), 'eid_us' => array('title' => __('Eid - USA', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Please enter your Klarna Eid for USA. Leave blank to disable.', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'secret_us' => array('title' => __('Shared Secret - USA', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Please enter your Klarna Shared Secret for USA.', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'klarna_checkout_url_us' => array('title' => __('Custom Checkout Page - USA', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Please enter the URL to the page that acts as Checkout Page for Klarna Checkout USA. This page must contain the shortcode [woocommerce_klarna_checkout].', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'klarna_checkout_thanks_url_us' => array('title' => __('Custom Thanks Page - USA', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Enter the URL to the page that acts as Thanks Page for Klarna Checkout USA. This page must contain the shortcode [woocommerce_klarna_checkout]. Leave blank to use the Custom Checkout Page as Thanks Page.', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'checkout_settings_title' => array('title' => __('Checkout settings', 'woocommerce-gateway-klarna'), 'type' => 'title'), 'default_eur_contry' => array('title' => __('Default Euro Checkout Country', 'woocommerce-gateway-klarna'), 'type' => 'select', 'options' => array('DE' => __('Germany', 'woocommerce-gateway-klarna'), 'FI' => __('Finland', 'woocommerce-gateway-klarna'), 'AT' => __('Austria', 'woocommerce-gateway-klarna')), 'description' => __('Used by the payment gateway to determine which country should be the default Checkout country if Euro is the selected currency, you as a merchant has an agreement with multiple countries that use Euro and the selected language cant be of help for this decision.', 'woocommerce-gateway-klarna'), 'default' => 'DE', 'desc_tip' => true), 'modify_standard_checkout_url' => array('title' => __('Modify Standard Checkout', 'woocommerce-gateway-klarna'), 'type' => 'checkbox', 'label' => __('Make the Custom Checkout Page for Klarna Checkout the default checkout page (i.e. changing the url of the checkout buttons in Cart and the Widget mini cart).', 'woocommerce-gateway-klarna'), 'default' => 'yes'), 'add_std_checkout_button' => array('title' => __('Button to Standard Checkout', 'woocommerce-gateway-klarna'), 'type' => 'checkbox', 'label' => __('Add a button when the Klarna Checkout form is displayed that links to the standard checkout page.', 'woocommerce-gateway-klarna'), 'default' => 'no'), 'std_checkout_button_label' => array('title' => __('Label for Standard Checkout Button', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Please enter the text for the button that links to the standard checkout page from the Klarna Checkout form.', 'woocommerce-gateway-klarna'), 'default' => ''), 'add_klarna_checkout_button' => array('title' => __('Button to Klarna Checkout', 'woocommerce-gateway-klarna'), 'type' => 'checkbox', 'label' => __('Add a button in standard checkout page that links to the Klarna checkout page.', 'woocommerce-gateway-klarna'), 'default' => 'no'), 'klarna_checkout_button_label' => array('title' => __('Label for Standard Checkout Button', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Please enter the text for the button that links to the Klarna checkout page from the standard checkout page.', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'terms_url' => array('title' => __('Terms Page', 'woocommerce-gateway-klarna'), 'type' => 'text', 'description' => __('Please enter the URL to the page that acts as Terms Page for Klarna Checkout. Leave blank to use the defined WooCommerce Terms Page.', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'create_customer_account' => array('title' => __('Create customer account', 'woocommerce-gateway-klarna'), 'type' => 'checkbox', 'label' => __('Automatically create an account for new customers.', 'woocommerce-gateway-klarna'), 'default' => 'no'), 'send_new_account_email' => array('title' => __('Send New account email when creating new accounts', 'woocommerce-gateway-klarna'), 'type' => 'checkbox', 'label' => __('Send New account email', 'woocommerce-gateway-klarna'), 'default' => 'no'), 'account_signup_text' => array('title' => __('Account Signup Text', 'woocommerce-gateway-klarna'), 'type' => 'textarea', 'description' => __('Add text above the Account Registration Form. Useful for legal text for German stores. See documentation for more information. Leave blank to disable.', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'account_login_text' => array('title' => __('Account Login Text', 'woocommerce-gateway-klarna'), 'type' => 'textarea', 'description' => __('Add text above the Account Login Form. Useful for legal text for German stores. See documentation for more information. Leave blank to disable.', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'validate_stock' => array('title' => __('Check items stock during checkout', 'woocommerce-gateway-klarna'), 'type' => 'checkbox', 'label' => __('If this option is checked, stock status will be checked again for all items in the cart
		 while Klarna Checkout request is being processed. Useful for high-volume stores, HTTPS is required.', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'send_discounts_separately' => array('title' => __('Send discounts as separate items', 'woocommerce-gateway-klarna'), 'type' => 'checkbox', 'label' => __('If you enable this option discounts will be sent to Klarna as separate cart items instead of being applied to regular cart items.', 'woocommerce-gateway-klarna'), 'description' => __('Use this if you encounter rounding issues that cause WooCommerce order total not to match Klarna order total.', 'klarna'), 'default' => 'no'), 'color_settings_title' => array('title' => __('Color Settings', 'woocommerce-gateway-klarna'), 'type' => 'title'), 'color_button' => array('title' => __('Checkout button color', 'woocommerce-gateway-klarna'), 'type' => 'color', 'description' => __('Checkout page button color', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'color_button_text' => array('title' => __('Checkout button text color', 'woocommerce-gateway-klarna'), 'type' => 'color', 'description' => __('Checkout page button text color', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'color_checkbox' => array('title' => __('Checkout checkbox color', 'woocommerce-gateway-klarna'), 'type' => 'color', 'description' => __('Checkout page checkbox color', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'color_checkbox_checkmark' => array('title' => __('Checkout checkbox checkmark color', 'woocommerce-gateway-klarna'), 'type' => 'color', 'description' => __('Checkout page checkbox checkmark color', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'color_header' => array('title' => __('Checkout header color', 'woocommerce-gateway-klarna'), 'type' => 'color', 'description' => __('Checkout page header color', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'color_link' => array('title' => __('Checkout link color', 'woocommerce-gateway-klarna'), 'type' => 'color', 'description' => __('Checkout page link color', 'woocommerce-gateway-klarna'), 'default' => '', 'desc_tip' => true), 'test_mode_settings_title' => array('title' => __('Test Mode Settings', 'woocommerce-gateway-klarna'), 'type' => 'title'), 'testmode' => array('title' => __('Test Mode', 'woocommerce-gateway-klarna'), 'type' => 'checkbox', 'label' => __('Enable Klarna Test Mode. This will only work if you have a Klarna test account.', 'woocommerce-gateway-klarna'), 'default' => 'no'), 'debug' => array('title' => __('Debug', 'woocommerce-gateway-klarna'), 'type' => 'checkbox', 'label' => __('Enable logging.', 'woocommerce-gateway-klarna'), 'description' => sprintf(__('Log Klarna events, in <code>%s</code>', 'woocommerce'), wc_get_log_file_path('klarna')), 'default' => 'no')));
开发者ID:NoviumDesign,项目名称:polefitness,代码行数:11,代码来源:settings-checkout.php


示例12: wc_get_debug_file_path

 /**
  * Get debug file path
  *
  * @since 1.1
  * @param string $name
  * @return string
  */
 public static function wc_get_debug_file_path($name)
 {
     if (self::is_wc_2_2()) {
         $file = wc_get_log_file_path($name);
     } else {
         $file = 'woocommerce/logs/' . $name . '-' . sanitize_file_name(wp_hash($name)) . '.txt';
     }
     return $file;
 }
开发

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wc_get_notices函数代码示例发布时间:2022-05-23
下一篇:
PHP wc_get_image_size函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap