How can I use plugin views in my WordPress theme?

I added two plugins to my WordPress theme:

  • Woocommerce
  • Lead capture capture

Lead Capture Pro is a leading generating plugin. Companies are registered and can view available offers and buy them. The login screen for companies is done through the WP-Admin login. When WooCommerce is activated in the theme, I redirect to the WooCommerce My Account page. I stopped this redirect using the following code in functions.php.

function admin_bar(){

  if(is_user_logged_in()){
    add_filter( 'show_admin_bar', '__return_true' , 1000 );
  }
}
add_action('init', 'admin_bar' );

add_filter( 'woocommerce_prevent_admin_access', '__return_false' );
add_filter( 'woocommerce_disable_admin_bar', '__return_false' );

, / . WooCommerce Lead Capture Pro . Lead Capture Pro . .

+4

Source: https://habr.com/ru/post/1677826/


All Articles