Giter Site home page Giter Site logo

fahrirusliyadi / fr-address-book-for-woocommerce Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 3.0 843 KB

Allow customers to save multiple addresses that they frequently use when placing an order.

Home Page: https://wordpress.org/plugins/fr-address-book-for-woocommerce/

CSS 1.83% JavaScript 12.11% PHP 84.15% SCSS 1.91%
address-book addresses multiple woocommerce woocommerce-extension wordpress wordpress-plugin

fr-address-book-for-woocommerce's People

Contributors

dependabot[bot] avatar fahrimax avatar fahrirusliyadi avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

fr-address-book-for-woocommerce's Issues

Leak of hooks like woocommerce_before_edit_account_address_form and woocommerce_after_edit_account_address_form in edit-address.php

<div class="fabfw-add-address-container">
<form method="post">
<div class="woocommerce-address-fields">
<div class="woocommerce-address-fields__field-wrapper">
<?php
foreach ($address_fields as $key => $field) {
if (isset($field['country_field'], $address_fields[$field['country_field']])) {
$field['country'] = wc_get_post_data_by_key($field['country_field']);
}
woocommerce_form_field($key, $field, wc_get_post_data_by_key($key));
}
?>
</div>
<p>
<button type="submit" class="button"><?php esc_html_e('Add address', 'fr-address-book-for-woocommerce') ?></button>
<?php wp_nonce_field('fabfw_add_address', 'fabfw_add_address') ?>
</p>
</div>
</form>
</div>

Allow save_address function $post_data variable to be filterable

Hi,

I am looking to be able to filter the $post_data array and add in some custom address data while bypassing the sanitisation / validation functions you have.

If you could add a filter hook to the code then that would be great and allow for other devs to hook in and extend the scope / use of the stored address data. I imagine something like the below would not affect any of the existing code.

$post_data = apply_filters( 'fabfw_save_address_post_data', $post_data, $address_fields );

https://github.com/fahrirusliyadi/fr-address-book-for-woocommerce/blob/master/src/Fr_Address_Book_for_WooCommerce_Frontend_MyAccount_AddressBook_BaseAction.php#L37

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.