woocommerce_payment_gateways_settings

This function adds the Sisow Global Settings to the woocommerce payment method settings.

Description

(array) apply_filters( 'woocommerce_payment_gateways_settings', (array) $array ); 

Returns (array)

Parameters (1)

0. $array — Optional. (array) => array(array( 'title' => __( 'Checkout process', 'woocommerce' ), 'type' => 'title', 'id' => 'checkout_process_options', ),array( 'title' => __( 'Coupons', 'woocommerce' ), 'desc' => __( 'Enable the use of coupons', 'woocommerce' ), 'id' => 'woocommerce_enable_coupons', 'default' => 'yes', 'type' => 'checkbox', 'checkboxgroup' => 'start', 'desc_tip' => __( 'Coupons can be applied from the cart and checkout pages.', 'woocommerce' ), ),array( 'desc' => __( 'Calculate coupon discounts sequentially', 'woocommerce' ), 'id' => 'woocommerce_calc_discounts_sequentially', 'default' => 'no', 'type' => 'checkbox', 'desc_tip' => __( 'When applying multiple coupons, apply the first coupon to the full price and the second coupon to the discounted price and so on.', 'woocommerce' ), 'checkboxgroup' => 'end', 'autoload' => false, ),array( 'title' => __( 'Checkout process', 'woocommerce' ), 'desc' => __( 'Enable guest checkout', 'woocommerce' ), 'desc_tip' => __( 'Allows customers to checkout without creating an account.', 'woocommerce' ), 'id' => 'woocommerce_enable_guest_checkout', 'default' => 'yes', 'type' => 'checkbox', 'checkboxgroup' => 'start', 'autoload' => false, ),array( 'desc' => __( 'Force secure checkout', 'woocommerce' ), 'id' => 'woocommerce_force_ssl_checkout', 'default' => 'no', 'type' => 'checkbox', 'checkboxgroup' => '', 'show_if_checked' => 'option', 'desc_tip' => sprintf( __( 'Force SSL (HTTPS) on the checkout pages (an SSL Certificate is required).', 'woocommerce' ), 'https://docs.woocommerce.com/document/ssl-and-https/#section-3' ), ),'unforce_ssl_checkout' => array( 'desc' => __( 'Force HTTP when leaving the checkout', 'woocommerce' ), 'id' => 'woocommerce_unforce_ssl_checkout', 'default' => 'no', 'type' => 'checkbox', 'checkboxgroup' => 'end', 'show_if_checked' => 'yes', ),array( 'type' => 'sectionend', 'id' => 'checkout_process_options', ),array( 'title' => __( 'Checkout pages', 'woocommerce' ), 'desc' => __( 'These pages need to be set so that WooCommerce knows where to send users to checkout.', 'woocommerce' ), 'type' => 'title', 'id' => 'checkout_page_options', ),array( 'title' => __( 'Cart page', 'woocommerce' ), 'desc' => sprintf( __( 'Page contents: [%s]', 'woocommerce' ), apply_filters( 'woocommerce_cart_shortcode_tag', 'woocommerce_cart' ) ), 'id' => 'woocommerce_cart_page_id', 'type' => 'single_select_page', 'default' => '', 'class' => 'wc-enhanced-select-nostd', 'css' => 'min-width:300px;', 'desc_tip' => true, ),array( 'title' => __( 'Checkout page', 'woocommerce' ), 'desc' => sprintf( __( 'Page contents: [%s]', 'woocommerce' ), apply_filters( 'woocommerce_checkout_shortcode_tag', 'woocommerce_checkout' ) ), 'id' => 'woocommerce_checkout_page_id', 'type' => 'single_select_page', 'default' => '', 'class' => 'wc-enhanced-select-nostd', 'css' => 'min-width:300px;', 'desc_tip' => true, ),array( 'title' => __( 'Terms and conditions', 'woocommerce' ), 'desc' => __( 'If you define a "Terms" page the customer will be asked if they accept them when checking out.', 'woocommerce' ), 'id' => 'woocommerce_terms_page_id', 'default' => '', 'class' => 'wc-enhanced-select-nostd', 'css' => 'min-width:300px;', 'type' => 'single_select_page', 'desc_tip' => true, 'autoload' => false, ),array( 'type' => 'sectionend', 'id' => 'checkout_page_options', ),array( 'title' => __( 'Checkout endpoints', 'woocommerce' ), 'type' => 'title', 'desc' => __( 'Endpoints are appended to your page URLs to handle specific actions during the checkout process. They should be unique.', 'woocommerce' ), 'id' => 'account_endpoint_options' ),array( 'title' => __( 'Pay', 'woocommerce' ), 'desc' => __( 'Endpoint for the "Checkout → Pay" page.', 'woocommerce' ), 'id' => 'woocommerce_checkout_pay_endpoint', 'type' => 'text', 'default' => 'order-pay', 'desc_tip' => true, ),array( 'title' => __( 'Order received', 'woocommerce' ), 'desc' => __( 'Endpoint for the "Checkout → Order received" page.', 'woocommerce' ), 'id' => 'woocommerce_checkout_order_received_endpoint', 'type' => 'text', 'default' => 'order-received', 'desc_tip' => true, ),array( 'title' => __( 'Add payment method', 'woocommerce' ), 'desc' => __( 'Endpoint for the "Checkout → Add payment method" page.', 'woocommerce' ), 'id' => 'woocommerce_myaccount_add_payment_method_endpoint', 'type' => 'text', 'default' => 'add-payment-method', 'desc_tip' => true, ),array( 'title' => __( 'Delete payment method', 'woocommerce' ), 'desc' => __( 'Endpoint for the delete payment method page.', 'woocommerce' ), 'id' => 'woocommerce_myaccount_delete_payment_method_endpoint', 'type' => 'text', 'default' => 'delete-payment-method', 'desc_tip' => true, ),array( 'title' => __( 'Set default payment method', 'woocommerce' ), 'desc' => __( 'Endpoint for the setting a default payment method page.', 'woocommerce' ), 'id' => 'woocommerce_myaccount_set_default_payment_method_endpoint', 'type' => 'text', 'default' => 'set-default-payment-method', 'desc_tip' => true, ),array( 'type' => 'sectionend', 'id' => 'checkout_endpoint_options', ),array( 'title' => __( 'Payment gateways', 'woocommerce' ), 'desc' => __( 'Installed gateways are listed below. Drag and drop gateways to control their display order on the frontend.', 'woocommerce' ), 'type' => 'title', 'id' => 'payment_gateways_options', ),array( 'type' => 'payment_gateways', ),array( 'type' => 'sectionend', 'id' => 'payment_gateways_options', ),)
The array.

Usage

To run the hook, copy the example below.
  1. $array = apply_filters( 'woocommerce_payment_gateways_settings', $array ); 
  2.  
  3. if ( !empty( $array ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the woocommerce_payment_gateways_settings callback 
  2. function filter_woocommerce_payment_gateways_settings( $array ) { 
  3. // make filter magic happen here... 
  4. return $array
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_payment_gateways_settings', 'filter_woocommerce_payment_gateways_settings', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_payment_gateways_settings', 'filter_woocommerce_payment_gateways_settings', 10, 1 ); 

Defined (1)

The filter is defined in the following location(s).

/includes/admin/settings/class-wc-settings-checkout.php  
  1. $settings = apply_filters( 'woocommerce_payment_gateways_settings', array(