Automattic\WooCommerce\Blocks\Payments\Integrations
PayPal::get_description
Get the description for the payment method. Add sandbox instructions if sandbox mode is enabled.
Метод класса: PayPal{}
Хуков нет.
Возвращает
Строку.
Использование
$PayPal = new PayPal(); $PayPal->get_description();
Код PayPal::get_description() PayPal::get description WC 10.5.0
public function get_description() {
$gateway = WC_Gateway_Paypal::get_instance();
$testmode = $gateway->testmode;
$description = $this->get_setting( 'description' ) ?? '';
if ( $testmode ) {
/* translators: %s: Link to PayPal sandbox testing guide page */
$description .= '<br>' . sprintf( __( '<strong>Sandbox mode enabled</strong>. Only sandbox test accounts can be used. See the <a href="%s">PayPal Sandbox Testing Guide</a> for more details.', 'woocommerce' ), 'https://developer.paypal.com/tools/sandbox/' );
}
return trim( $description );
}