You miss the required remove_action()
parameter — the name of the function to remove. See the Code Reference.
<?php
add_action( 'woocommerce_login_form', 'woocom_extra_register_fields' );
function woocom_extra_register_fields () {
if ( is_page( 'installation' ) ) {
remove_action( 'woocommerce_login_form', 'woocom_extra_register_fields', 10 ); // note this
}
}
I suspect the code you’ve posted is not complete, so, adding the action to remove the action itself looks odd. Simplify things to avoid superfluous operations:
<?php
add_action( 'woocommerce_login_form', 'woocom_extra_register_fields' );
function woocom_extra_register_fields () {
// check you are NOT on the 'installation' page
if ( ! is_page( 'installation' ) ) {
// do your extra fields here
}
}
Related Posts:
- get woocommerce My account page link
- Where do the cart details are stored in database?
- Menu not show woocommerce product category
- What is the right hook to use in WooCommerce for handling the post of the sale price?
- Fetch Product information in WooCommerce
- New endpoint in my account gives 404 Error Woocommerce 3.6.5 and WP 5.2.2
- Add Custom CSS to Woocommerce Product Page in a specified category
- In WooCommerce filter the available Payment Methods by User Role [closed]
- Add Additional “Checkout” button next to “Add to cart” button in woocommerce product page
- wc_get_product in a none woocommerce page
- WP WPQuery, not running properly in WP CLI
- How to get all products from an order including variations via SQL query?
- How to echo billing phone number under My Account in Woocommerce? [closed]
- Unknow php file in wordpress core [closed]
- woocommerce_get_price filter hook not working for product variation price
- WooCommerce shipping – Different product different shipping? [closed]
- Remove action added through function
- Filter get_adjacent_post to follow woocommerce product category
- Run function on “Place Order” [closed]
- Stop WooCommerce from updating user/user meta after checkout
- Displaying Custom Input Value to Customer Order Details (My Account) page in Woocommerce
- Get rid of product images mobile swipe functionality from WooCommerce single product [closed]
- Add custom order meta to Order Completed email
- Hiding products with a specific tag from WooCommerce main shop page
- How to upload Woocommerce product images via API? [closed]
- how to do a processing Orders into Complete after x Minutes or x hour in WooCommerce [closed]
- show content of a page built using yootheme builder on different page/template
- How to detect if this post is a woocommerce product?
- Set a custom field to all orders
- Force User Registration before visitng Checkout Page
- Complex price options. Am I stuck with 180 variations?
- Tax Query for custom Taxonomy field
- Improve WooCommerce checkout process [closed]
- How can I put the contents of My Account > Order into a separate page, Woocommerce
- WooCommerce Cart URL bug
- Do I need a different product type for WooCommerce [closed]
- Feed format for woocommerce [closed]
- Convert WordPress Woocomerce product to WordPress post
- How to get woocommerce product collection in template file
- Remove ‘product’ & ‘product-cateogory’ from url – woocommerce [closed]
- How to set the meta description of a WooCommerce product as its primary category description?
- How to show notice alert only on product dashboard page?
- Retrieving Tag Name in Template Part from Filtered URL
- ajax request in wordpress
- Woocommerce product rewrite rules not working
- How to display a table below each product in product list/loop
- how to remove this image? [closed]
- Create a shortcode for native WooCommerce search form [closed]
- How disable some product features on woocomerce?
- WooCommerce – Split Multiple Items into Individual Line Items
- Change “Select Options” label in button to “Buy Now!” in store page
- How to use Custom Field to display product brief description in shop page with Woocommerce?
- Woocommerce product import exports product with price rounded to integer? [closed]
- How to hook to function of woocommerce product export _regular_price?
- porto theme pagination on woocommerce not working
- Adding preference buttons to main nav that persist via user sessions. (Woocommerce)
- Woocommerce custom log in and register
- Add “new” tag for existing products
- CallBack URL for payment gateway redirecting to homepage instead of executing callback function
- Display when items are in Woocommerce cart but hide when empty
- Printing product variation return array to string conversion error
- woocommerce deposit Form with AJAX and shortcode won’t update but add to previous output
- How to retrieve a Menu Name by Menu Location with ACF fields
- How to update permalink programmatically?
- How to get cookie value?
- Woocommerce Disabling Auto Restocking for Cancelled Orders
- Custom pagination permalink structure Product page
- Display shipping class in single product page woocommerce
- Is it ok to 301 redirect product-category pages to custom pages?
- Pseudo class :before don’t working in a specific button
- How to speed up “My Account > Orders Page” on Site with More than 200,000 orders?
- Editing product categories suddenly crashes website and goes back to wordpress installation
- ACF in WooCommerce mail template
- Woocommerce – Add custom email footer to specific email template
- WooCommerce related product – only show from primary category
- Merge “description” and “additional informations” product tab
- I need to refresh the checkout page if someone changes the zip code
- Correct method of reducing the number of images created by WP and Woo together
- add_filter not works in ajax
- How to skip woocommerce checkout after payment page? [closed]
- Product thumbnail size in catalog
- WooCommerce order created via REST – sending the date_created along
- how can i import the csv file in wordpress woocommerce.?
- some products free and some product is not free for shipping
- Get Third Level Categories WooCommerce
- Change wp-login.php? Problem with .htaccess password protection and multi user shop
- Conditional email recipient based off Shipping Method [closed]
- Save Woocomerce discount as percentage to database
- Show pop up message for specific categoryies
- How to bypass Woocommerce checkout validation from the plugin? [closed]
- Category with description and thumbnail
- How to get an Array from “select” field in advanced custom fields
- change text “free shipping” in WooCommerce [closed]
- woocommerce breadcrumb only in cart and checkout pages
- WooCommerce REST API endpoints don’t exist
- woocomrce pay here button help
- Woocommerce in a subdirectory [closed]
- Woocommerce | I want to the button ‘Add to Cart’ on the (all) product-page changed by just ‘open product’ button
- Adding line breaks in WooCommerce order processing emails
- Add second price option based on payment method at cart item price