Options and Configuration ↑ Back to Top
Purchases:
- Enabled – No changes to the way your store functions.
- Disabled – No purchases allowed for anyone. This setting disables all add to cart functionality, and optionally replaces the Add To Cart button text with what you enter a value for Catalog Add to Cart Button Text.
- Enabled for Logged In Users: Same as Disabled, however, only applies when a user is not authenticated.
Prices:
- Enabled – No changes to the way your store functions.
- Disabled – Disables all prices in the store. Disables prices for users who are not authenticated, and optionally displays the contents of the Catalog Price Text in place of the products price.
- Enabled for Logged in Users – Disables prices for users who are not authenticated, and optionally displays the contents of the Catalog Price Text in place of the products price.
- *note: When prices are disabled, or enabled only for authenticated users, add-to-cart functionality is automatically disabled.
Catalog Add to Cart Button Text:
- Optional text to display in place of the add to cart button when purchases are disabled, or enabled only for logged in users.
You can optionally use the filter catalog_visibility_alternate_add_to_cart_buttonĀ to insert any content you require. Example:
add_filter('catalog_visibility_alternate_add_to_cart_button', 'my_alternate_button', 10, 1);
function my_alternate_button($content) {
return 'My Alternate Content';
}
Catalog Price Text:
- Optional text to display in place of the price when prices are disabled, or enabled only for logged in users.
You can optionally use the filterĀ catalog_visibility_alternate_price_html to insert any content you require. Filter Example:
add_filter('catalog_visibility_alternate_price_html', 'my_alternate_price_text', 10, 1);
function my_alternate_price_text($content) {
return 'My Alternate Content';
}
Alternate Content:
Optional content that will be used on the single product details page when prices or purchases are disabled or enabled only for logged on users. Useful for displaying ordering details, or a logon form if requiring user authentication before sales are allowed.
Shortcodes ↑ Back to Top
Includes shortcodes for use when building alternate catalog prices, alternate add to cart buttons, and additional single product details.
[woocommerce_logon_link]
Uses:
[woocommerce_logon_link]
[woocommerce_logon_link]Custom Login Text[/woocommerce_logon_link]
[woocommerce_register_link]
Uses:
[woocommerce_register_link]
[woocommerce_register_link]Custom Registration Text[/woocommerce_register_link]
[woocommerce_forgot_password_link]
Uses:
[woocommerce_forgot_password_link]
[woocommerce_forgot_password_link]Custom Registration Text[/woocommerce_forgot_password_link]
[woocommerce_logon_form]
Uses:
[woocommerce_logon_form]
Examples ↑ Back to Top
Alternate Catalog Price Text:
[woocommerce_logon_link]Login[/woocommerce_logon_link] or [woocommerce_register_link] Register [/woocommerce_register_link]
Alternate Content:
To add items to your cart and to view your prices please login below. If you do not have account you can [woocommerce_register_link] and start shopping with us.’
[woocommerce_logon_form]
