cipf added new class for when state is not buying a new card at 5€
This commit is contained in:
@@ -4,7 +4,7 @@ Plugin Name: hggg_cipf
|
||||
Plugin URI:
|
||||
Description:
|
||||
Author: hugogogo
|
||||
Version: 0.5.11.3
|
||||
Version: 0.5.12
|
||||
Author URI:
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
|
||||
/*
|
||||
* use this class when you want to only pay a physical new plastic card
|
||||
* otherwise use the class 'payer_carte'
|
||||
*
|
||||
*/
|
||||
[class*='cipf_display_'].cipf_display_changer_carte { display: block !important; }
|
||||
[class*='cipf_display_'].cipf_display_changer_carte.cipf_flex { display: flex !important; }
|
||||
|
||||
9
plugins/cipf_plugin/css/display_states/carte_payer.css
Normal file
9
plugins/cipf_plugin/css/display_states/carte_payer.css
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
/*
|
||||
* use this class when you dont want to pay a physical new plastic card
|
||||
* otherwise use the class 'changer_carte'
|
||||
*
|
||||
*/
|
||||
[class*='cipf_display_'].cipf_display_payer_carte { display: block !important; }
|
||||
[class*='cipf_display_'].cipf_display_payer_carte.cipf_flex { display: flex !important; }
|
||||
|
||||
@@ -97,7 +97,10 @@ function display_states_css_CIPF($user_id = null) {
|
||||
*
|
||||
*/
|
||||
if (is_acf_prof_change_card_CIPF($user_id)) {
|
||||
$css_for_states[] = 'css/display_states/changer_carte.css';
|
||||
$css_for_states[] = 'css/display_states/carte_changer.css';
|
||||
}
|
||||
else {
|
||||
$css_for_states[] = 'css/display_states/carte_payer.css';
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -34,8 +34,9 @@ function handle_orders_request_CIPF($request_data) {
|
||||
*/
|
||||
try {
|
||||
$can_pay = check_can_pay_CIPF();
|
||||
if (is_wp_error($can_pay))
|
||||
if (is_wp_error($can_pay)) {
|
||||
throw new HttpException('not allowed to pay : ' . $can_pay->get_error_message(), 403);
|
||||
}
|
||||
|
||||
$order_response = create_order_CIPF();
|
||||
$json_response = $order_response['json_response'];
|
||||
|
||||
Reference in New Issue
Block a user