• Resolved Vlad Ilie

    (@vladwtz)


    Hello,

    I have a problem with the amount attribute of the cards that are getting duplicated. You can replicate the issue on a new fresh WordPress, WooCommerce installation by following the steps below:

    1. Create a product of type PW Gift Card.
    2. Add one or more amounts in the Gift Card tab.
    3. Publish the product.
    4. Go to Attributes and rename the “Gift Card Amount” attribute to anything else.
    5. Save the product (not the attributes).
    6. Now go back to the Attributes and you’ll see 2 of them: the first one you renamed and a new one named “Gift Card Amount”

    How could I fix this behavior? (it’s the same on the Pro version)

    Versions:
    WordPress: 6.6.2
    WooCommerce: 9.3.3
    PHP: 8.1.29
    PW WooCommerce Gift Cards: 2.3

    Thank you,
    Vlad

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author pimwick

    (@pimwick)

    The attribute name is defined in the plugin so that it will match and still allow other attributes. Follow these steps to change the “Gift Card Amount” attribute name:

    1. Log into your FTP site and edit wp-config.php
    2. Edit wp-config.php and scroll to the end and add the following bit of code:

    Scroll towards the bottom, and before the line that says “stop editing” add this code ABOVE that line (translate as needed):

    define( 'PWGC_DENOMINATION_ATTRIBUTE_NAME', 'Gift Card Amount' );

    /* That's all, stop editing */
    1. Save the wp-config.php file and re-upload it to your server.
    2. Edit the PW Gift Card product and change the attribute name to match then save the product.

    Let me know if you have any questions!

    Thread Starter Vlad Ilie

    (@vladwtz)

    Hello,

    Thank you for your response!

    I have added the constant in the wp-config.php file but the behavior is the same, when I click on the “Update” button on the edit product page, the attribute “Gift Card Amount” is added under my existing attribute.

    Regards,
    Vlad

    Plugin Author pimwick

    (@pimwick)

    Try moving the gift card product to the Trash. Then click on Pimwick Plugins > PW Gift Cards > Create Gift Card Product (this button will only appear if the gift card product doesn’t already exist). This will create an entirely new product and as long as you put the PWGC_DENOMINATION_ATTRIBUTE_NAME value above the “happy blogging” comment then it should utilize the new name.

    Plugin Author pimwick

    (@pimwick)

    I’m marking this thread as Resolved since we haven’t heard back. Let us know if you need further help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.