Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release: Instagram Checkout #1669

Draft
wants to merge 188 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
188 commits
Select commit Hold shift + click to select a range
a74a765
Release: 2.2.0
unfulvio Oct 28, 2020
048ce6c
Bump FW to 5.9.0
unfulvio Oct 28, 2020
991a721
Bump FW composer ver
unfulvio Oct 28, 2020
b53408e
Composer update
unfulvio Oct 28, 2020
881f09c
Bump FW to 5.9.0 in includes and tests
unfulvio Oct 28, 2020
9a3e338
Add is_current_screen() helper method in settings screen
unfulvio Oct 28, 2020
966a04c
Add Advertise screen handler
unfulvio Oct 28, 2020
f0f3f68
Init the Advertise screen handler
unfulvio Oct 28, 2020
04e8194
Output the LWI script in the advertise screen
unfulvio Oct 28, 2020
6fe611b
Use utility method to check if current screen
unfulvio Oct 28, 2020
c464d17
Rename helper method
unfulvio Oct 28, 2020
96b5ea2
Require the Advertise screen handler php
unfulvio Oct 28, 2020
d2f8e84
Use correct FW alias
unfulvio Oct 28, 2020
0dcbb10
Remove Create ad from connection box and rework HTML output
unfulvio Oct 28, 2020
0f39c7e
Render the LWI Ads box
unfulvio Oct 28, 2020
ccd9091
Add helper function to get LWI Ads box conf data
unfulvio Oct 28, 2020
35807dd
Display message to connect when disconnected and viewing advertize
unfulvio Oct 28, 2020
d63f5ec
Check if connected before retrieving connection settings
unfulvio Oct 28, 2020
e9bef8c
Add Advertize CSS stylesheet
unfulvio Oct 28, 2020
0b334ad
Style the LWI boxes
unfulvio Oct 28, 2020
b7d323b
Update scope to ads_management
unfulvio Oct 28, 2020
9c7a04e
Add test to include advertise tab
unfulvio Oct 28, 2020
32ebb3f
Remove test to check for Create Ad button
unfulvio Oct 28, 2020
c33a7c4
Add acceptance test to check for Advertise tab
unfulvio Oct 28, 2020
21f9e90
Connect the FB page with WC Admin
unfulvio Oct 28, 2020
f7e2756
Expand add_submenu_page for clarity
unfulvio Oct 28, 2020
85722d3
Implement correctly the FW alias
unfulvio Oct 28, 2020
c1511fd
Change the parent slug root menu item conditionally
unfulvio Oct 28, 2020
c4efd13
Add notice about the menu item change
unfulvio Oct 28, 2020
c195db3
Add crumbs to top bar
unfulvio Oct 28, 2020
8bcf1b9
Separate wc admin connect in own method
unfulvio Oct 28, 2020
963896e
Add locales handler
unfulvio Oct 28, 2020
5ad9443
Require locales handler from main class
unfulvio Oct 28, 2020
fddabda
Move private locales property to static method
unfulvio Oct 28, 2020
e1fc0e9
Move get_supported_locales_list() method
unfulvio Oct 28, 2020
44e98a8
Deprecate get_supported_locales()
unfulvio Oct 28, 2020
7ce31c3
Add is_supported_locale() method
unfulvio Oct 28, 2020
fcf4d03
Turn back get_supported_locales() into prop
unfulvio Oct 28, 2020
a9e7be4
Rename method into get_supported_locales()
unfulvio Oct 28, 2020
0e223b6
Add optional argument to return key-values or just keys
unfulvio Oct 28, 2020
ca31d76
Add default locale const
unfulvio Oct 28, 2020
5727695
Use the Locale handler to pull corresponding SDK script
unfulvio Oct 28, 2020
27519c4
Add Locales tests
unfulvio Oct 28, 2020
60a59ff
Rename Locales to Locale
unfulvio Oct 28, 2020
39e39c6
Update path after renaming
unfulvio Oct 28, 2020
68fa247
Move hooks to private method
unfulvio Oct 28, 2020
01b2c09
Make sure passed timezone to the LWI script is a name
N-Molham Oct 28, 2020
538ca2c
Do not pass bool arg to get_supported_locales()
unfulvio Oct 30, 2020
ddff47b
Fix merge conflicts
unfulvio Oct 30, 2020
6d46650
Merge pull request #1667 from facebookincubator/ch66425/move-supporte…
unfulvio Oct 30, 2020
5cd6c42
Merge pull request #1666 from facebookincubator/ch66402/move-fb-menu-…
unfulvio Oct 30, 2020
7d1ebd1
Merge branch 'release-2.2.0' into ch66419/init-lwi-ads-script
unfulvio Oct 30, 2020
f2a9cc5
Add Advertise breadcrumb in wc admin top bar
unfulvio Oct 30, 2020
953d038
Use Settings_Screens alias in Settings
unfulvio Oct 30, 2020
a5e4593
Fix merge conflicts
unfulvio Oct 30, 2020
2742133
Update changelog
unfulvio Oct 30, 2020
b60984d
Tweak changelog wording
unfulvio Oct 30, 2020
63f5207
Tweak changelog wording
unfulvio Oct 30, 2020
277bff2
Merge branch 'release-2.2.0' into ch66419/init-lwi-ads-script
unfulvio Oct 30, 2020
6c82d16
Use third person in phpdoc
unfulvio Oct 30, 2020
7829821
Use CSS pseduo element to display message about iframe connecting issue
unfulvio Oct 30, 2020
33298d0
Add couple of CSS notes
unfulvio Oct 30, 2020
ef242b6
Group CSS rules in block
unfulvio Oct 30, 2020
1cc5857
Add inline CSS comment
unfulvio Oct 30, 2020
1c7dd18
Try to add loading/error message as HTML inside the div
deivamagalhaes Oct 30, 2020
c1b264f
Remove CSS for the loading/error state
deivamagalhaes Oct 30, 2020
a7100e7
Update includes/Admin/Abstract_Settings_Screen.php
Oct 30, 2020
2925e96
Revert "Remove CSS for the loading/error state"
wvega Oct 30, 2020
99a4671
Revert "Try to add loading/error message as HTML inside the div"
wvega Oct 30, 2020
0bdd8e3
Merge pull request #1665 from facebookincubator/ch66419/init-lwi-ads-…
wvega Oct 30, 2020
ed98c0b
Merge branch 'master' into release-2.2.0
wvega Oct 30, 2020
503277b
Fix acceptance test for menu item
wvega Oct 30, 2020
43ee124
Add missing changelog entries
wvega Oct 30, 2020
19a119c
Replace condition checks to see if WC Admin && marketing features are…
unfulvio Nov 4, 2020
f460514
Change facebook_for_woocommerce_integration_pixel_enabled trigger to …
unfulvio Nov 11, 2020
0626bcc
Update changelog
unfulvio Nov 11, 2020
9249220
Rework WC_Facebookcommerce_EventsTracker constructor to split respons…
unfulvio Nov 11, 2020
355d26b
Rectify dev ver
unfulvio Nov 11, 2020
7f099f8
Memoize whether pixel should be enabled
unfulvio Nov 11, 2020
06e81ab
Update changelog
unfulvio Nov 11, 2020
e0fb4e5
Update changelog
unfulvio Nov 11, 2020
ab411f9
Merge branch 'master' into release-2.2.0
wvega Nov 13, 2020
4820f4f
Update plugin framework to use v5.10.0
wvega Nov 13, 2020
3fde770
Update plugin framework version in namespaces
wvega Nov 13, 2020
0d14bd4
Use is_enhanced_admin_available() again
wvega Nov 13, 2020
c4a7372
Make Manage Connection the primary button
wvega Nov 13, 2020
74f0fdd
Update LWI scope from ads_management to manage_business_extension
wvega Nov 13, 2020
ae6c96c
Bump dev version to 2.2.0-dev.2
wvega Nov 13, 2020
69d1ef9
Merge pull request #1692 from facebookincubator/ch55524/handle-pixel-…
unfulvio Nov 18, 2020
a9679cd
Add data-hide-manage-button to remove manage button from advertise tab
unfulvio Nov 18, 2020
e66808e
Ensure Ads Insights iframe uses available width
wvega Nov 18, 2020
80d6db6
Bump dev version to 2.3.0-dev.1
wvega Oct 28, 2020
e17662a
Revert "De-couple Commerce related changes"
wvega Oct 28, 2020
f09df8c
Revert "Remove commerce test references"
wvega Oct 28, 2020
07d8701
Revert "Skip Admin\Settings\Commerce acceptance tests"
wvega Oct 28, 2020
ed3d176
Revert "Remove Order Handling from 2.1.2 release"
wvega Oct 29, 2020
094b82a
Revert "Remove Commerce Orders related Cests"
wvega Oct 29, 2020
4907e73
Add changelog entries
wvega Oct 28, 2020
ff74a7c
Remove is_release_part_of_commerce_rollout()
wvega Oct 28, 2020
bd11f7e
Use checked() to render the checked attribute of Instagram checkbox
wvega Oct 28, 2020
cf3e764
Test that add_order_refund() is not called for non-Commerce orders
wvega Oct 29, 2020
83cc4e9
Update order to test Admin\Orders::handle_refund()
wvega Oct 29, 2020
381ed3d
Prevent calling add_order_refund() on non-Commerce orders
wvega Oct 29, 2020
2a15c77
Sanitize Facebook refund reason field
wvega Oct 29, 2020
469c080
Bump dev version to 2.3.0-beta.2
wvega Nov 18, 2020
24dcdcc
Restore priority of filter after PR merge
unfulvio Nov 19, 2020
3269136
Fix catalog sync error using /items_batch for additional_variant_attr…
Nov 18, 2020
0d7a5f1
Facebook for WooCommerce: 2.2.0 Versioning
wvega Nov 19, 2020
1aaecc4
Update readme.txt
wvega Nov 19, 2020
6cea047
Enable connecting existing Commerce Accounts
Nov 20, 2020
c7b3dbd
Fix spacing / debug
Nov 21, 2020
4c81d35
Bump dev version to 2.3.0-dev.1
wvega Oct 28, 2020
c397d80
Revert "De-couple Commerce related changes"
wvega Oct 28, 2020
2dc1e39
Revert "Remove commerce test references"
wvega Oct 28, 2020
f6f49de
Revert "Skip Admin\Settings\Commerce acceptance tests"
wvega Oct 28, 2020
b15c289
Revert "Remove Order Handling from 2.1.2 release"
wvega Oct 29, 2020
730f2b4
Revert "Remove Commerce Orders related Cests"
wvega Oct 29, 2020
14e3698
Add changelog entries
wvega Oct 28, 2020
28744a2
Remove is_release_part_of_commerce_rollout()
wvega Oct 28, 2020
2126d24
Use checked() to render the checked attribute of Instagram checkbox
wvega Oct 28, 2020
523556d
Test that add_order_refund() is not called for non-Commerce orders
wvega Oct 29, 2020
70356ff
Update order to test Admin\Orders::handle_refund()
wvega Oct 29, 2020
cc4a6c8
Prevent calling add_order_refund() on non-Commerce orders
wvega Oct 29, 2020
3bb595f
Sanitize Facebook refund reason field
wvega Oct 29, 2020
2662064
Bump dev version to 2.3.0-beta.2
wvega Nov 18, 2020
2b09283
Bump dev version to 2.3.0-beta.3
wvega Nov 23, 2020
31c2ae8
Update framework namespace to v5_10_0
wvega Nov 23, 2020
de96982
Remove business_management permissions dependencies
Dec 3, 2020
e9534d1
Remove commerce enabled flags
Dec 9, 2020
85ad19d
Fix JS errors on Commerce settings screen
Dec 10, 2020
5286a50
Do not display Commmerce settings if not connected or not available
unfulvio Dec 11, 2020
4a6ddfd
Apply suggestions from code review
denniskwon Dec 12, 2020
e5f40be
add auth type param to enable non-obo flow for auth proxy
Dec 12, 2020
cba71b6
add back ads_read permission
Dec 12, 2020
b26e636
When setting the access token, set also request bearer
unfulvio Dec 14, 2020
1aa081b
Set authorization header via method
unfulvio Dec 14, 2020
2bf0d44
Add test_set_request_authorization_header integration test
unfulvio Dec 14, 2020
aabc4a0
Merge pull request #1733 from facebookincubator/ch71896/set-bearer-wh…
wvega Dec 14, 2020
ce837ca
Merge pull request #1728 from facebookincubator/ch68652/fix-commerce-…
wvega Dec 17, 2020
2dacd37
Merge branch 'release/instagram-checkout' into dkwon/inventory_fix
wvega Dec 17, 2020
180b7f1
Update compiled assets
wvega Dec 17, 2020
a13474f
Enable custom retailer_id for backwards compatibility
Dec 18, 2020
0aa74fd
Remove calls to no longer defined methods
wvega Dec 21, 2020
423ec00
Add description for Product identifier setting to make warning more p…
Dec 23, 2020
1be030e
Deprecate methods prior to removal
Dec 23, 2020
07f87c2
Merge pull request #1727 from facebookincubator/dkwon/inventory_fix
wvega Dec 23, 2020
9214fe1
Merge pull request #1736 from facebookincubator/dkwon/custom_retailer_id
wvega Dec 23, 2020
b843fa1
Prevent PHP Notice for trying to access a non-existent property
wvega Dec 23, 2020
0c87191
Merge branch 'release/instagram-checkout' into dkwon/permission_fix
denniskwon Jan 19, 2021
db212be
fix spacing bug in param name
Jan 21, 2021
0d02ea9
Merge pull request #1746 from facebookincubator/dkwon/permission_fix
denniskwon Jan 25, 2021
d8f3d0c
Merge branch 'release/instagram-checkout' into dkwon/connect_existing…
denniskwon Jan 27, 2021
19f3e8e
fix merge error
Jan 27, 2021
d06d3ba
Merge pull request #1709 from facebookincubator/dkwon/connect_existin…
denniskwon Jan 27, 2021
7372ad0
Fix for handling custom retailer ID on product lookup
Jan 27, 2021
9101302
Merge pull request #1757 from facebookincubator/dkwon/custom_retailer…
denniskwon Jan 28, 2021
0427011
FBE Commerce Flow Integration
Feb 2, 2021
dc9d05d
Update messaging / CTA for FBE Commerce flows
Feb 3, 2021
d81caf1
Fix exception handling
Feb 3, 2021
151f967
Add display info for sales channels and use appropriate brand messaging
Feb 3, 2021
20398cb
Add link to Management View when commerce is connected
Feb 3, 2021
443e882
Refactor connected check and add support for OMA read
Feb 11, 2021
d4598a1
Remove redundant GPC UI from Commerce tab
Feb 11, 2021
b71e833
Additional tweaks for confirming onsite Checkout status
Feb 13, 2021
9947b92
Replace references to Instagram with Instagram or Facebook
Feb 15, 2021
1716d91
Add missing JS for Product Sync
Feb 15, 2021
a9dd7f1
Merge branch 'master' into release/instagram-checkout
Feb 19, 2021
c1e7f77
Fix merge issues
Feb 19, 2021
64bf215
Update Commerce Manager ID references to use Commerce Merchant Settin…
Feb 23, 2021
b8eb3d5
Integration test fixes
Feb 24, 2021
cedc398
Relax requirements for connecting Checkout and add messaging for Revi…
Feb 25, 2021
1082a3f
Sanitize attribute names to correctly auto-match enhanced catalog att…
Feb 26, 2021
8681973
Unschedule fetch order actions if disconnected
Feb 26, 2021
f0c9702
Remove references to legacy product_groups/items
Mar 1, 2021
af936f5
Fix Product edit page
Mar 2, 2021
f859f82
Fix failing integration tests due to API initialization issues
Mar 2, 2021
e4bcf84
Merge branch 'release/instagram-checkout' of github.com:facebookincub…
Mar 2, 2021
0f654ed
Remove tests for deleted legacy API calls
Mar 3, 2021
f523801
Fix delete_products / create_or_update_products to use correct IDs
Mar 4, 2021
2072577
Fixes / optimizations for enhanced catalog attribute syncing
Mar 4, 2021
caabeb1
Commerce connection tweaks
Mar 5, 2021
c59c6a0
Merge branch 'release/instagram-checkout' of github.com:facebookincub…
Mar 5, 2021
437e6f2
Fix incorrect product var
Mar 5, 2021
5ad9bc2
Merge pull request #1793 from facebookincubator/dkwon/remove_legacy_a…
denniskwon Mar 11, 2021
ace41c2
Add upgrade version to lifecycle
denniskwon Mar 12, 2021
dfffde6
Update redirect_uri param name to match spec
denniskwon Mar 16, 2021
353ba50
Merge `master` into `release/instagram-checkout` with conflicts:
Apr 14, 2021
3b1cad8
tweak IG checkout placeholder changelog entry to 3.0.0-dev.1
Apr 14, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions assets/css/admin/facebook-for-woocommerce-product-sync.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/** Product Sync Settings Description */
.wc-facebook-settings table.form-table .description {
width: 400px;
}
18 changes: 4 additions & 14 deletions assets/css/admin/facebook-for-woocommerce-products-admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,6 @@
clear: both;
}

#woocommerce-product-data .wc_facebook_commerce_enabled_field label,
#woocommerce-product-data .wc_facebook_commerce_fields label {
padding-right: 37px;
position: relative;
width: 113px;
}
#woocommerce-product-data .wc_facebook_commerce_enabled_field label .woocommerce-help-tip,
#woocommerce-product-data .wc_facebook_commerce_fields label .woocommerce-help-tip {
margin: 0;
position: absolute;
top: 4px;
right: 12px;
}

#woocommerce-product-data #wc-facebook-google-product-category-fields {
width: 50%;
}
Expand All @@ -76,3 +62,7 @@
.column-facebook_sync {
width: 11% !important;
}

.wc-facebook-settings .desc {
width: 400px;
}
71 changes: 0 additions & 71 deletions assets/js/admin/facebook-for-woocommerce-products-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,64 +143,6 @@ jQuery( document ).ready( function( $ ) {
}


/**
* Disables and changes the checked status of the Sell on Instagram setting field.
*
* Additionally, shows/hides messages explaining that the product is not ready for Commerce.
*
* @since 2.1.0
*
* @param {boolean} enabled whether the setting field should be enabled or not
* @param {jQuery} $container a common ancestor of all the elements that need to modified
*/
function toggleFacebookSellOnInstagramSetting( enabled, $container ) {

let $field = $container.find( '#wc_facebook_commerce_enabled' );
let checked = $field.prop( 'original' );

$field.prop( 'checked', enabled ? checked : false ).prop( 'disabled', ! enabled );

// trigger change to hide fields based on the new state
$field.trigger( 'change' );

// restore previously stored value so that we can later restore the field to the status it had before we disabled it here
$field.prop( 'original', checked );

$container.find( '#product-not-ready-notice, #variable-product-not-ready-notice' ).hide();

if ( isVariableProduct() && ! isSyncEnabledForVariableProduct() ) {
$container.find( '#variable-product-not-ready-notice' ).show();
} else if ( ! enabled ) {
$container.find( '#product-not-ready-notice' ).show();
}
}


/**
* Determines whether product properties are configured using appropriate values for Commerce.
*
* @since 2.1.0
*
* @return {boolean}
*/
function isProductReadyForCommerce() {

if ( ! isSyncEnabledForProduct() ) {
return false;
}

if ( ! isPriceDefinedForProduct() ) {
return false;
}

if ( ! isStockManagementEnabledForProduct() ) {
return false;
}

return true;
}


/**
* Determines whether the product or one of its variations has Facebook Sync enabled.
*
Expand Down Expand Up @@ -335,14 +277,6 @@ jQuery( document ).ready( function( $ ) {
*/
function shouldShowMissingGoogleProductCategoryAlert() {

if ( ! $( '#wc_facebook_commerce_enabled' ).prop( 'checked' ) ) {
return false;
}

if ( ! isProductReadyForCommerce() ) {
return false;
}

let selectedCategories = $( '.wc_facebook_commerce_fields .wc-facebook-google-product-category-select' ).map( ( i, element ) => {
return $( element ).val() ? $( element ).val() : null;
} );
Expand Down Expand Up @@ -614,8 +548,6 @@ jQuery( document ).ready( function( $ ) {
const jsSyncModeToggle = $( this ).closest( '.wc-metabox-content' ).find( '.js-variable-fb-sync-toggle' );
toggleSyncAndShowOption( ! $( this ).prop( 'checked' ), jsSyncModeToggle );
} );

toggleFacebookSellOnInstagramSetting( isProductReadyForCommerce(), $( '#facebook_options' ) );
} );

// show/hide Custom Image URL setting
Expand Down Expand Up @@ -653,9 +585,6 @@ jQuery( document ).ready( function( $ ) {
} );
} );

// toggle Sell on Instagram checkbox on page load
toggleFacebookSellOnInstagramSetting( isProductReadyForCommerce(), facebookSettingsPanel );

let submitProductSave = false;

$( 'form#post input[type="submit"]' ).on( 'click', function( e ) {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading