woocommerce_admin_allowed_promo_notes
Filter allowed promo notes for experimental-activate-promo.
Usage
add_filter( 'woocommerce_admin_allowed_promo_notes', 'wp_kama_woocommerce_admin_allowed_promo_notes_filter' );
/**
* Function for `woocommerce_admin_allowed_promo_notes` filter-hook.
*
* @param array $promo_notes Array of allowed promo notes.
*
* @return array
*/
function wp_kama_woocommerce_admin_allowed_promo_notes_filter( $promo_notes ){
// filter...
return $promo_notes;
}
- $promo_notes(array)
- Array of allowed promo notes.
Changelog
| Since 7.8.0 | Introduced. |
Where the hook is called
woocommerce_admin_allowed_promo_notes
woocommerce/src/Admin/API/Notes.php 445
$allowed_promo_notes = apply_filters( 'woocommerce_admin_allowed_promo_notes', [] );
Where the hook is used in WooCommerce
woocommerce/src/Internal/Admin/Settings/PaymentsController.php 39
add_filter( 'woocommerce_admin_allowed_promo_notes', array( $this, 'add_allowed_promo_notes' ) );