WPC Buy Now Button for WooCommerce icon
eCommerce & WooCommerce

WPC Buy Now Button for WooCommerce hooks reference

  • By WPClever
  • v2.2.6
  • Updated

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.

functions.phpyour child theme
// 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

  • includes/wpc-core/class-wpc-dashboard.php line 66
    /**
     * Filter the WPClever admin nav items.
     */
    apply_filters( 'wpc_admin_nav_items', $nav_items, $active_page );
  • wpc-buy-now-button.php line 242 · used in 4 places
    apply_filters( 'wpcbn_is_valid_product', false, $product, $context );
  • wpc-buy-now-button.php line 80 · used in 2 places
    apply_filters( 'wpcbn_button_position_archive', self::get_setting( 'button_position_archive', 'after_add_to_cart' ) );
  • wpc-buy-now-button.php line 101 · used in 2 places
    apply_filters( 'wpcbn_button_position_single', self::get_setting( 'button_position_single', 'after_add_to_cart' ) );
  • wpc-buy-now-button.php line 207 · used in 2 places
    apply_filters( 'wpcbn_redirect', self::get_setting( 'redirect', 'checkout' ) );
  • wpc-buy-now-button.php line 211
    apply_filters( 'wpcbn_btn_archive', $output, $attrs );
  • wpc-buy-now-button.php line 206
    apply_filters( 'wpcbn_btn_archive_class', 'wpcbn-btn wpcbn-btn-archive button product_type_simple add_to_cart_button', $attrs );
  • wpc-buy-now-button.php line 205
    apply_filters( 'wpcbn_btn_archive_text', self::localization( 'button_text', esc_html__( 'Buy now', 'wpc-buy-now-button' ) ), $attrs );
  • wpc-buy-now-button.php line 236
    apply_filters( 'wpcbn_btn_single', $output, $attrs );
  • wpc-buy-now-button.php line 230
    apply_filters( 'wpcbn_btn_single_class', 'wpcbn-btn wpcbn-btn-single wpcbn-btn-' . $product->get_type() . ' single_add_to_cart_button button alt', $attrs );
  • wpc-buy-now-button.php line 229
    apply_filters( 'wpcbn_btn_single_text', self::localization( 'button_text', esc_html__( 'Buy now', 'wpc-buy-now-button' ) ), $attrs );
  • wpc-buy-now-button.php line 708
    apply_filters( 'wpcbn_disable_nonce_check', false, 'handle_buy_now' );
  • wpc-buy-now-button.php line 124
    apply_filters( 'wpcbn_disable_security_check', $check, $context );
  • wpc-buy-now-button.php line 143
    apply_filters( 'wpcbn_get_setting', $setting, $name, $default );
  • wpc-buy-now-button.php line 129
    apply_filters( 'wpcbn_get_settings', self::$settings );
  • wpc-buy-now-button.php line 155
    apply_filters( "wpcbn_localization_{$key}", $str );
  • wpc-buy-now-button.php line 161
    apply_filters( 'wpcbn_parameter', ( ! empty( self::$param ) ? sanitize_title( self::$param ) : 'buy-now' ) );
  • wpc-buy-now-button.php line 778
    apply_filters( 'wpcbn_redirect_url', $redirect );
  • wpcbn_vars

    filter
    wpc-buy-now-button.php line 171
    apply_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: