-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
595 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 11 additions & 8 deletions
19
src/DonorDashboards/resources/js/app/components/subscription-cancel-modal/utils/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
import {donorDashboardApi} from '../../../utils'; | ||
import {fetchSubscriptionsDataFromAPI} from '../../../tabs/recurring-donations/utils'; | ||
|
||
export const cancelSubscriptionWithAPI = (id) => { | ||
return donorDashboardApi | ||
.post( | ||
export const cancelSubscriptionWithAPI = async (id) => { | ||
try { | ||
const response = await donorDashboardApi.post( | ||
'recurring-donations/subscription/cancel', | ||
{ | ||
id: id, | ||
}, | ||
{} | ||
) | ||
.then(async (response) => { | ||
await fetchSubscriptionsDataFromAPI(); | ||
return response; | ||
}); | ||
); | ||
|
||
await fetchSubscriptionsDataFromAPI(); | ||
|
||
return await response; | ||
} catch (error) { | ||
return error.response; | ||
} | ||
}; |
21 changes: 21 additions & 0 deletions
21
src/Framework/DesignSystem/Actions/RegisterDesignSystemStyles.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace Give\Framework\DesignSystem\Actions; | ||
|
||
class RegisterDesignSystemStyles | ||
{ | ||
/** | ||
* @since 2.26.0 | ||
*/ | ||
public function __invoke() | ||
{ | ||
$version = file_get_contents(GIVE_PLUGIN_DIR . 'assets/dist/css/design-system/version'); | ||
|
||
wp_register_style( | ||
'givewp-design-system-foundation', | ||
GIVE_PLUGIN_URL . 'assets/dist/css/design-system/foundation.css', | ||
[], | ||
$version | ||
); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/Framework/DesignSystem/DesignSystemServiceProvider.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace Give\Framework\DesignSystem; | ||
|
||
use Give\Framework\DesignSystem\Actions\RegisterDesignSystemStyles; | ||
use Give\Helpers\Hooks; | ||
use Give\ServiceProviders\ServiceProvider; | ||
|
||
class DesignSystemServiceProvider implements ServiceProvider | ||
{ | ||
/** | ||
* @since 2.26.0 | ||
*/ | ||
public function register() | ||
{ | ||
} | ||
|
||
/** | ||
* @since 2.26.0 | ||
*/ | ||
public function boot() | ||
{ | ||
Hooks::addAction('wp_enqueue_scripts', RegisterDesignSystemStyles::class); | ||
Hooks::addAction('admin_enqueue_scripts', RegisterDesignSystemStyles::class); | ||
} | ||
} |
Oops, something went wrong.