Adjust the text below returning customer - php

I want to change the text at the checkout page below the returning customer bar, namely "If you have shopped with us before, please enter your details below. If you are a new customer, please proceed to the Billing & Shipping section.".
The text seems to be present in: plugins\woocommerce\i18n\languages\woocommerce.pot
and plugins\woocommerce\templates\checkout\form-login.php
I know I can simply adjust the text in those files; but if WooCommerce gets updated it will be overwritten.
Is there a way to change this text with hooks, although the text doesn't appear in my theme?
I don't want to use a plugin for this if possible.

When Overriding Woocommerce templates via a child theme (or a theme) you will not loose any changes when Woocommerce plugin is updated.
So in your case, as explained on the comment of the template checkout\form-login.php you will have to copy this file to your child theme:
/**
* Checkout login form
*
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-login.php.
Woocommerce templates are made to be overridden via a child theme (or theme)
See: WooCommerce action hooks and overriding templates

While working on a custom theme, you can achieve this functionality by copying same template to your-theme/woocommerce/checkout/form-login.php.
Now you can update plugin without losing the changes.

Related

I want to configure the subscription endpoint located in my account page of woocommerce?

What i want is to edit a subscription in my account page of woocommerce. i have shared a picture below, of what exactly I want to edit.
This is the link of picture, what i want to edit is highlighted with red pen:
I want to edit the things which are highlighted with red pen. but i am unable to locate the exact page of this where i can edit things.
actually i want to change the link of update button in subscription table.
the URL of the page is like :
https://www.example.com/my-account/subscriptions/
There is no subscription page in pages menu of wordpress.
I am also unable to see this in endpoint of woocommerce.
Is there any way to do it ?
First have a look to that: Template structure & Overriding templates via a theme… It explains how to override correctly woocommerce templates via your active theme.
The templates that you will override have to be located in woocommerce folder inside your theme folder…
Now in the woocommerce-subscriptions plugin folder, you have also a template folder, and you can pick the necessary templates that you need to change, copying them into that woocommerce folder located in your theme, taking care to keep path (subfolder hierarchy)…
So you will copy from: wp-content/plugins/woocommerce-subscriptions/templates/myaccount(5 files inside)… to wp-content/themes/your-theme/woocommerce/myaccount (where your-theme is the folder name of your theme)…
Now you can edit templates just like the woocommerce ones…
The subscription end point is not listed in woocommerce as it's not a default end point
To rename the menu label for "Subscriptions", you can use this:
add_filter( 'woocommerce_account_menu_items', 'rename_my_account_menu_items', 0, 15 );
function rename_my_account_menu_items( $items ) {
// HERE set your new label name for subscriptions
$items['subscriptions'] = __( 'Custom label', 'woocommerce' );
return $items;
}
The code goes on function.php file of your active child theme (or theme) or in any plugin file.
Tested and working

Wordpress - Modify WooCommerce Germanized Template

I'm working with WooCommerce including the WooCommerzce Germanized Plugin.
The Plugin changes a lot of WooCommerce to make it safe for usage in Germany.
Now I need to modify a template file of the plugin. Whats the best way to make the changes? I don't want to modify the template itself to keep it safe for updates.
In order to override any WooCommerce plugin template you should create a folder in your active theme named after the plugin you are going to modify. Then follow the template folders structure ignoring just the folder templates and copy the desired file there.
For example, I needed to modify the WooCommerce Germanized Pro template based in /plugins/woocommerce-germanized-pro/templates/checkout/multistep/data.php. To modify it I have copied it to my theme: /themename/woocommerce-germanized-pro/checkout/multistep/data.php -- this way it will override an original template file.
Good luck!

Add a text link to WooCommerce Checkout page

I am using WooCommerce on a wordpress installation. I have also purchased the plugin woocommerce-checkout-field-editor-pro to create custom fields on the checkout form.
My problem is, while the WooCommerce Checkout Field Editor Pro plugin is great, it does not allow me to just add a text link. It allows a label, but no way of making that label a link.
If I can just figure out where the custom label field gets stored when its created I am thinking I can just wrap it in an <a href > tag to turn it into a hyper link. But I can't figure out where the field is stored. Any help would be greatly appreciated.
Thanks!
A few template files make up the checkout page and can be found in:
wp-content/plugins/woocommerce/templates/checkout
The files which may be of most interest to you could be either form-checkout.php or review order.php.
Inside your own theme folder, create a folder called woocommerce and copy across any files you want to edit, making sure to place them inside the exact folder structure they are kept within Woocommerce. So in this case, copy the files to your_theme/woocommerce/templates/checkout/. Any changes made to these files will override the original template.
You can edit the templates and add, or remove, any code as you need to.

Avada & WooCommerce - Edit Checkout Fields

I'm using the 3.9.3 version of Avada and the 2.5.5 version of WooCommerce.
How can I edit the fields that are in the checkout page?
I want to auto compile the email field with a saved cookie and make the email input readonly.
Is it possible? What files I need to edit?
Thanks.
You can do that in woocommerce templates (and also with some hooks).
For templates files, they are located in your woocommerce folder. You have to copy this templates directory inside your active theme (or child theme) and rename it woocommerce (if don't exist yet).
Inside the new directory woocommerce located in your active theme, go to checkout subfolder and you will find related php files, that you can edit to fit your needs.
After that if you need a specific hook, you can search in here (or post a related question, if it doesn't exist yet). Here you can fin an example of hook…

Wordpress WooCommerce Product Page Template

I just setup WooCommerce on my wordpress site:
http://artendijen.com/product/test-product/
I am not a fan of the template where it has the description and additional information below and in tabs, I would like the have the description and additional information to the right of the product image. Is there a setting I missed or will I have to edit it via CSS myself?
There is no setting for layout in WooCommerce. If you can do what you need to do with CSS then thats great. Otherwise, you will need to use hooks and actions in your functions.php to move things around. You can also overwrite woocommerce template files by copying them to your template with the same structure and file names you find in the WooCommerce plugin.
http://docs.woothemes.com/document/introduction-to-hooks-actions-and-filters/

Categories