Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
feat(compat): share goal progress across multiple forms using WPML #2883
Common donation goal for multiple languages.
Option that enables common goal for multiple languages. So that it sums donations across languages.
Currently we can make separate goals for each language with same donation goal amount.
I've debugged a bit and it would be great if there was an option that updates _give_form_sales and _give_form_earnings in your custom tables.
For WPML you can use this hook to get translated form ID: https://wpml.org/wpml-hook/wpml_object_id/
Hi @vukvukovich thanks for the issue. If I understand correctly you have a separate form for each language but want to display progress towards a common goal.
We have an open issue for a
@vukvukovich Our current implementation has been merged into the Give 2.1.0 release. Here's how it works. You define your overall goal in the shortcode and the forms that you want to include in the calculation. The shortcode will add the totals of the forms you've defined and output the total goal progress.
You can also pass in categories or tags if you want it to be a bit more dynamic. We're documenting the shortcode now, but you can see the available attributes here: https://github.com/WordImpress/Give/blob/issue/2943/includes/shortcodes.php#L548-L692
This will be available when 2.1.0 releases in the near future. I'm going to close this out in the meantime. Cheers.