|
@@ 1325-1328 (lines=4) @@
|
| 1322 |
|
*/ |
| 1323 |
|
public function push_to_salesforce( $wordpress_object = '', $wordpress_id = '' ) { |
| 1324 |
|
$post_data = filter_input_array( INPUT_POST, FILTER_SANITIZE_STRING ); |
| 1325 |
|
if ( empty( $wordpress_object ) && empty( $wordpress_id ) ) { |
| 1326 |
|
$wordpress_object = isset( $post_data['wordpress_object'] ) ? sanitize_text_field( wp_unslash( $post_data['wordpress_object'] ) ) : ''; |
| 1327 |
|
$wordpress_id = isset( $post_data['wordpress_id'] ) ? absint( $post_data['wordpress_id'] ) : ''; |
| 1328 |
|
} |
| 1329 |
|
|
| 1330 |
|
// clarify what that variable is in this context. |
| 1331 |
|
$object_type = $wordpress_object; |
|
@@ 1360-1363 (lines=4) @@
|
| 1357 |
|
*/ |
| 1358 |
|
public function pull_from_salesforce( $salesforce_id = '', $wordpress_object = '' ) { |
| 1359 |
|
$post_data = filter_input_array( INPUT_POST, FILTER_SANITIZE_STRING ); |
| 1360 |
|
if ( empty( $wordpress_object ) && empty( $salesforce_id ) ) { |
| 1361 |
|
$wordpress_object = isset( $post_data['wordpress_object'] ) ? sanitize_text_field( wp_unslash( $post_data['wordpress_object'] ) ) : ''; |
| 1362 |
|
$salesforce_id = isset( $post_data['salesforce_id'] ) ? sanitize_text_field( wp_unslash( $post_data['salesforce_id'] ) ) : ''; |
| 1363 |
|
} |
| 1364 |
|
$type = $this->salesforce['sfapi']->get_sobject_type( $salesforce_id ); |
| 1365 |
|
$result = $this->pull->manual_pull( $type, $salesforce_id, $wordpress_object ); // we want the wp object to make sure we get the right fieldmap |
| 1366 |
|
if ( ! empty( $post_data ) ) { |