PluginProbe
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce / 3.3.0
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce v3.3.0
3.3.0 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.1 trunk 1.0.4 1.1.0 1.1.0.1 1.1.1 1.1.10 1.1.11 1.1.12 1.1.13 1.1.14 1.1.15 1.1.16 1.1.17 1.1.18 1.1.19 1.1.2 All 162 releases
← All changes | admin-core/ajax/steps.php +7 -1 3.1.4 → 3.3.0 View file →
@@ -433,9 +433,9 @@
433 433 $step_type = wcf()->utils->get_step_type( $step_id );
434 434
435 435 $post_meta = AdminHelper::get_step_default_meta( $step_type, $step_id );
436 436
437 - MetaOps::save_meta_fields( $step_id, $post_meta, 'cartflows_save_meta_settings' );
437 + $skipped_fields = MetaOps::save_meta_fields( $step_id, $post_meta, 'cartflows_save_meta_settings' );
438 438
439 439 // We are storing the step dynamic css in the post meta and deleting when any setting changes. Once deleted it will be regenerated with first page load.
440 440 delete_post_meta( $step_id, 'wcf-dynamic-css' );
441 441
@@ -453,8 +453,14 @@
453 453 'step_view_url' => get_the_permalink( $step_id ),
454 454 /* translators: %s flow id */
455 455 'text' => sprintf( __( 'Data saved successfully for step id %s', 'cartflows' ), $step_id ),
456 456 );
457 +
458 + // Name anything the save dropped rather than reporting a clean save the user did not get.
459 + if ( ! empty( $skipped_fields ) ) {
460 + $result['skipped_fields'] = $skipped_fields;
461 + $result['text'] = __( 'Saved, but the custom script fields were not updated because your account cannot edit scripts.', 'cartflows' );
462 + }
457 463
458 464 wp_send_json( $result );
459 465 }
460 466