mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
change logic to show dcc logos only on checkout
This commit is contained in:
parent
1f5bf7e579
commit
82f4d1e0af
1 changed files with 3 additions and 1 deletions
|
@ -133,9 +133,11 @@ class CreditCardGateway extends \WC_Payment_Gateway_CC {
|
|||
*/
|
||||
public function get_title() {
|
||||
|
||||
if ( is_admin() ) {
|
||||
//phpcs:disable WordPress.Security.NonceVerification.Recommended
|
||||
if ( ! is_checkout() || ( is_ajax() && isset( $_GET['wc-ajax'] ) && 'update_order_review' !== $_GET['wc-ajax'] ) ) {
|
||||
return parent::get_title();
|
||||
}
|
||||
//phpcs:enable WordPress.Security.NonceVerification.Recommended
|
||||
$title = parent::get_title();
|
||||
$icons = $this->config->has( 'card_icons' ) ? (array) $this->config->get( 'card_icons' ) : array();
|
||||
if ( empty( $icons ) ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue