skip to Main Content

Picture – woocommerceI can’t find the proper solution to eliminate the "or" between the available payment options (marked in the picture). Probably the easiest way is to hide it via CSS code, but since I lack knowledge in this field I ask for anyone’s help… Any help or advice or source of knowledge where I could learn this thing by myself – I would appreciate it.

I went through whole Woocommerce settings and Stripe settings – couldn’t find a place where I could get rid of my problem.

3

Answers


  1. Chosen as BEST ANSWER

    [F12 - Inspection Code][1] [1]: https://i.sstatic.net/YFVJ30Px.png

    Here is this code that is responsible or showing "or". It is connected with stripe. {display:none} could work for that?


  2. I do not see a picture but what you can do is :

    1)Check in what class the or paragraph is in
    (e.g ) via the Inspect tool or F12.

    2)go to your Appearance -> Custom css.

    3)Add a display:none to that class in the end of your file and save.
    (e.g .woo-wrapper-choice{display:none}

    There is probably a way to do this using php with hook so it won’t generate at all but I cannot check the functions right now.

    Login or Signup to reply.
  3. You can achieve this via template modification and/or, as you mentioned, through CSS using display: none;. However, for the CSS solution, the "or" string must be wrapped inside an HTML tag like <p>, <span> or <div>.

    In example:

    <div class="payment-methods">
     <div>Amazon-Checkout</div>
     <div>or</div>
     <div>Proceed to Checkout</div>
    </div>
    

    The CSS would be here:

    .payment-methods > div:nth-child(2) { display: none; }
    

    You can use a Custom CSS plugin for have custom styling, or even better modify the style.css of your theme´s child theme. More informations about child themes you can find here: https://wordpress.com/support/themes/child-themes/

    Plugin Custom CSS: https://wordpress.org/plugins/custom-css-js/

    Template-Override Method:

    To check if any template overrides exist for the checkout process in your theme, navigate to:

    wp-content/themes/youractivetheme/woocommerce/
    

    Look for a file that overrides the default WooCommerce template for checkout. The file should be either:

    checkout/payment.php
    

    or

    checkout/payment-method.php
    

    or if your payment methods are shown in cart then look also under

    cart/*.php
    

    If you don’t have any template overrides, you can create one yourself. Follow these steps:

    1. Navigate to the default WooCommerce template directory:

      wp-content/plugins/woocommerce/templates

    2. Copy the checkout or/and cart directory (or the specific file you want to override) into your theme. For example:

      wp-content/themes/youractivethemeschild/woocommerce/checkout

      wp-content/themes/youractivetheme/woocommerce/cart

    3. You can now make changes in the copied files. These changes will override the default WooCommerce templates while keeping the original files intact.

    Detailed informations you can find here: https://developer.woocommerce.com/docs/template-structure-overriding-templates-via-a-theme/

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search