本文整理汇总了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函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例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'))));
示例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;
}
示例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'))));
}
示例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' => 'you@youremail.com'), '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' => 'you@youremail.com'), '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')));
示例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 support@bitpay.com. 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()...');
}
示例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: 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;
}
示例12: esc_html_e
?>
</h2>
<p><?php
esc_html_e('Your database has been updated successfully!', 'woocommerce-subscriptions');
?>
</p>
<p class="step"><a class="button" href="<?php
echo esc_url($about_page_url);
?>
"><?php
esc_html_e('Continue', 'woocommerce-subscriptions');
?>
</a></p>
<p class="log-notice"><?php
// translators: $1: placeholder is number of weeks, 2$: path to the file
echo wp_kses(sprintf(__('To record the progress of the update a new log file was created. This file will be automatically deleted in %1$d weeks. If you would like to delete it sooner, you can find it here: %2$s', 'woocommerce-subscriptions'), esc_html(WCS_Upgrade_Logger::$weeks_until_cleanup), '<code class="log-notice">' . esc_html(wc_get_log_file_path(WCS_Upgrade_Logger::$handle)) . '</code>'), array('code' => array('class' => true)));
?>
</p>
</div>
<div id="update-error">
<h2><?php
esc_html_e('Update Error', 'woocommerce-subscriptions');
?>
</h2>
<p><?php
esc_html_e('There was an error with the update. Please refresh the page and try again.', 'woocommerce-subscriptions');
?>
</p>
</div>
</body>
</html>
示例13: init_form_fields
/**
* Initialise Gateway Settings Form Fields
*
* @access public
* @return void
*/
function init_form_fields()
{
$debug = __('Включить логирование (<code>woocommerce/logs/' . $this->id . '.txt</code>)', 'woocommerce');
if (!version_compare(WOOCOMMERCE_VERSION, '2.0', '<')) {
if (version_compare(WOOCOMMERCE_VERSION, '2.2.0', '<')) {
$debug = str_replace($this->id, $this->id . '-' . sanitize_file_name(wp_hash($this->id)), $debug);
} elseif (function_exists('wc_get_log_file_path')) {
$debug = str_replace('woocommerce/logs/' . $this->id . '.txt', wc_get_log_file_path($this->id), $debug);
}
}
$this->form_fields = array('enabled' => array('title' => __('Включить/Выключить', 'woocommerce'), 'type' => 'checkbox', 'label' => __('Включен', 'woocommerce'), 'default' => 'yes'), 'title' => array('title' => __('Название', 'woocommerce'), 'type' => 'text', 'description' => __('Это название, которое пользователь видит во время проверки.', 'woocommerce'), 'default' => __('OPLATA.MD', 'woocommerce')), 'testmode' => array('title' => __('Тест режим', 'woocommerce'), 'type' => 'checkbox', 'label' => __('Включен', 'woocommerce'), 'description' => __('В этом режиме плата за товар не снимается.<br>Для тестового режима: <label style="font-weight: 700;" for="fruitware_woocommerce_oplatamd_oplatamd_merchant">Название проекта</label>: "demoshop" и <label style="font-weight: 700;" for="fruitware_woocommerce_oplatamd_secret_key">Секретный ключ</label>: "950856916534772"', 'woocommerce'), 'default' => 'no'), 'oplatamd_merchant' => array('title' => __('Название проекта', 'woocommerce'), 'type' => 'text', 'description' => __('Пожалуйста введите Название проекта (projectsTitle).', 'woocommerce'), 'default' => 'demoshop'), 'secret_key' => array('title' => __('Секретный ключ', 'woocommerce'), 'type' => 'password', 'description' => __('Пожалуйста введите Секретный ключ (secretKey).<br />', 'woocommerce'), 'default' => ''), 'debug' => array('title' => __('Debug', 'woocommerce'), 'type' => 'checkbox', 'label' => $debug, 'default' => 'no'), 'sslverify' => array('title' => __('Verify ssl certificate', 'woocommerce'), 'type' => 'checkbox', 'label' => __('Включен', 'woocommerce'), 'description' => __('Выключать проверку, только если есть проблема с проверкой сертификатов', 'woocommerce'), 'default' => 'yes'), 'description' => array('title' => __('Description', 'woocommerce'), 'type' => 'textarea', 'description' => __('Описанием метода оплаты которое клиент будет видеть на вашем сайте.', 'woocommerce'), 'default' => 'Оплата с помощью oplata.md.'), 'instructions' => array('title' => __('Instructions', 'woocommerce'), 'type' => 'textarea', 'description' => __('Инструкции, которые будут добавлены на страницу благодарностей.', 'woocommerce'), 'default' => 'Оплата с помощью oplata.md.'));
}
示例14: esc_html_e
esc_html_e('Your database has been updated successfully!', 'woocommerce-subscriptions');
?>
</p>
<p class="step"><a class="button" href="<?php
echo esc_url($about_page_url);
?>
"><?php
esc_html_e('Continue', 'woocommerce-subscriptions');
?>
</a></p>
<p class="log-notice"><?php
// translators: placeholder is number of weeks
printf(esc_html__('To record the progress of the update a new log file was created. This file will be automatically deleted in %d weeks. If you would like to delete it sooner, you can find it here:', 'woocommerce-subscriptions'), esc_html(WCS_Upgrade_Logger::$weeks_until_cleanup));
?>
<code class="log-notice"><?php
echo esc_html(wc_get_log_file_path(WCS_Upgrade_Logger::$handle));
?>
</code>
</p>
</div>
<div id="update-error">
<h2><?php
esc_html_e('Update Error', 'woocommerce-subscriptions');
?>
</h2>
<p><?php
esc_html_e('There was an error with the update. Please refresh the page and try again.', 'woocommerce-subscriptions');
?>
</p>
</div>
</body>
示例15: init_form_fields
/**
* Initialise Gateway Settings Form Fields
*
* @access public
* @return void
*/
function init_form_fields()
{
$debug = __('Включить логирование (<code>woocommerce/logs/' . $this->id . '.txt</code>)', 'robokassa-payment-gateway-saphali');
if (!version_compare(WOOCOMMERCE_VERSION, '2.0', '<')) {
if (version_compare(WOOCOMMERCE_VERSION, '2.2.0', '<')) {
$debug = str_replace($this->id, $this->id . '-' . sanitize_file_name(wp_hash($this->id)), $debug);
} elseif (function_exists('wc_get_log_file_path')) {
$debug = str_replace('woocommerce/logs/' . $this->id . '.txt', '<a href="/wp-admin/admin.php?page=wc-status&tab=logs&log_file=' . $this->id . '-' . sanitize_file_name(wp_hash($this->id)) . '-log" target="_blank">' . wc_get_log_file_path($this->id) . '</a>', $debug);
}
}
$this->form_fields = array('enabled' => array('title' => __('Включить/Выключить', 'robokassa-payment-gateway-saphali'), 'type' => 'checkbox', 'label' => __('Включен', 'robokassa-payment-gateway-saphali'), 'default' => 'yes'), 'title' => array('title' => __('Название', 'robokassa-payment-gateway-saphali'), 'type' => 'text', 'description' => __('Это название, которое пользователь видит во время проверки.', 'robokassa-payment-gateway-saphali'), 'default' => __('ROBOKASSA', 'robokassa-payment-gateway-saphali')), 'robokassa_merchant' => array('title' => __('Логин', 'robokassa-payment-gateway-saphali'), 'type' => 'text', 'description' => __('Пожалуйста введите Логин', 'robokassa-payment-gateway-saphali'), 'default' => 'demo'), 'robokassa_key1' => array('title' => __('Пароль #1', 'robokassa-payment-gateway-saphali'), 'type' => 'password', 'description' => __('Пожалуйста введите пароль №1.', 'robokassa-payment-gateway-saphali'), 'default' => ''), 'robokassa_key2' => array('title' => __('Пароль #2', 'robokassa-payment-gateway-saphali'), 'type' => 'password', 'description' => __('Пожалуйста введите пароль №2.', 'robokassa-payment-gateway-saphali'), 'default' => ''), 'testmode' => array('title' => __('Тест режим', 'robokassa-payment-gateway-saphali'), 'type' => 'checkbox', 'label' => __('Включен', 'robokassa-payment-gateway-saphali'), 'description' => __('В этом режиме плата за товар не снимается.', 'robokassa-payment-gateway-saphali'), 'default' => 'no'), 'debug' => array('title' => __('Debug', 'robokassa-payment-gateway-saphali'), 'type' => 'checkbox', 'label' => $debug, 'default' => 'no'), 'description' => array('title' => __('Description', 'robokassa-payment-gateway-saphali'), 'type' => 'textarea', 'description' => __('Описанием метода оплаты которое клиент будет видеть на вашем сайте.', 'robokassa-payment-gateway-saphali'), 'default' => 'Оплата с помощью robokassa.'), 'instructions' => array('title' => __('Instructions', 'robokassa-payment-gateway-saphali'), 'type' => 'textarea', 'description' => __('Инструкции, которые будут добавлены на страницу благодарностей.', 'robokassa-payment-gateway-saphali'), 'default' => 'Оплата с помощью robokassa.'), 'lang' => array('title' => __('Язык общения с клиентом', 'robokassa-payment-gateway-saphali'), 'type' => 'select', 'options' => array("" => 'Выбрать', "ru" => "Русский", "en" => "English"), 'description' => __('Вы определяете изначально сами, на каком языке интерфейс ROBOKASSA должен отображаться для клиента', 'robokassa-payment-gateway-saphali'), 'default' => 'ru'));
}