WPC Buy Now Button for WooCommerce 2.2.6 has 0 actions and 19 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Change a value WPC Buy Now Button for WooCommerce is about to use
add_filter( 'wpc_admin_nav_items', function( $nav_items, $active_page ) {
// Change $nav_items here.
return $nav_items;
}, 10, 2 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
wpcbn_is_valid_product
filterapply_filters( 'wpcbn_is_valid_product', false, $product, $context ); -
apply_filters( 'wpcbn_button_position_archive', self::get_setting( 'button_position_archive', 'after_add_to_cart' ) ); -
wpcbn_button_position_single
filterapply_filters( 'wpcbn_button_position_single', self::get_setting( 'button_position_single', 'after_add_to_cart' ) ); -
wpcbn_redirect
filterapply_filters( 'wpcbn_redirect', self::get_setting( 'redirect', 'checkout' ) ); -
wpcbn_btn_archive
filterapply_filters( 'wpcbn_btn_archive', $output, $attrs ); -
wpcbn_btn_archive_class
filterapply_filters( 'wpcbn_btn_archive_class', 'wpcbn-btn wpcbn-btn-archive button product_type_simple add_to_cart_button', $attrs ); -
wpcbn_btn_archive_text
filterapply_filters( 'wpcbn_btn_archive_text', self::localization( 'button_text', esc_html__( 'Buy now', 'wpc-buy-now-button' ) ), $attrs ); -
wpcbn_btn_single
filterapply_filters( 'wpcbn_btn_single', $output, $attrs ); -
wpcbn_btn_single_class
filterapply_filters( 'wpcbn_btn_single_class', 'wpcbn-btn wpcbn-btn-single wpcbn-btn-' . $product->get_type() . ' single_add_to_cart_button button alt', $attrs ); -
wpcbn_btn_single_text
filterapply_filters( 'wpcbn_btn_single_text', self::localization( 'button_text', esc_html__( 'Buy now', 'wpc-buy-now-button' ) ), $attrs ); -
wpcbn_disable_nonce_check
filterapply_filters( 'wpcbn_disable_nonce_check', false, 'handle_buy_now' ); -
wpcbn_disable_security_check
filterapply_filters( 'wpcbn_disable_security_check', $check, $context ); -
wpcbn_get_setting
filterapply_filters( 'wpcbn_get_setting', $setting, $name, $default ); -
wpcbn_get_settings
filterapply_filters( 'wpcbn_get_settings', self::$settings ); -
wpcbn_localization_{$key}
filterapply_filters( "wpcbn_localization_{$key}", $str ); -
wpcbn_parameter
filterapply_filters( 'wpcbn_parameter', ( ! empty( self::$param ) ? sanitize_title( self::$param ) : 'buy-now' ) ); -
wpcbn_redirect_url
filterapply_filters( 'wpcbn_redirect_url', $redirect ); -
wpcbn_vars
filterapply_filters( 'wpcbn_vars', [ 'nonce' => wp_create_nonce( 'wpcbn-security' ), 'wc_ajax_url' => WC_AJAX::get_endpoint( '%%endpoint%%' ), 'woofc' => self::get_setting( 'redirect', 'checkout' ) === 'woofc', 'instant_checkout' => self::get_setting( 'redirect', 'checkout' ) === 'instant_checkout', 'perfect_scrollbar' => self::get_setting( 'perfect_scrollbar', 'yes' ) === 'yes', 'wc_checkout_js' => defined( 'WC_PLUGIN_FILE' ) ?... );
Generated from WPC Buy Now Button for WooCommerce's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Can't find the right hook?
We can build the customisation for you. Describe what you need: