• Resolved Webbureau.dk

    (@twolle)


    I am using 3 renewing options, and would like option in the top to be preselected. Is that possible?

    Right now none of them are selected, and some of my test-customers couldn’t figure out where to click in order to renew.

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    You can do this by adding the code below to your theme functions.php file

    
    add_filter( "adverts_form_load", "select_default_renewal" );
    function select_default_renewal( $form ) {
        if( $form["name"] != "advert-renew" ) {
            return $form;
        }
        foreach( $form["field"] as $key => $field) {
            if( $field["name"] == "payments_listing_type" ) {
                $form["field"][$key]["value"] = 1000;
            }
        }
        return $form;
    }
    

    Just replace 1000 with actual ID of renewal pricing you would like to use as a default.

    Thread Starter Webbureau.dk

    (@twolle)

    Hi Greg,

    After I bought add-on WooCommerce, then there is no preselection for new ad + renewal.

    Do I need some new code?

    Plugin Author Greg Winiarski

    (@gwin)

    Hi, if you have WC Integration installed please go to wp-admin / Products panel and add or edit a product, now in “Product Data” you should have an option “Renew Listing (WPAdverts)”, this you should be able to use for renewals.

    Thread Starter Webbureau.dk

    (@twolle)

    I am using your options, however no preselection appears on the frontend.

    Take a look yourself..
    https://onlinekursus.dk/onlinekurser-og-onlineuddannelser/add/

    Plugin Author Greg Winiarski

    (@gwin)

    Hmm it is possible we are talking about different things :). In the WooCommerce integration you can create Adverts Pricing and Adverts Renewal pricings, the Pricings are being used in [adverts_add] shortcode, the renewals are being used in [adverts_manage] (after clicking “More” / “Renew”).

    On the [adverts_add] the renewal options do not show at all.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Renewing options’ is closed to new replies.