Editing Shipping Labels Marketpress

Hi, I'd like to edit 3 labels on the shipping page State/Province/Region: to State: & Postal/Zip Code:* to Post Code: and Special Instructions to something shorter.
is there a filter I can add to my functions.php file.

Main reason it to tighten up the table for use on mobile devices, the right side of the table sits off the edge. Is there a way to edit the table so the left side (labels are taking on say 15 or 20% width)
I'm still using v2.9.xx as all previous attempts have caused massive conflicts to the point where the site does not work, have had several failed attempts to fix via your support without luck.

Same applies on https://licensedsportsmemorabilia.com.au/ as well as https://ultimatesportsmemorabilia.com.au/

Hope I can get some help soon.

  • Rupok

    Hi Karen, hope you had a wonderful day.

    Hi, I'd like to edit 3 labels on the shipping page

    You can easily do that by creating a MU Plugin. For creating a mu plugin, create a folder named "mu-plugins" inside your "wp-content" folder. Then inside that "mu-plugins" folder, create a file with any name and with a .php extension. Now paste the code inside that file and save.

    <?php
    add_action( 'wp_footer', 'replace_shipping_labels' );
    function replace_shipping_labels() {
        ?>
        <script type="text/javascript">
          jQuery(document).ready(function() {
            jQuery(".mp_cart_shipping > tbody > tr > td:contains('State/Province/Region:')").html("State:");
            jQuery(".mp_cart_shipping > tbody > tr > td:contains('Postal/Zip Code:*')").html("Post Code:");
            jQuery(".mp_cart_shipping > tbody > tr > td:contains('Special Instructions:')").html("Info:");
          });
        </script>
        <?php
    }

    Code is not complex. You can simply add a line for replacing more words in this shipping box in the same format like this:
    jQuery(".mp_cart_shipping > tbody > tr > td:contains('Words to Find')").html("Replace With This");
    For getting more idea on mu plugins, you can go through this article: http://premium.wpmudev.org/manuals/wpmu-manual-2/using-mu-plugins/

    Is there a way to edit the table so the left side (labels are taking on say 15 or 20% width)

    You can do this with the following custom CSS Code:

    .mp_cart_shipping > tbody > tr > td {
      width: 10%;
    }

    You can add this to a theme's stylesheet, in a child theme, or using a plugin like My Custom CSS.

    Please let us know if you have any confusion. We will be glad to help.

    Have a nice day. Cheers!
    Rupok

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.